Comments
Create Reply
Replies to one published destination or platform-native post.
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 <= lengthtext*stringLength
1 <= length <= 25000parentCommentId?stringPlatform-native id of the comment to reply to. Omit it to reply to the post itself.
Length
1 <= lengthCreated
application/json- response
comment*Example Request
import { Configuration, CommentsApi } from "@onepostly/sdk";const commentsApi = new CommentsApi( new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await commentsApi.createComment({ createCommentBody: { "post": "1699f415-7fb6-43f4-9d2a-c447491f32a8", "text": "Love this!", "parentCommentId": "c0" },});console.log(response);Example Response
{ "comment": { "id": "c1", "text": "Love this!", "username": "jane_doe", "likeCount": 12, "timestamp": "2026-08-25T10:05:00.000Z", "parentId": "string", "replies": [ {} ] }}