Inbox and comment automations

Comments, mentions, reviews and direct messages from every connected account in one place. Each comment is labeled with its sentiment, and keyword rules can answer publicly or by DM for you.

Comments, mentions and reviews

GET /v1/inbox lists everything newest first. Comments are collected on X, Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Mastodon, Google Business, Reddit. The inbox refreshes every 10 minutes; POST /v1/inbox/sync (optionally with an accountId) fetches new items right away.

NameTypeDescription
kindcomment | mention | reviewComments on your posts, mentions of your accounts, or Google Business reviews.
statusopen | replied | archivedopen for unanswered items, replied or archived.
accountIdstringOnly this account.
platformstringOnly this platform.
sentimentpositive | neutral | negativeOnly comments with this sentiment.
qstringSearch the text.
targetIdstringOnly comments on this published post (a platform target id from the post).
limitintegerUp to 100, 30 by default.
cursorstringFrom nextCursor of the previous page.
curl "https://postkea.com/api/v1/inbox?status=open&sentiment=negative&limit=20" \
  -H "Authorization: Bearer $POSTKEA_API_KEY"

GET /v1/inbox/stats returns the last 30 days (total, open, replied, answered within 24 hours), the comment score, the sentiment mix, open items per platform and unread messages.

Reply, hide and organize

  • POST /v1/inbox/{id}/reply answers on the network and marks the item replied.
  • PATCH /v1/inbox/{id} sets status or hidden. Hiding also hides the comment on the network on Facebook, Instagram, Threads, X and YouTube.
  • DELETE /v1/inbox/{id} deletes the comment on the network, where allowed.
  • POST /v1/inbox/{id}/idea saves a good comment as a post idea.
  • For reply suggestions in your brand voice, send the comment to POST /v1/ai/replies, see AI endpoints.
curl -X POST "https://postkea.com/api/v1/inbox/cmt_5Gd2/reply" \
  -H "Authorization: Bearer $POSTKEA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Yes, we ship to Canada. Delivery takes about a week."
}'

Direct messages

Direct messages are available on X, Instagram, Facebook, Bluesky, Telegram. GET /v1/conversations lists conversations (filter by accountId or unread=true), GET /v1/conversations/{id} returns the messages, and POST /v1/conversations/{id}/messages sends one.

curl -X POST "https://postkea.com/api/v1/conversations/conv_8Kq1/messages" \
  -H "Authorization: Bearer $POSTKEA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Thanks for reaching out. Here is the link to the workshop: https://studiolumen.com/workshops"
}'
Networks limit when a business may reply. Instagram and Facebook, for example, only allow replies within 24 hours of the person's last message.

Saved replies

Saved replies are reusable answers for the whole team: GET and POST /v1/saved-replies with a title and body, and DELETE /v1/saved-replies/{id}.

Comment to DM automations

A comment automation watches the comments of one account. When a new comment contains one of the keywords, it sends the commenter a direct message, posts a public reply, or both. Use it for "comment LINK and we will send it to you" campaigns.

NameTypeDescription
accountIdrequiredstringThe account to watch.
namerequiredstringA name for the rule.
keywordsrequiredstring[]Words that trigger the rule. Case does not matter.
matchModecontains | exactcontains matches a keyword anywhere in the comment, exact only when the whole comment is the keyword.Default: contains
platformPostIdstring | nullOnly comments on this post. Leave it out for every post of the account.
dmMessagestring | nullDirect message to send. {name} and {handle} are replaced with the commenter's name and handle.
publicReplystring | nullPublic reply under the comment.
activebooleanTurn the rule on or off.Default: true
POST /v1/comment-automations
{
  "accountId": "acc_ig_5t1p",
  "name": "Workshop link",
  "keywords": [
    "link",
    "workshop"
  ],
  "dmMessage": "Hi {name}, here is the booking link: https://studiolumen.com/workshops",
  "publicReply": "Sent you a DM with the link."
}

Every match is logged with whether the DM and the reply were sent, and any error: GET /v1/comment-automations/{id}/logs. Update a rule with PATCH and remove it with DELETE.

Events

New comments send comment.received and new unread messages send message.received to your webhooks. New comments can also trigger an automation with the new_comment trigger.