Comments

Send Private Reply

Sends a direct message to the author of a comment. Supported on Instagram and Facebook, once per comment and within 7 days of it.

POST
/v1/comments/{id}/private-reply

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string

A comment id from List Comments or a comment event. It only works in the workspace that received it.

Length1 <= length <= 512

Header Parameters

Idempotency-Key?string

A unique key, such as a UUID, that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the first response instead of acting again. A 429 or 5xx response is not kept, so a retry with the same key runs again.

Length1 <= length <= 255

Request Body

application/json
  1. body
text*string

The message text, up to 1,000 characters on Instagram and 2,000 on Facebook. A longer text returns TEXT_TOO_LONG.

Length1 <= length <= 2000

Response Body

Sent message

application/json
  1. response
id*string

The platform's id for the message.

commentId*string

The comment the message answers.

text*string

The message text as sent.

createdAt*string

When the message was sent.

Formatdate-time
Example Request
import { Configuration, CommentsApi } from "@onepostly/sdk";const commentsApi = new CommentsApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await commentsApi.sendPrivateReply({  id: "cmt_YOUR_COMMENT_ID",  privateReplyBody: {    "text": "Thanks! Check your DMs."  },});console.log(response);
Example Response
{  "id": "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDAxMjM0NTY3ODk6MzQwMjgyMzY2ODQxNzEwMzAwOTQ5MTI4MTM3NjE5NzM2Mzg3MTI4",  "commentId": "cmt_YOUR_COMMENT_ID",  "text": "Thanks! Check your DMs.",  "createdAt": "2027-03-15T10:00:00.000Z"}