Comments
Send Private Reply
Sends a direct message to the author of a comment on Instagram or Facebook. You can send one private reply per comment, within 7 days of the comment.
POST
header
x-api-key<token>Workspace API key, sent in the x-api-key header. Keys start with op_ and are created in the dashboard.
application/json- body
post?stringOnepostly post id or platform-native post id. Native ids also need accountId. You can omit it when you pass destinationId.
Length
1 <= lengthaccountId?stringLength
1 <= lengthdestinationId?stringDestination id. It identifies one destination on its own, so post and accountId become optional.
Length
1 <= lengthcommentId*stringPlatform-native comment id.
Length
1 <= lengthtext*stringLength
1 <= length <= 2000Sent
application/json- response
reply*Example Request
import { Configuration, CommentsApi } from "@onepostly/sdk";const commentsApi = new CommentsApi( new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await commentsApi.createPrivateReply({ body: { "post": "1699f415-7fb6-43f4-9d2a-c447491f32a8", "commentId": "c0", "text": "Thanks! Check your DMs." },});console.log(response);Example Response
{ "reply": { "postId": "string", "destinationId": "string", "platform": "string", "commentId": "string", "reply": { "id": "string", "text": "string", "timestamp": "string" } }}