POST
/
comments
Available on Premium, Business, Enterprise plans.

Add a comment to a post with an Ayrshare Post ID (posts sent via Ayrshare) or a Social Post ID (posts sent outside of Ayrshare) using the Comments API.

  • Comments added to an X Thread will be posted to the first Tweet.
  • Instagram Story comments are not yet supported by Meta.
  • See the platforms field below for supported platforms depending on the ID type.

Please see the Comments Overview for more information on the different ID types.

Header Parameters

Authorization
string
required
API Key of the Primary Profile.

Format: Authorization: Bearer API_KEY
Profile-Key
string
Profile Key of a User Profile.

Format: Profile-Key: PROFILE_KEY

Body Parameters

id
string
required

Ayrshare Post ID or Social Post ID from the /post endpoint.

comment
string
required

Text of the new comment to add to the post.

searchPlatformId
boolean
default: false

Set to true if posting a comment using the Social Post ID, which is the post id from the social networks.

platforms
array
required

Specify the platforms to add comments.

If using an Ayrshare Post ID the supported platforms are: facebook, instagram, linkedin, reddit, tiktok, twitter, youtube.

If no platforms are specified, the comment will be published to all connected platforms that support comments.

Post a Comment with the Ayrshare Post ID
{
  "id": "Ut1fWU6XkqkMayHGnJZ", // Ayrshare Post ID
  "comment": "An amazing comment!", // required
  "platforms": [
    "facebook",
    "instagram",
    "linkedin",
    "reddit",
    "tiktok",
    "twitter",
    "youtube"
  ]
}

If using a Social Post ID the supported platforms are -only one platform allowed at a time : facebook, instagram, linkedin, tiktok, twitter.

Post a Comment with the Social Post ID
{
  "id": "1288899996423983105", // Social Post ID
  "comment": "An amazing comment!", // required
  "searchPlatformId": true, // required
  // facebook, instagram, linkedin, tiktok, twitter
  "platforms": ["facebook"] // Only specify one platform
}
mediaUrls
array

Attach an image by providing the image URL for Facebook or X/Twitter.

Only one image is supported in the mediaUrls field. Supported platforms are Facebook and X/Twitter.
Post a Comment with an Image
{
  "id": "Ut1fWU6XkqkMayHGnJZ", // Ayrshare Post ID
  "comment": "An amazing comment!", // required
  "platforms": ["facebook"], // Facebook or X/Twitter only
  "mediaUrls": ["https://img.ayrshare.com/gb.jpg"]
}