Skip to content
postpeg

Comments

Read and answer comments on posts you published through postpeg. Available on Instagram, Facebook, LinkedIn and Threads.

List comments

GET/v1/posts/{id}/comments

Top-level comments, each with the replies the network returns inline (there may be fewer than reply_count). Pass next_cursor back as cursor for the next page. author.is_owner is true for comments written by the connected account itself.

curl https://api.postpeg.com/v1/posts/post_mfz2k3v8q1w5e9r4t7y0u2i6o3/comments \
  -H "Authorization: Bearer $POSTPEG_KEY"
Response · 200 OK
{
  "data": [
    {
      "id": "17998765432109876",
      "account_id": "acc_mfz20b5n1s8f4j7xv2p9r6hu1c",
      "platform": "instagram",
      "text": "Does this work with scheduled posts I already made?",
      "author": {
        "id": "17841400123456789",
        "username": "ren.builds",
        "name": "Ren",
        "avatar_url": null,
        "is_owner": false
      },
      "created_at": "2026-10-01T10:12:44.000Z",
      "like_count": 2,
      "reply_count": 1,
      "parent_id": null,
      "is_hidden": false,
      "url": null,
      "replies": [
        {
          "id": "18034567890123456",
          "account_id": "acc_mfz20b5n1s8f4j7xv2p9r6hu1c",
          "platform": "instagram",
          "text": "Yes, every scheduled post gets retries, old and new.",
          "author": {
            "id": "17841400987654321",
            "username": "acmecoffee",
            "name": "Acme Coffee",
            "avatar_url": null,
            "is_owner": true
          },
          "created_at": "2026-10-01T10:20:02.000Z",
          "like_count": 0,
          "reply_count": null,
          "parent_id": "17998765432109876",
          "is_hidden": false,
          "url": null,
          "replies": []
        }
      ]
    }
  ],
  "next_cursor": null
}

Comment or reply

POST/v1/posts/{id}/comments

Create comment fields
FieldDescription
textstring, 1–8000 · requiredWhat to say.
reply_tostringA comment id to reply to. Leave out to comment on the post itself.
account_idstringWhich account to use. Needed when the post went to more than one account that supports comments; see below.

Send an Idempotency-Key header so a retry never posts the same reply twice.

curl https://api.postpeg.com/v1/posts/post_mfz2k3v8q1w5e9r4t7y0u2i6o3/comments \
  -H "Authorization: Bearer $POSTPEG_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: reply-17998765432109876" \
  -d '{
    "text": "Yes, every scheduled post gets retries, old and new.",
    "reply_to": "17998765432109876"
  }'
Response · 201 Created
{
  "id": "18034567890123456",
  "account_id": "acc_mfz20b5n1s8f4j7xv2p9r6hu1c",
  "platform": "instagram",
  "reply_to": "17998765432109876"
}

Hide a comment

POST/v1/posts/{id}/comments/{comment_id}/hide

A hidden comment stays visible to its author only. Send "hidden": false to show it again. Returns 204. Works on Instagram, Facebook and Threads; LinkedIn doesn’t support hiding.

curl https://api.postpeg.com/v1/posts/post_mfz2k3v8q1w5e9r4t7y0u2i6o3/comments/17998765432109876/hide \
  -H "Authorization: Bearer $POSTPEG_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "hidden": true
  }'
Response · 204 No Content
(empty body)

Posts on several accounts

If the post went to one account that supports comments, postpeg uses it. If it went to several, pass account_id (a query parameter when listing, a body field when replying or hiding). Without it you get a 400 that lists the choices:

Response · 400 Bad Request
{
  "type": "https://postpeg.com/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The post is on several accounts; pass account_id (one of: acc_mfz1y4r9h2c6t0wqk8e3m7ld5f, acc_mfz20b5n1s8f4j7xv2p9r6hu1c)",
  "code": "invalid_request",
  "request_id": "8f14e45f-ceea-467a-9575-1f2a5c3e6b0d"
}