English
English
Appearance
English
English
Appearance
/public/account/{accountId}/automationUpdate the automation configuration for a specific account, including delete, reply, like, message, chat, and story settings.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The unique identifier of the account. |
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. |
| 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). |
| 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). |
image | object | No | Image sent along with every reply, for all three types. See Reply Image. |
image.url | string | Yes | Public URL of the image file. |
image.mimetype | string | Yes | MIME type of the image, like image/jpeg. |
image.thumbnail | string | No | Smaller preview shown in Repliz. |
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. |
isIncludeLiveComment | boolean | No | Instagram only. Also reply to comments on an Instagram Live. Off when left out. See Instagram Live comments. |
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. |
exception | object | Yes | Keywords that stop Repliz from replying. Checked before condition. |
exception.isActive | boolean | Yes | Whether the exception is active. |
exception.isExactMatch | boolean | Yes | Whether the comment must equal a keyword exactly. |
exception.keywords | string[] | Yes | Comments containing any of these keywords get no reply. |
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 in seconds. The dashboard offers 10 to 60. |
delay.type | string | Yes | Use second. The value is always treated as seconds. |
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether like automation is active. |
| 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). |
isIncludeLiveComment | boolean | No | Instagram only. Also DM commenters on an Instagram Live, while it is on air. Off when left out. See Instagram Live comments. |
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 | No | 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 | No | Set by Repliz when the automation is saved. Any value you send is replaced. |
opening.postback.button.url | string | No | 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 | No | 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.type | string | No | button (default) sends text, image, and buttons. element sends a carousel of elements. |
opening.webUrl.text | string | Yes | Web URL opening text. Not sent when type is element. |
opening.webUrl.image | string | No | Web URL opening image URL. Not sent when type is element. |
opening.webUrl.buttons | array | Yes | Up to 3 link buttons, each { "type": "web_url", "title", "url" }. Not sent when type is element. |
opening.webUrl.elements | array | No | 1 to 10 carousel cards. Required when type is element. See Carousel. |
opening.webUrl.elements[].title | string | Yes | Card title, cut to 80 characters. Supports spintax. |
opening.webUrl.elements[].subtitle | string | No | Text under the title, cut to 80 characters. Supports spintax. |
opening.webUrl.elements[].image | string | No | Card image URL. |
opening.webUrl.elements[].url | string | No | URL opened when the card itself is tapped. |
opening.webUrl.elements[].buttons | array | Yes | Up to 3 link buttons, each { "type": "web_url", "title", "url" }. Can be empty. |
keyword | object | Yes | Keyword-based message config (same structure as Reply keyword). Each keyword can also answer with buttons. See Keyword with Buttons. |
keyword.values[].type | string | No | text (default) answers with text. opening answers with this keyword's own opening. |
keyword.values[].opening | object | No | Same structure as opening. Required when type is opening. |
keyword.values[].id | string | No | Set by Repliz for keywords with type: "opening". Send it back unchanged so buttons already sent keep working. |
condition | object | Yes | Condition config (same structure as Reply condition). |
delay | object | Yes | Delay config (same structure as Reply delay). |
| 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 Message keyword). On Facebook and Instagram, a keyword can also answer with buttons. See Keyword with Buttons. |
delay | object | Yes | Delay config before responding (same structure as Reply delay). |
Same structure as Message Object.
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"
}
]
},
"exception": {
"isActive": false,
"isExactMatch": false,
"keywords": []
},
"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": "web_url",
"title": "Click Me",
"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": "web_url",
"title": "Click Me",
"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"
}
}
}'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',
},
],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: [],
},
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: 'web_url',
title: 'Click Me',
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: 'web_url',
title: 'Click Me',
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);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',
},
],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: [],
},
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: 'web_url',
title: 'Click Me',
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: 'web_url',
title: 'Click Me',
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);// No content returned on success{
"code": 404,
"message": "account not found"
}{
"code": 401,
"message": "unauthorized"
}