Appearance
Create Automation
POST/public/automationCreate a new content automation with delete, reply, like, message, and story configurations attached to a specific content.
Endpoint Details
- Authentication: Basic Auth (
Authorization: Basic Base64(AccessKey:SecretKey)) - Access Tier: Gold+
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 |
|---|---|---|---|
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). |
Config Object
| 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. |
Delete Object
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Whether delete automation is active. |
type | string | No | Delete type. Options: keyword, ai. |
keywords | string[] | No | Keywords that trigger comment deletion (used when type is keyword). |
prompt | string | No | 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 | No | Reply type. Options: text, keyword, ai. |
text | string | No | Static reply text (used when type is text). |
prompt | string | No | AI prompt for generating reply text (used when type is ai). |
isIncludeContentContext | boolean | No | Whether to include the content context in AI prompt. |
keyword | object | No | Keyword-based reply configuration (used when type is keyword). |
keyword.isExactMatch | boolean | No | Whether to match keywords exactly. |
keyword.values | array | No | Array of keyword-reply pairs. |
keyword.values[].keyword | string | No | Trigger keyword. |
keyword.values[].text | string | No | Reply text for this keyword. |
condition | object | No | Condition to trigger reply. |
condition.isActive | boolean | No | Whether condition is active. |
condition.isExactMatch | boolean | No | Whether to match condition keywords exactly. |
condition.keywords | string[] | No | Condition keywords. |
exception | object | No | Exception rule configuration to ignore certain comments. |
exception.isActive | boolean | No | Whether exception rule is active. |
exception.isExactMatch | boolean | No | Whether to match exception keywords exactly. |
exception.keywords | string[] | No | Exception keywords. |
delay | object | No | Delay configuration before replying. |
delay.isActive | boolean | No | Whether delay is active. |
delay.value | number | No | Delay value. |
delay.type | string | No | Delay unit. Options: second. |
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 | No | Message type. Options: text, keyword, ai. |
text | string | No | Static message text (used when type is text). |
prompt | string | No | AI prompt for generating messages (used when type is ai). |
opening | object | No | Opening message configuration. |
opening.postback | object | No | Postback button opening configuration. |
opening.postback.isActive | boolean | No | Whether postback opening is active. |
opening.postback.text | string | No | Opening text message. |
opening.postback.button | object | No | Postback button configuration. |
opening.postback.button.type | string | No | Button type. Options: postback. |
opening.postback.button.title | string | No | Button title text. |
opening.postback.button.payload | string | No | Button payload identifier. |
opening.postback.button.url | string | No | Button URL. |
opening.additional | object | No | Additional opening configuration. |
opening.additional.isActive | boolean | No | Whether additional opening is active. |
opening.additional.isPreventBeforeFollow | boolean | No | Whether to prevent message before user follows. |
opening.additional.text | string | No | Additional opening text. |
opening.additional.button | object | No | Additional button configuration (same as postback button). |
opening.webUrl | object | No | Web URL opening configuration. |
opening.webUrl.text | string | No | Web URL opening text. |
opening.webUrl.buttons | array | No | Array of web URL buttons (same structure as postback button). |
keyword | object | No | Keyword-based message config (same structure as Reply keyword). |
condition | object | No | Condition config (same structure as Reply condition). |
delay | object | No | Delay config (same structure as Reply delay). |
Story Object
Same structure as Message Object.
Example Request
bash
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": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"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": "postback",
"title": "Click Me",
"payload": "payloadcustompostback",
"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"
}
}
}
}'javascript
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: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
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: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
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);javascript
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: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
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: 'postback',
title: 'Click Me',
payload: 'payloadcustompostback',
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);Response
json
{
"automationId": "69c7532ff0c3b7c83ab9e681"
}json
// Automation
{
"code": 404,
"message": "automation not found"
}
// Account
{
"code": 404,
"message": "account not found"
}
// Content
{
"code": 404,
"message": "content not found"
}json
{
"code": 401,
"message": "unauthorized"
}