Skip to main content

Comments (all platforms)

List, create, delete, and moderate comments on your posts across multiple social networks with a single, consistent API. These endpoints call each platform's native API in real-time using the connection stored for the given profile.

Every operation is one endpoint with a platform, never one endpoint per network — the same reason /audience, /suggestions and /post-analytics are shaped that way. A network that cannot do something yet answers 400 with error_code: "platform_not_supported" and names the ones that can.

Platform support

PlatformListCreateDeleteRepliesHide / Like / PinNotes
InstagramCreating a comment requires comment_id (you can only reply to an existing comment).
FacebookWorks on comments on your Page posts.
YouTubeThe connected account must be authorized with the youtube.force-ssl scope (see below).
LinkedInOrganization (company page) posts. Use the post URN as post_id.
TikTokNeeds a reconnected TikTok account (the comments capability). post_id is the video id. See below.

Replies are the same listing narrowed to a parent (comment_id on List Comments); hide / like / pin are one endpoint with a verb.

TikTok requires a reconnected account: TikTok grants comment permission at the moment the account is connected, so only accounts reconnected from Manage Users report comments in their capabilities array. An account connected earlier keeps publishing normally, but every comment call answers 400 with error_code: "tiktok_reconnect_required" until its owner reconnects it. Check capabilities before showing a comment inbox in your UI.

TikTok post identifier: For TikTok, post_id is the video id — the same post_id the upload returns. post_url is accepted and treated as the video id, so pass the id.

YouTube scope requirement: Reading, creating, and deleting comments requires the youtube.force-ssl OAuth scope. Accounts connected before this scope was added must reconnect their YouTube account in Upload-Post to grant it. Older connections will fail with a permission error until reconnected.

LinkedIn post identifier: For LinkedIn, post_id (and post_url) is the post URN, e.g. urn:li:ugcPost:1234567890. This same URN is used to list, create, and delete comments.

YouTube post identifier: For YouTube, post_id is the video ID (e.g. dQw4w9WgXcQ).


List Comments

Retrieve comments on one of your posts. Returns the comments as provided by the target platform.

Add comment_id and the same call returns the replies under that comment instead of the post's top-level comments. It is not a different URL: it is the same question — show me the comments — narrowed to a parent.

Endpoint

GET /api/uploadposts/comments

Headers

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication

Query Parameters

NameTypeRequiredDescription
platformStringNoOne of instagram, facebook, youtube, linkedin, tiktok. Defaults to instagram.
userStringYesProfile username (as configured in Upload-Post).
post_idStringYes*Post identifier. YouTube = the video ID; TikTok = the video id; LinkedIn = the post URN (urn:li:ugcPost:...); Instagram = numeric media ID. Use post_id or post_url.
post_urlStringYes*Full post URL. Alternative to post_id.
limitIntegerNoMaximum comments to return per page.
afterStringNoPagination cursor returned in the previous response. Pass it back to fetch the next page.
comment_idStringNoTikTok. Return the replies hanging off this comment instead of the post's top-level comments. post_id is still required.

* Provide either post_id or post_url (one is required).

Example Requests

Instagram:

curl 'https://api.upload-post.com/api/uploadposts/comments?platform=instagram&user=my-profile&post_id=17890455123456789&limit=50' \
-H 'Authorization: Apikey your-api-key-here'

YouTube (post_id is the video ID):

curl 'https://api.upload-post.com/api/uploadposts/comments?platform=youtube&user=my-profile&post_id=dQw4w9WgXcQ' \
-H 'Authorization: Apikey your-api-key-here'

LinkedIn (post_id is the post URN):

curl 'https://api.upload-post.com/api/uploadposts/comments?platform=linkedin&user=my-profile&post_id=urn:li:ugcPost:1234567890' \
-H 'Authorization: Apikey your-api-key-here'

TikTok (post_id is the video id):

curl 'https://api.upload-post.com/api/uploadposts/comments?platform=tiktok&user=my-profile&post_id=7401234567890123456&limit=20' \
-H 'Authorization: Apikey your-api-key-here'

TikTok — the replies under one comment (add comment_id):

curl 'https://api.upload-post.com/api/uploadposts/comments?platform=tiktok&user=my-profile&post_id=7401234567890123456&comment_id=7401234567890999888&limit=20' \
-H 'Authorization: Apikey your-api-key-here'
A comment you just wrote takes ~10 seconds to appear

