Create Comment API
The Create Comment API posts a top-level comment on Instagram, Facebook, LinkedIn, YouTube, or Twitter/X, publishes a new post on Threads when postId is used, and can reply to an existing comment on any supported platform. Choose postId for a top-level comment or commentId for a reply, and send the required platform, accountId, and text fields with POST /v1/comments.
Create a Comment operation summary
Use this endpoint when you want to attach a new comment directly to a piece of content, or when you want to respond underneath a comment that already exists. The supported platforms are Instagram, Facebook, LinkedIn, YouTube, Threads, and Twitter/X, but the meaning of the target identifier changes with your goal. Supplying postId points the call at the underlying post, media item, video, or tweet. Supplying commentId points it at a specific comment thread entry instead. Threads is the notable exception for postId: there it publishes fresh content rather than adding a comment beneath existing content.
Request
Send POST /v1/comments with the x-access-key header and Content-Type application/json. The Create Comment API request headers example shows the exact headers, and the Create Comment API request body example shows the JSON body shape, using {{API_BASE_URL}} before the unchanged /v1/comments path. Before sending, confirm that platform is one of the supported enum values, accountId is the integration identifier for the connected account, text contains the comment text, and exactly one of postId or commentId is present.
Body parameters
The body parameters table maps each field, its type, whether it is required, and how it is used. The platform field accepts instagram, facebook, linkedin, youtube, threads, or twitter. The accountId field is the integration identifier obtained from list_integrations. The text field carries the comment text. For postId and commentId, treat them as alternatives: provide either postId or commentId, not both. A common failure check is to verify that a reply request does not accidentally include postId alongside commentId, and that a top-level comment request does not include commentId alongside postId.
Platform behavior
Behavior varies by platform in ways that matter for routing logic. For Instagram, Facebook, and LinkedIn, postId yields a top-level comment. For Threads, postId yields a new post. YouTube is listed among the supported targets for this operation, while the source field table does not include YouTube in the postId parenthetical, so treat that specific mapping as qualified rather than table-documented. Twitter/X works differently again: every comment there is a reply tweet. Sending a tweet identifier through postId replies to that tweet, while sending a reply-tweet identifier through commentId replies to that reply. That Twitter/X path carries a stated cost of 5 credits, rising to 50 when the text includes a link, and it needs the tweet.write scope. The same reply-tweet outcome is also reachable through the posting API by setting platformSpecificData.replyToTweetId.
Response
A successful response returns success and commentId, as shown in the Create Comment API response example. Store the returned commentId if your workflow needs to reference the created comment later, for example when listing comments or following up on a reply. Do not assume additional response fields beyond success and commentId, because no other fields are documented for this endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
| platform | string | Yes | instagram, facebook, linkedin, youtube, threads, or twitter |
| accountId | string | Yes | Integration ID from list_integrations |
| postId | string | One of | Platform post/media ID. Creates a top-level comment (Instagram, Facebook, LinkedIn) or new post (Threads) |
| commentId | string | One of | Platform comment ID to reply to. Creates a reply on any platform |
| text | string | Yes | Comment text |
Exact source contract fields for POST /v1/comments; provide either postId or commentId, not both.
| Platform | postId behavior | commentId behavior | Notes |
|---|---|---|---|
| Top-level comment on a post/media ID | Reply to an existing comment | Use postId for top-level comment | |
| Top-level comment on a Page post | Reply to an existing comment | Use postId for top-level comment | |
| Top-level comment on a post | Reply to an existing comment | Use postId for top-level comment | |
| YouTube | Supported platform/target; postId parenthetical in source table does not list YouTube | Reply to an existing comment | Qualified mapping; do not treat as table-documented |
| Threads | New post | Reply to an existing comment | postId does not create a top-level comment |
| Twitter/X | Reply tweet to a tweet ID passed as postId | Reply to a reply tweet ID passed as commentId | A comment is a reply tweet; requires tweet.write scope; source states 5 credits, or 50 if text contains a link |
Platform-specific behavior as stated in the source contract for POST /v1/comments. YouTube postId mapping is qualified: source table parenthetical does not list YouTube.
Frequently asked questions
Should I send postId or commentId?
Provide either postId or commentId, not both. Use postId for a top-level comment or, on Threads, a new post. Use commentId to reply to an existing comment.
How does the Create Comment API behave on Twitter/X?
For Twitter/X, every comment is sent as a reply tweet. Supplying a tweet identifier through postId targets that tweet, while supplying a reply-tweet identifier through commentId targets that earlier reply. The documented cost is 5 credits, or 50 when the text includes a link, and the tweet.write scope is required.
What does a successful response contain?
The documented response contains success and commentId. In the example, success is true and commentId is COMMENT_ID.
{{API_BASE_URL}}POST /v1/comments
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json
{
"platform": "instagram",
"accountId": "INTEGRATION_ID",
"postId": "MEDIA_ID",
"text": "An example comment."
}{
"success": true,
"commentId": "COMMENT_ID"
}POST /v1/comments
x-access-key: YOUR_ACCESS_KEY
Content-Type: application/json{
"platform": "instagram",
"accountId": "INTEGRATION_ID",
"postId": "MEDIA_ID",
"text": "An example comment."
}