English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/watcher/{watcherId}Replace the settings of a keyword watch. Send every field, as in Create Keyword Watch: a field left out is cleared, for example knowledgeIds.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizwatcher:write| Parameter | Type | Required | Description |
|---|---|---|---|
watcherId | string | Yes | ID of the keyword watch, the _id from Get Keyword Watch or the watcherId from Create Keyword Watch. |
The same as Create Keyword Watch.
accountId keeps the progress and the found posts.accountId starts over: the posts the previous account found are deleted, and the new account only picks up posts published after the change.keyword or criteria only affects posts found from now on.curl -X PUT "https://api.repliz.com/public/watcher/6913a5c2e4b0a1f2c3d4e5f6" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"keyword": "rekomendasi kopi",
"filter": {
"mode": "KEYWORD",
"type": "",
"username": "",
"isIncludeReplies": false
},
"excludes": [
"lowongan",
"giveaway"
],
"criteria": "Orang yang minta rekomendasi kedai kopi di Jakarta, bukan iklan atau berita.",
"accountId": "680affa5ce12f2f72916f67e",
"reply": {
"type": "ai",
"prompt": "Balas sebagai tim Kopi Kita: singkat, ramah, rekomendasikan cabang Kemang.",
"knowledgeIds": [
"6911b2c3d4e5f6a7b8c9d0e1"
],
"approval": "review"
}
}'import axios from 'axios';
const watcherId = '6913a5c2e4b0a1f2c3d4e5f6';
const response = await axios.put(
`https://api.repliz.com/public/watcher/${watcherId}`,
{
keyword: 'rekomendasi kopi',
filter: {
mode: 'KEYWORD',
type: '',
username: '',
isIncludeReplies: false,
},
excludes: ['lowongan', 'giveaway'],
criteria: 'Orang yang minta rekomendasi kedai kopi di Jakarta, bukan iklan atau berita.',
accountId: '680affa5ce12f2f72916f67e',
reply: {
type: 'ai',
prompt: 'Balas sebagai tim Kopi Kita: singkat, ramah, rekomendasikan cabang Kemang.',
knowledgeIds: ['6911b2c3d4e5f6a7b8c9d0e1'],
approval: 'review',
},
},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.status);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const watcherId = '6913a5c2e4b0a1f2c3d4e5f6';
const response = await fetch(`https://api.repliz.com/public/watcher/${watcherId}`, {
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
keyword: 'rekomendasi kopi',
filter: {
mode: 'KEYWORD',
type: '',
username: '',
isIncludeReplies: false,
},
excludes: ['lowongan', 'giveaway'],
criteria: 'Orang yang minta rekomendasi kedai kopi di Jakarta, bukan iklan atau berita.',
accountId: '680affa5ce12f2f72916f67e',
reply: {
type: 'ai',
prompt: 'Balas sebagai tim Kopi Kita: singkat, ramah, rekomendasikan cabang Kemang.',
knowledgeIds: ['6911b2c3d4e5f6a7b8c9d0e1'],
approval: 'review',
},
}),
});
console.log(response.status);// No content returned on success{
"code": 400,
"message": "keyword watch only works with Threads accounts"
}{
"code": 404,
"message": "keyword watch not found"
}{
"code": 401,
"message": "unauthorized"
}