English
English
Appearance
English
English
Appearance
/public/template/{templateId}Update the name, configuration, or automation rules of an existing automation template.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | The unique identifier of the automation template. |
Automation Configuration Guide
For a detailed explanation of all automation modules, schemas, and examples, see the Automation Configuration Guide.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the automation template. |
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. |
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. |
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.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: text, keyword, ai. |
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/template/6a912e6c8133bfb870b220d3" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"name": "Auto Comment Updated",
"config": {
"delete": {
"isActive": true,
"type": "keyword",
"keywords": ["Jobless", "spam"],
"prompt": ""
},
"reply": {
"isActive": true,
"type": "text",
"text": "Thanks for comment!",
"prompt": "",
"isIncludeContentContext": false,
"keyword": {
"isExactMatch": false,
"values": []
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": []
},
"exception": {
"isActive": false,
"isExactMatch": false,
"keywords": []
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"like": {
"isActive": true
},
"message": {
"isActive": true,
"type": "text",
"text": "Thanks for comment, here we are",
"prompt": "",
"opening": {
"postback": {
"isActive": false,
"text": "",
"image": "",
"file": null,
"button": {
"type": "postback",
"title": "",
"payload": ""
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "",
"image": "",
"file": null,
"button": {
"type": "postback",
"title": "",
"payload": ""
}
},
"webUrl": {
"text": "",
"image": "",
"file": null,
"buttons": []
}
},
"keyword": {
"isExactMatch": false,
"values": []
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": []
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"story": {
"isActive": true,
"type": "text",
"text": "Like this story?",
"prompt": "",
"opening": {
"postback": {
"isActive": false,
"text": "",
"image": "",
"file": null,
"button": {
"type": "postback",
"title": "",
"payload": ""
}
},
"additional": {
"isActive": false,
"isPreventBeforeFollow": false,
"text": "",
"image": "",
"file": null,
"button": {
"type": "postback",
"title": "",
"payload": ""
}
},
"webUrl": {
"text": "",
"image": "",
"file": null,
"buttons": []
}
},
"keyword": {
"isExactMatch": false,
"values": []
},
"condition": {
"isActive": false,
"isExactMatch": false,
"keywords": []
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
},
"chat": {
"isActive": true,
"type": "text",
"text": "For information, please visit our website",
"prompt": "",
"keyword": {
"isExactMatch": false,
"values": []
},
"delay": {
"isActive": false,
"value": 10,
"type": "second"
}
}
}
}'import axios from 'axios';
const templateId = '6a912e6c8133bfb870b220d3';
const response = await axios.put(
`https://api.repliz.com/public/template/${templateId}`,
{
name: 'Auto Comment Updated',
config: {
delete: {
isActive: true,
type: 'keyword',
keywords: ['Jobless', 'spam'],
prompt: '',
},
reply: {
isActive: true,
type: 'text',
text: 'Thanks for comment!',
prompt: '',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'text',
text: 'Thanks for comment, here we are',
prompt: '',
opening: {
postback: {
isActive: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
webUrl: {
text: '',
image: '',
file: null,
buttons: [],
},
},
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'text',
text: 'Like this story?',
prompt: '',
opening: {
postback: {
isActive: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
webUrl: {
text: '',
image: '',
file: null,
buttons: [],
},
},
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
chat: {
isActive: true,
type: 'text',
text: 'For information, please visit our website',
prompt: '',
keyword: {
isExactMatch: false,
values: [],
},
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 templateId = '6a912e6c8133bfb870b220d3';
const response = await fetch(
`https://api.repliz.com/public/template/${templateId}`,
{
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Auto Comment Updated',
config: {
delete: {
isActive: true,
type: 'keyword',
keywords: ['Jobless', 'spam'],
prompt: '',
},
reply: {
isActive: true,
type: 'text',
text: 'Thanks for comment!',
prompt: '',
isIncludeContentContext: false,
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
exception: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
like: {
isActive: true,
},
message: {
isActive: true,
type: 'text',
text: 'Thanks for comment, here we are',
prompt: '',
opening: {
postback: {
isActive: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
webUrl: {
text: '',
image: '',
file: null,
buttons: [],
},
},
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
story: {
isActive: true,
type: 'text',
text: 'Like this story?',
prompt: '',
opening: {
postback: {
isActive: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
additional: {
isActive: false,
isPreventBeforeFollow: false,
text: '',
image: '',
file: null,
button: {
type: 'postback',
title: '',
payload: '',
},
},
webUrl: {
text: '',
image: '',
file: null,
buttons: [],
},
},
keyword: {
isExactMatch: false,
values: [],
},
condition: {
isActive: false,
isExactMatch: false,
keywords: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
chat: {
isActive: true,
type: 'text',
text: 'For information, please visit our website',
prompt: '',
keyword: {
isExactMatch: false,
values: [],
},
delay: {
isActive: false,
value: 10,
type: 'second',
},
},
},
}),
},
);
console.log(response.status);// No content returned on success{
"code": 404,
"message": "template not found"
}{
"code": 401,
"message": "unauthorized"
}