English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/watcher/{watcherId}/match/{matchId}Change the reply of a found post without sending it.
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. |
matchId | string | Yes | ID of the found post, the _id from Get Keyword Watch Post. |
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The reply, up to 500 characters. |
Works on posts with status found, draft, failed, or skipped. A post that is queued or replied fails with 409.
curl -X PUT "https://api.repliz.com/public/watcher/6913a5c2e4b0a1f2c3d4e5f6/match/6913a5c2e4b0a1f2c3d4e5f7" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"text": "Halo! Coba Kopi Kita di Kemang ya."
}'import axios from 'axios';
const watcherId = '6913a5c2e4b0a1f2c3d4e5f6';
const matchId = '6913a5c2e4b0a1f2c3d4e5f7';
const response = await axios.put(
`https://api.repliz.com/public/watcher/${watcherId}/match/${matchId}`,
{
text: 'Halo! Coba Kopi Kita di Kemang ya.',
},
{
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 matchId = '6913a5c2e4b0a1f2c3d4e5f7';
const response = await fetch(`https://api.repliz.com/public/watcher/${watcherId}/match/${matchId}`, {
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Halo! Coba Kopi Kita di Kemang ya.',
}),
});
console.log(response.status);// No content returned on success{
"code": 400,
"message": "reply text should not be empty"
}{
"code": 404,
"message": "post not found"
}{
"code": 409,
"message": "this post was already queued, sent, or changed"
}{
"code": 401,
"message": "unauthorized"
}