English
English
Appearance
English
English
Appearance
/public/automationCreate a new content automation with delete, reply, like, message, and story configurations attached to a specific content.
Authorization: Basic Base64(AccessKey:SecretKey))Automation Configuration Guide
For a detailed explanation of all automation modules, schemas, and examples, see the Automation Configuration Guide.
| Field | Type | Required | Description |
|---|---|---|---|
contentId | string | Yes | The content ID to attach the automation to (e.g. 113958387982006_942538351814577). |
accountId | string | Yes | The account ID to associate with the automation. |
config | object | Yes | Automation configuration object (see below). |
| 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. |
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. |
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. |
exception | object | Yes | Exception rule configuration to ignore certain comments. |
exception.isActive | boolean | Yes | Whether exception rule is active. |
exception.isExactMatch | boolean | Yes | Whether to match exception keywords exactly. |
exception.keywords | string[] | Yes | Exception 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: text, keyword, ai, opening. |
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.button | object | Yes | Postback button configuration. |
opening.postback.button.type | string | Yes | Button type. Options: postback. |
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.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). |
Same structure as Message Object.
curl -X POST "https://api.repliz.com/public/automation" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"contentId": "113958387982006_942538351814577",
"accountId": "680affa5ce12f2f72916f67e",
"config": {
"delete": {
"isActive": true,
"type": "ai",
"keywords": ["spam", "promo"],
"prompt": "You are a content moderator. Delete comments that are spam or inappropriate."
},
"reply": {
"isActive": true,
"type": "ai",
"text": "Thank you for your comment!",
"prompt": "You are a friendly social media manager. Reply to comments warmly.",
"isIncludeContentContext": false,
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Hi there! How can we help?"
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"exception": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"like": {
"isActive": true
},
"message": {
"isActive": true,
"type": "ai",
"text": "Hello! Thanks for commenting.",
"prompt": "You are a helpful assistant. Send a friendly DM.",
"opening": {
"postback": {
"isActive": false,
"text": "Want to know more?",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "Want to know more?",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"webUrl": {
"text": "Want to know more?",
"buttons": [
{
"type": "web_url",
"title": "Click Me",
"url": "https://repliz.com"
}
]
}
},
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Hi! Check your DM."
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"story": {
"isActive": true,
"type": "ai",
"text": "Thanks for watching our story!",
"prompt": "You are a friendly assistant. Reply to story mentions.",
"opening": {
"postback": {
"isActive": false,
"text": "Want to know more?",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "Want to know more?",
"button": {
"type": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"url": "https://repliz.com"
}
},
"webUrl": {
"text": "Want to know more?",
"buttons": [
{
"type": "web_url",
"title": "Click Me",
"url": "https://repliz.com"
}
]
}
},
"keyword": {
"isExactMatch": false,
"values": [
{
"keyword": "Hello",
"text": "Hi! Thanks for the mention."
}
]
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": ["hello"]
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
}
}
}'import axios from 'axios';
const response = await axios.post(
'https://api.repliz.com/public/automation',
{
contentId: '113958387982006_942538351814577',
accountId: '680affa5ce12f2f72916f67e',
config: {
delete: {
isActive: true,
type: 'ai',
keywords: ['spam', 'promo'],
prompt: 'You are a content moderator. Delete comments that are spam or inappropriate.',
},
reply: {
isActive: true,
type: 'ai',
text: 'Thank you for your comment!',
prompt: 'You are a friendly social media manager. Reply to comments warmly.',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi there! How can we help?',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'ai',
text: 'Hello! Thanks for commenting.',
prompt: 'You are a helpful assistant. Send a friendly DM.',
opening: {
postback: {
isActive: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know more?',
buttons: [
{
type: 'web_url',
title: 'Click Me',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi! Check your DM.',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'ai',
text: 'Thanks for watching our story!',
prompt: 'You are a friendly assistant. Reply to story mentions.',
opening: {
postback: {
isActive: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know more?',
buttons: [
{
type: 'web_url',
title: 'Click Me',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi! Thanks for the mention.',
},
],
},
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 response = await fetch('https://api.repliz.com/public/automation', {
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
contentId: '113958387982006_942538351814577',
accountId: '680affa5ce12f2f72916f67e',
config: {
delete: {
isActive: true,
type: 'ai',
keywords: ['spam', 'promo'],
prompt: 'You are a content moderator. Delete comments that are spam or inappropriate.',
},
reply: {
isActive: true,
type: 'ai',
text: 'Thank you for your comment!',
prompt: 'You are a friendly social media manager. Reply to comments warmly.',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi there! How can we help?',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'ai',
text: 'Hello! Thanks for commenting.',
prompt: 'You are a helpful assistant. Send a friendly DM.',
opening: {
postback: {
isActive: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know more?',
buttons: [
{
type: 'web_url',
title: 'Click Me',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi! Check your DM.',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'ai',
text: 'Thanks for watching our story!',
prompt: 'You are a friendly assistant. Reply to story mentions.',
opening: {
postback: {
isActive: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: 'Want to know more?',
button: {
type: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
url: 'https://repliz.com',
},
},
webUrl: {
text: 'Want to know more?',
buttons: [
{
type: 'web_url',
title: 'Click Me',
url: 'https://repliz.com',
},
],
},
},
keyword: {
isExactMatch: false,
values: [
{
keyword: 'Hello',
text: 'Hi! Thanks for the mention.',
},
],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: ['hello'],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
},
}),
});
const data = await response.json();
console.log(data);{
"automationId": "69c7532ff0c3b7c83ab9e681"
}// Automation
{
"code": 404,
"message": "automation not found"
}
// Account
{
"code": 404,
"message": "account not found"
}
// Content
{
"code": 404,
"message": "content not found"
}{
"code": 401,
"message": "unauthorized"
}