English
English
Appearance
English
English
Appearance
https://api.repliz.com/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 | ID of the template, the templateId returned by Create Template or the _id from Get 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 shown in the template list, for example Giveaway replies. Search in Get Template matches it. |
config | object | Yes | The automation modules saved in the template: delete, reply, like, message, chat, and story. Send every module, with isActive: false for the ones you don't use. |
| Field | Type | Required | Description |
|---|---|---|---|
delete | object | Yes | Deletes matching comments. See Delete Object. |
reply | object | Yes | Replies to comments in public. See Reply Object. |
like | object | Yes | Likes comments. See Like Object. |
message | object | Yes | Sends a DM to the people who comment. See Message Object. |
chat | object | Yes | Answers direct messages sent to the account. See Chat Object. |
story | object | Yes | Sends a DM to the people who reply to an Instagram Story. See Story Object. |
Deletes new comments that match. On YouTube, other people's comments are hidden with the moderation status rejected instead. See the Delete Module.
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Turns the module on. With false, the other fields are saved but not used. |
type | string | Yes | How a comment is picked: keyword deletes comments that contain one of keywords, ai asks the AI whether the comment fits prompt. |
keywords | string[] | Yes | Words or phrases to delete on, used by keyword. Case-insensitive, and a comment matches when it contains one anywhere. Send [] when type is ai. Empty ones are ignored. |
prompt | string | Yes | What the AI should delete, used by ai, for example Delete spam, scam links, and hate speech. Send "" when type is keyword. |
Posts a public reply under new comments. See the Reply Module.
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Turns the module on. With false, the other fields are saved but not used. |
type | string | Yes | Where the reply comes from: text always sends text, keyword sends the matching item of keyword.values, ai lets the AI write it from prompt. |
text | string | Yes | The reply for text. Supports {name} for the commenter's name and spintax such as {Hi|Hello}. Send "" for the other types. |
image | object | No | An image posted with every reply, whatever the type. Sent on Facebook, Threads, TikTok, and LinkedIn, and ignored on Instagram and YouTube. See image Object. |
image. | string | Yes | Public URL of the image. The platform downloads it from here. |
image. | string | Yes | MIME type of the image, like image/jpeg or image/png. |
image. | string | No | Smaller preview shown in Repliz. It isn't sent to the platform. |
prompt | string | Yes | Instructions for ai: tone, language, and what the reply should say. Send "" for the other types. |
isIncludeContentContext | boolean | Yes | Used by ai. With true, the AI also reads the post's title, type, caption, and media, so it can answer questions about the post itself. |
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 replies, used by keyword. For the other types, send it with values: []. |
keyword. | boolean | Yes | false: a keyword matches when the comment contains it. true: the whole comment must equal the keyword. Case-insensitive either way. |
keyword. | array | Yes | Keyword and reply pairs. They're checked in order and the first match is sent. A comment that matches none gets the reply of the item with an empty keyword, or no reply when there is none. |
keyword. | string | Yes | The word or phrase to match. Leave it empty for the default reply to comments no other keyword matches, wherever it sits in the list. With more than one empty keyword, the first one is used. |
keyword. | string | Yes | The reply for this keyword. Supports {name} and spintax. |
exception | object | No | Comments that never get a reply. Checked first, for every type. Off when left out. |
exception. | boolean | Yes | Turns the exception list on. |
exception. | boolean | Yes | false: skip comments that contain a keyword. true: skip only comments equal to a keyword. |
exception. | string[] | Yes | Keywords that block the reply, for example ["admin", "giveaway"]. Empty ones are ignored. |
condition | object | Yes | Reply only to comments with one of these keywords. Ignored when type is keyword, because keyword.values already decides. |
condition. | boolean | Yes | Turns the condition on. With false, every comment that passes exception gets a reply. |
condition. | boolean | Yes | false: the comment must contain a keyword. true: it must equal one. |
condition. | string[] | Yes | Keywords a comment needs to get a reply. Empty ones are ignored. |
delay | object | Yes | Waits before replying, so replies don't arrive the same second as the comment. |
delay. | boolean | Yes | Turns the delay on. |
delay. | number | Yes | How long to wait, in seconds. The dashboard offers 10 to 60. |
delay. | string | Yes | Send second. The value is always read as seconds. |
Likes new comments. Runs on Facebook, TikTok, and LinkedIn.
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Likes every new comment from other people. |
Sends a private DM to the person who commented. Runs on Facebook and Instagram. See the Message Module.
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Turns the module on. With false, the other fields are saved but not used. |
type | string | Yes | What is sent: text sends text, ai lets the AI write it from prompt, keyword sends the matching item of keyword.values, opening sends the button flow in opening. |
text | string | Yes | The DM for text. Supports {name} and spintax. Send "" for the other types. |
prompt | string | Yes | Instructions for ai. Send "" for the other types. |
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 | The button flow for opening: First Message, Additional Message, then Follow-up Message with your links. See Opening Flow. Send it for every type. |
opening. | object | Yes | First Message, sent right after the comment. Its button only asks the person to tap, which lets Repliz send the rest. |
opening. | boolean | Yes | With false, the flow starts at additional, or at webUrl if that is off too. |
opening. | string | Yes | Message text. Supports {name} and spintax. |
opening. | string | No | Public image URL shown above the text. |
opening. | object | Yes | The one button of this message. |
opening. | string | Yes | Send postback. |
opening. | string | Yes | Button label, for example Send me the link. |
opening. | string | No | Set by Repliz when the automation is saved. Any value you send is replaced. |
opening. | string | No | Not used by postback buttons. Send "". |
opening. | object | Yes | Additional Message, sent when the person taps the First Message button. Same fields as postback, plus isPreventBeforeFollow. |
opening. | boolean | Yes | With false, tapping the First Message button sends webUrl straight away. |
opening. | boolean | Yes | Instagram only. With true, the person must follow the account before getting webUrl. Until then, tapping the button sends this message again. |
opening. | string | Yes | Message text, for example Follow us first, then tap the button again. Supports {name} and spintax. |
opening. | string | No | Public image URL shown above the text. |
opening. | object | Yes | The one button of this message, with the same fields as opening.postback.button. |
opening. | object | Yes | Follow-up Message, the last step, with the links you want to give. |
opening. | string | No | button (default) sends text, image, and buttons. element sends a carousel of elements instead. |
opening. | string | Yes | Message text, used by button. Supports {name} and spintax. |
opening. | string | No | Public image URL shown with the message, used by button. |
opening. | array | Yes | Up to 3 link buttons, each { "type": "web_url", "title", "url" }, used by button. Send [] when type is element. |
opening. | array | No | 1 to 10 carousel cards, required when type is element. See Carousel. |
opening. | string | Yes | Card title, cut to 80 characters. Supports {name} and spintax. |
opening. | string | No | Text under the title, cut to 80 characters. Supports {name} and spintax. |
opening. | string | No | Public URL of the card image. |
opening. | string | No | Link opened when the card itself is tapped. |
opening. | array | Yes | Up to 3 link buttons on the card, each { "type": "web_url", "title", "url" }. Can be []. |
keyword | object | Yes | Keyword DMs, used by keyword, with the same isExactMatch and values as in Reply. For the other types, send it with values: []. |
keyword. | string | Yes | The word or phrase to match. Leave it empty for a fallback that answers comments no other keyword matches, wherever it sits in the list. With more than one empty keyword, the first one is used. |
keyword. | string | No | text (default) sends text. opening sends this keyword's own opening. See Keyword with Buttons. |
keyword. | string | When type is text | The DM for this keyword. Supports {name} and spintax. |
keyword. | object | When type is opening | Same structure as opening. Dropped on save when type is text. |
keyword. | string | No | Set by Repliz for items with type: "opening". Send it back unchanged when you update, so the buttons in DMs already sent keep working. |
condition | object | Yes | DM only comments with one of these keywords, with the same fields as in Reply. Ignored when type is keyword. |
delay | object | Yes | Waits before sending, with the same fields as in Reply. Keep it short for Instagram Live comments. |
Sends a DM to people who reply to an Instagram Story. Runs on Instagram only. It has the same fields as the Message Object, except isIncludeLiveComment, and its condition and keyword are matched against the text of the story reply. See the Story Module.
Answers direct messages sent to the account. Account level only, on Facebook, Instagram, TikTok, and Telegram. It answers every incoming message, not only the first one in a conversation. See the Chat Module.
| Field | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes | Turns the module on. With false, the other fields are saved but not used. |
type | string | Yes | What is sent: text sends text, ai lets the AI write it from prompt, keyword sends the matching item of keyword.values. |
text | string | Yes | The answer for text. Supports {name} and spintax. Send "" for the other types. |
prompt | string | Yes | Instructions for ai, for example what the business sells and how to answer. Send "" for the other types. |
keyword | object | Yes | Keyword answers, used by keyword, with the same fields as the Message keyword, including the empty fallback keyword. On Facebook and Instagram, an item can answer with buttons. |
delay | object | Yes | Waits before answering, with the same fields as in Reply. |
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"
}