TikTok indexes a new comment or reply asynchronously. Listing immediately after creating one returns a list without it — the call succeeded, the comment exists, TikTok has simply not indexed it yet. Wait about 10 seconds before re-listing, or render the comment you just created from the create response instead of re-fetching. An empty list right after a write is not a failure.

Successful Response (200 OK)

{
"success": true,
"comments": [
{
"id": "17858893269123456",
"text": "Great post!",
"timestamp": "2025-06-15T10:30:00+0000",
"user": {
"id": "17841400123456789",
"username": "commenter_user"
}
}
],
"pagination": {
"next_cursor": "QVFIUm9TbGd...",
"has_next": true
}
}

The exact comment fields vary by platform (each network returns its own shape). Pagination fields are present when the platform supports cursor-based paging.

Error Responses

  • 400 Bad Request — missing parameters, invalid post identifier, or an unsupported platform.
  • 400 Bad Requesterror_code: "tiktok_reconnect_required": the TikTok connection cannot manage comments. The account owner must reconnect it from Manage Users.
  • 403 Forbidden — the connected account lacks the required scope (e.g. YouTube not connected with youtube.force-ssl).
  • 409 Conflict — the TikTok token expired and the account must be reconnected ("reauth_required": true).
  • 500 Internal Server Error

Create Comment

Post a comment or a reply. Provide exactly one of comment_id, post_id, or post_url to identify the target:

  • comment_id → reply to that comment.
  • post_id / post_url → top-level comment on that post.

Instagram: only replies are supported — you must provide comment_id. Instagram does not allow creating a top-level comment via the API.

TikTok: post_id (the video id) is always required, on a top-level comment and on a reply alike. Adding comment_id on top of it turns the call into a reply to that comment. You can only comment on your own videos.

Endpoint

POST /api/uploadposts/comments/create

Headers

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication
Content-Typeapplication/jsonRequest body format

Body Parameters (JSON)

NameTypeRequiredDescription
platformStringYesOne of instagram, facebook, youtube, linkedin, tiktok.
userStringYesProfile username (as configured in Upload-Post).
messageStringYesThe comment text.
comment_idStringYes*Reply to this comment. Required for Instagram.
post_idStringYes*Top-level comment on this post. LinkedIn = the post URN (urn:li:ugcPost:...); YouTube = the video ID; TikTok = the video id, required even when replying.
post_urlStringYes*Top-level comment on this post (by URL). Alternative to post_id.

* Provide exactly one of comment_id, post_id, or post_url — except on TikTok, where post_id is always required and comment_id is added to it to reply.

Example Requests

Reply to a comment (Instagram):

curl -X POST https://api.upload-post.com/api/uploadposts/comments/create \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "instagram",
"user": "my-profile",
"comment_id": "17858893269123456",
"message": "Thanks for your comment!"
}'

Reply to a TikTok comment (post_id AND comment_id):

curl -X POST https://api.upload-post.com/api/uploadposts/comments/create \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "tiktok",
"user": "my-profile",
"post_id": "7401234567890123456",
"comment_id": "7401234567890999888",
"message": "Thanks! The full guide is in the bio."
}'

Top-level comment on a LinkedIn post (post_id is the URN):

curl -X POST https://api.upload-post.com/api/uploadposts/comments/create \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "linkedin",
"user": "my-profile",
"post_id": "urn:li:ugcPost:1234567890",
"message": "Great update!"
}'

Successful Response (200 OK)

{
"success": true,
"id": "17858893269654321",
"message": "Comment created successfully"
}

On TikTok the answer names the platform and returns TikTok's own result object:

{
"success": true,
"platform": "tiktok",
"result": { "comment_id": "7401234567890777111" }
}

Error Responses

  • 400 Bad Request — missing fields, more than one target provided, Instagram without comment_id, TikTok without post_id, or an unsupported platform.
  • 400 Bad Requesterror_code: "tiktok_reconnect_required": the TikTok connection cannot manage comments; reconnect the account.
  • 403 Forbidden — the connected account lacks the required scope.
  • 409 Conflict — the TikTok token expired ("reauth_required": true).
  • 500 Internal Server Error

Delete Comment

Delete a comment you own (or that is on your post). Accepts DELETE or POST.

Endpoint

DELETE /api/uploadposts/comments/delete

This endpoint also accepts POST with the same body, for clients that cannot send a body with DELETE.

Headers

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication
Content-Typeapplication/jsonRequest body format

Body Parameters (JSON)

