Appearance
Update Automation Account
PUT/public/account/{accountId}/automationUpdate the automation configuration for a specific account, including delete, reply, like, message, chat, and story settings.
Endpoint Details
- Authentication: Basic Auth (
Authorization: Basic Base64(AccessKey:SecretKey)) - Access Tier: Standard+
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The unique identifier of the automation. |
Request Body
Automation Configuration Guide
For a detailed explanation of all automation modules, schemas, and examples, see the Automation Configuration Guide.
| Field | Type | Required | Description |
|---|---|---|---|
delete | object | Yes | Configuration for delete comment automation. |
reply | object | Yes | Configuration for reply comment automation. |
like | object | Yes | Configuration for like comment automation. |
message | object | Yes | Configuration for DM comment automation. |
chat | object | Yes | Configuration for chat automation. |
story | object | Yes | Configuration for story automation. |
Delete Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether delete automation is active. |
type | string | Yes | Delete type. Options: keyword, ai. |
keywords | string[] | Yes | Keywords that trigger comment deletion (used when type is keyword). |
prompt | string | Yes | AI prompt for determining which comments to delete (used when type is ai). |
Reply Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether reply automation is active. |
type | string | Yes | Reply type. Options: text, keyword, ai. |
text | string | Yes | Static reply text (used when type is text). |
prompt | string | Yes | AI prompt for generating reply text (used when type is ai). |
isIncludeContentContext | boolean | Yes | Whether to include the content context in AI prompt. |
keyword | object | Yes | Keyword-based reply configuration (used when type is keyword). |
keyword.isExactMatch | boolean | Yes | Whether to match keywords exactly. |
keyword.values | array | Yes | Array of keyword-reply pairs. |
keyword.values[].keyword | string | Yes | Trigger keyword. |
keyword.values[].text | string | Yes | Reply text for this keyword. |
condition | object | Yes | Condition to trigger reply. |
condition.isActive | boolean | Yes | Whether condition is active. |
condition.isExactMatch | boolean | Yes | Whether to match condition keywords exactly. |
condition.keywords | string[] | Yes | Condition keywords. |
delay | object | Yes | Delay configuration before replying. |
delay.isActive | boolean | Yes | Whether delay is active. |
delay.value | number | Yes | Delay value. |
delay.type | string | Yes | Delay unit. Options: second, minute. |
Like Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether like automation is active. |
Message Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether DM automation is active. |
type | string | Yes | Message type. Options: ai, text, opening, keyword. |
text | string | Yes | Static message text (used when type is text). |
prompt | string | Yes | AI prompt for generating messages (used when type is ai). |
opening | object | Yes | Opening message configuration. |
opening.postback | object | Yes | Postback button opening configuration. |
opening.postback.isActive | boolean | Yes | Whether postback opening is active. |
opening.postback.text | string | Yes | Opening text message. |
opening.postback.image | string | Yes | Opening image URL. |
opening.postback.button | object | Yes | Postback button configuration. |
opening.postback.button.type | string | Yes | Button type. Options: postback, web_url. |
opening.postback.button.title | string | Yes | Button title text. |
opening.postback.button.payload | string | Yes | Button payload identifier. |
opening.postback.button.url | string | Yes | Button URL. |
opening.additional | object | Yes | Additional opening configuration. |
opening.additional.isActive | boolean | Yes | Whether additional opening is active. |
opening.additional.isPreventBeforeFollow | boolean | Yes | Whether to prevent message before user follows. |
opening.additional.text | string | Yes | Additional opening text. |
opening.additional.image | string | Yes | Additional opening image URL. |
opening.additional.button | object | Yes | Additional button configuration (same as postback button). |
opening.webUrl | object | Yes | Web URL opening configuration. |
opening.webUrl.text | string | Yes | Web URL opening text. |
opening.webUrl.image | string | Yes | Web URL opening image URL. |
opening.webUrl.buttons | array | Yes | Array of web URL buttons (same structure as postback button). |
keyword | object | Yes | Keyword-based message config (same structure as Reply keyword). |
condition | object | Yes | Condition config (same structure as Reply condition). |
delay | object | Yes | Delay config (same structure as Reply delay). |
Chat Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether chat automation is active. |
type | string | Yes | Chat response mode. Options: ai, text, keyword. |
text | string | Yes | Static response text (used when type is text). |
prompt | string | Yes | AI prompt for generating responses (used when type is ai). |
keyword | object | Yes | Keyword-based chat config (same structure as Reply keyword). |
delay | object | Yes | Delay config before responding (same structure as Reply delay). |
Story Object
Same structure as Message Object.
Example Request
bash
curl -X PUT "https://api.repliz.com/public/account/680affa5ce12f2f72916f67e/automation" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"delete": {
"isActive": true,
"type": "ai",
"keywords": ["baca", "oke"],
"prompt": "You are..."
},
"reply": {
"isActive": true,
"type": "ai",
"text": "Hello",
"prompt": "You are...",
"isIncludeContentContext": false,
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Text to reply message"
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"like": {
"isActive": true
},
"message": {
"isActive": true,
"type": "ai",
"text": "Hello",
"prompt": "You are...",
"opening": {
"postback": {
"isActive": false,
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"webUrl": {
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"buttons": [
{
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
]
}
},
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Text to reply message"
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"chat": {
"isActive": true,
"type": "ai",
"text": "Hello",
"prompt": "You are...",
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Text to reply message"
}
]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"story": {
"isActive": true,
"type": "ai",
"text": "Hello",
"prompt": "You are...",
"opening": {
"postback": {
"isActive": false,
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"webUrl": {
"text": "Want to know?",
"image": "https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png",
"buttons": [
{
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
]
}
},
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Text to reply message"
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
}
}'javascript
import axios from 'axios';
const accountId = '680affa5ce12f2f72916f67e';
const response = await axios.put(
`https://api.repliz.com/public/account/${accountId}/automation`,
{
delete: {
isActive: true,
type: 'ai',
keywords: ['baca', 'oke'],
prompt: 'You are...',
},
reply: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
opening: {
postback: {
isActive: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
buttons: [
{
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
chat: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
opening: {
postback: {
isActive: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
buttons: [
{
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const accountId = '680affa5ce12f2f72916f67e';
const response = await fetch(
`https://api.repliz.com/public/account/${accountId}/automation`,
{
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
delete: {
isActive: true,
type: 'ai',
keywords: ['baca', 'oke'],
prompt: 'You are...',
},
reply: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
opening: {
postback: {
isActive: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
buttons: [
{
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
chat: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'ai',
text: 'Hello',
prompt: 'You are...',
opening: {
postback: {
isActive: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know?',
image: 'https://storage.repliz.com/automations/008556e6-0efe-4197-9d39-5849616d6c56.png',
buttons: [
{
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Text to reply message',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
}),
},
);
const data = await response.json();
console.log(data);Response
json
// No content returned on successjson
{
"code": 404,
"message": "account not found"
}json
{
"code": 401,
"message": "unauthorized"
}