Comments
Reply to a Comment
Replies to a comment as the account that published the post.
BearerAuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*stringA comment id from List Comments or a comment event. It only works in the workspace that received it.
1 <= length <= 512Idempotency-Key?stringA 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.
1 <= length <= 255application/json- body
text*stringThe comment text. The platform's own limit applies, such as 300 characters on Bluesky or 2,200 on Instagram. A longer text returns TEXT_TOO_LONG.
1 <= length <= 25000Created reply
application/json- response
id*stringThe comment's id. Use it to reply to, hide, like or delete the comment.
postId*stringThe post the comment is on.
accountId*stringThe account that published the post.
platform*|The platform id. New platforms can be added, so handle a value you do not know.
platformCommentId*stringThe platform's own id for the comment.
parentId*|The comment this one replies to, or null for a comment on the post.
text*stringusername*|The author's username, without a leading @. Null when the platform does not share it.
likeCount*|Likes on the comment. Null when the platform does not report it.
createdAt*|When the comment was posted. Null when the platform does not report it.
date-timereplies*array<>Replies, on platforms that return them with the comment.
import { Configuration, CommentsApi } from "@onepostly/sdk";const commentsApi = new CommentsApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await commentsApi.replyToComment({ id: "cmt_YOUR_COMMENT_ID", commentTextBody: { "text": "Glad you liked it." },});console.log(response);{ "id": "cmt_ztfnHfaU0iNb9UBUuNnnxN8waYgVvu3Y12mVBDR6dweXoMSb4tn0DeDwvC0IeIW2SQEWLo9bNYoYFOPhESI4pxuKjN5txdk2pDjSaIaePIKjvOpsFJ26lA", "postId": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73", "accountId": "acc_1699f4157fb643f49d2ac447491f32a8", "platform": "instagram", "platformCommentId": "18063456789012399", "parentId": "cmt_YOUR_COMMENT_ID", "text": "Glad you liked it.", "username": null, "likeCount": 0, "createdAt": "2027-03-15T10:00:00.000Z", "replies": []}