NameTypeRequiredDescription
platformStringYesOne of instagram, facebook, youtube, linkedin, tiktok.
userStringYesProfile username (as configured in Upload-Post).
comment_idStringYesThe ID of the comment to delete.
post_idStringYes*Required for LinkedIn only — the post URN (urn:li:ugcPost:...) the comment belongs to.

* post_id is required for LinkedIn; ignored for the other platforms. TikTok deletes a comment from its comment_id alone — and only a comment written by the connected account itself.

Example Requests

Delete a Facebook comment:

curl -X DELETE https://api.upload-post.com/api/uploadposts/comments/delete \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "facebook",
"user": "my-profile",
"comment_id": "17858893269123456"
}'

Delete a LinkedIn comment (post_id required):

curl -X DELETE https://api.upload-post.com/api/uploadposts/comments/delete \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "linkedin",
"user": "my-profile",
"comment_id": "urn:li:comment:(urn:li:ugcPost:1234567890,9876543210)",
"post_id": "urn:li:ugcPost:1234567890"
}'

Successful Response (200 OK)

{
"success": true,
"message": "Comment deleted successfully"
}

Error Responses

  • 400 Bad Request — missing fields, LinkedIn without post_id, or an unsupported platform.
  • 400 Bad Requesterror_code: "tiktok_reconnect_required": the TikTok connection cannot manage comments; reconnect the account.
  • 403 Forbidden — the connected account lacks the required scope, or you do not own the comment.
  • 409 Conflict — the TikTok token expired ("reauth_required": true).
  • 500 Internal Server Error

Hide, Like or Pin a Comment

Moderate a comment on one of your own posts. One endpoint, because every action here is a verb that carries its own inverse: hide / unhide, like / unlike, pin / unpin. You send the verb you want, never a boolean, so replaying a request can never flip a comment back to where it started.

Endpoint

POST /api/uploadposts/comments/action

Headers

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication
Content-Typeapplication/jsonRequest body format

Body Parameters (JSON)

NameTypeRequiredDescription
platformStringYesThe network to act on. Today only tiktok; anything else answers 400 with error_code: "platform_not_supported".
userStringYesProfile username (as configured in Upload-Post).
comment_idStringYesThe comment to act on.
actionStringYesOne of hide, unhide, like, unlike, pin, unpin.
post_idStringConditionalThe post the comment hangs from. Required for hide, unhide, pin and unpin; do not send it for like / unlike — a like is resolved from the comment alone.

Example Requests

Hide a comment:

curl -X POST https://api.upload-post.com/api/uploadposts/comments/action \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "tiktok",
"user": "my-profile",
"comment_id": "7401234567890999888",
"action": "hide",
"post_id": "7401234567890123456"
}'

Like a comment (no post_id):

curl -X POST https://api.upload-post.com/api/uploadposts/comments/action \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "tiktok",
"user": "my-profile",
"comment_id": "7401234567890999888",
"action": "like"
}'

Pin a comment to the top of the post:

curl -X POST https://api.upload-post.com/api/uploadposts/comments/action \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"platform": "tiktok",
"user": "my-profile",
"comment_id": "7401234567890777111",
"action": "pin",
"post_id": "7401234567890123456"
}'

To undo any of them, send the inverse verb with the same body: unhide, unlike, unpin.

Successful Response (200 OK)

{
"success": true,
"platform": "tiktok",
"action": "hide",
"comment_id": "7401234567890999888"
}

The echoed action is the confirmation to branch on.

Error Responses

  • 400 Bad Request — a platform that cannot moderate comments yet:
{
"success": false,
"error": "'instagram' cannot act on comments yet. Supported: tiktok.",
"error_code": "platform_not_supported"
}
  • 400 Bad Request — an action outside the six verbs:
{ "success": false, "error": "action must be one of: hide, like, pin, unhide, unlike, unpin" }
  • 400 Bad Requestpost_id omitted on hide / unhide / pin / unpin:
{ "success": false, "error": "post_id is required to pin a comment" }
  • 400 Bad Requesterror_code: "tiktok_reconnect_required": the TikTok connection cannot manage comments; reconnect the account.
  • 404 Not Found — profile not found.
  • 409 Conflict — the TikTok token expired ("reauth_required": true).
  • 502 Bad Gateway — the platform rejected the operation; its message comes back in error.

Additional Notes

  • Only comments on your own posts can be moderated. Anything else is refused upstream and comes back as a 502 carrying the platform's message.
  • Pinning is exclusive: pinning a second comment moves the pin, it does not add one.
  • A comment you hide stays visible to whoever wrote it — that is TikTok's own behaviour, not something this API changes.