Skip to content

Update Status Comment Sync ​

PUThttps://api.repliz.com/public/listener/{listenerId}/status

Pause or resume a comment sync. A paused sync keeps its progress.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): listener:write
  • Access Tier: Gold+

Parameters ​

ParameterTypeRequiredDescription
listenerIdstringYesID of the comment sync, the _id from Get Comment Sync or the listenerId from Create Comment Sync.

Request Body ​

FieldTypeRequiredDescription
statusstringYespaused stops checking the post and keeps its progress, active resumes it right away.

Example Request ​

bash
curl -X PUT "https://api.repliz.com/public/listener/6913a5c2e4b0a1f2c3d4e5f6/status" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "paused"
  }'
javascript
import axios from 'axios';

const listenerId = '6913a5c2e4b0a1f2c3d4e5f6';

const response = await axios.put(
  `https://api.repliz.com/public/listener/${listenerId}/status`,
  { status: 'paused' },
  {
    auth: {
      username: 'YOUR_ACCESS_KEY',
      password: 'YOUR_SECRET_KEY',
    },
  },
);

console.log(response.status);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const listenerId = '6913a5c2e4b0a1f2c3d4e5f6';

const response = await fetch(`https://api.repliz.com/public/listener/${listenerId}/status`, {
  method: 'PUT',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ status: 'paused' }),
});

console.log(response.status);

Response ​

json
// No content returned on success
json
{
  "code": 400,
  "message": "status must be one of the following values: active, paused"
}
json
{
  "code": 404,
  "message": "comment sync not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}