Skip to main content
POST
/
v1
/
comments
curl -X POST https://api.infinipost.co/v1/comments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_123",
    "postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
    "text": "Amazing content! 🔥",
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "commentId": "cmt_xyz789",
  "accountId": "acc_123",
  "username": "@youraccounthandle",
  "postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
  "text": "Amazing content! 🔥",
  "scheduledTime": "2024-04-22T12:00:00Z",
  "createdAt": "2024-04-21T20:25:00Z"
}
TikTok only. Commenting is currently supported on TikTok posts only.

Request Body

accountId
string
required
The account ID to comment from.
postLinks
array
required
Array of TikTok post links to comment on (your own posts or other users’).How to get a post link:
  1. Open TikTok and navigate to the post you want to comment on
  2. Tap the Send to arrow button in the bottom right corner of the post
  3. Tap Copy link
The copied link will look like: https://www.tiktok.com/@username/video/7123456789012345678
scheduledTime
string
ISO 8601 timestamp for when to post the comment. If not provided, comments immediately.
text
string
required
The comment text.

Response

commentId
string
Unique identifier for the created comment task.
accountId
string
Account that created the comment.
username
string
TikTok username of the account that created the comment.
postLinks
array
The TikTok post links that were commented on.
text
string
Comment text.
scheduledTime
string
ISO 8601 timestamp of when the comment is scheduled to be posted.
createdAt
string
ISO 8601 timestamp of when the comment task was created.
curl -X POST https://api.infinipost.co/v1/comments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_123",
    "postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
    "text": "Amazing content! 🔥",
    "scheduledTime": "2024-04-22T12:00:00Z"
  }'
{
  "commentId": "cmt_xyz789",
  "accountId": "acc_123",
  "username": "@youraccounthandle",
  "postLinks": ["https://www.tiktok.com/@username/video/7123456789012345678"],
  "text": "Amazing content! 🔥",
  "scheduledTime": "2024-04-22T12:00:00Z",
  "createdAt": "2024-04-21T20:25:00Z"
}

Error Responses

Unauthorized
{
  "error": {
    "code": "unauthenticated",
    "message": "Invalid or missing API key"
  }
}
Invalid Parameter
{
  "error": {
    "code": "invalid_parameter",
    "message": "postLinks is required and must be a non-empty array"
  }
}
Account Not Found
{
  "error": {
    "code": "not_found",
    "message": "Account acc_1a2b3c4d5e not found"
  }
}
Platform Not Supported
{
  "error": {
    "code": "invalid_parameter",
    "message": "Commenting is only supported for TikTok accounts"
  }
}
Server Error
{
  "error": {
    "code": "internal",
    "message": "An unexpected error occurred"
  }
}