Inbox and comment automations
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.
curl "https://postkea.com/api/v1/inbox?status=open&sentiment=negative&limit=20" \
-H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/inbox?status=open&sentiment=negative&limit=20", {
headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` },
});
const { data: inbox } = await res.json();
console.log(inbox);import os, requests
r = requests.get(
"https://postkea.com/api/v1/inbox",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
params={
"status": "open",
"sentiment": "negative",
"limit": 20,
},
)
inbox = r.json()["data"]
print(inbox)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}/replyanswers on the network and marks the item replied.PATCH /v1/inbox/{id}setsstatusorhidden. 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}/ideasaves 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."
}'const res = await fetch("https://postkea.com/api/v1/inbox/cmt_5Gd2/reply", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Yes, we ship to Canada. Delivery takes about a week.",
}),
});
const { data: reply } = await res.json();
console.log(reply);import os, requests
r = requests.post(
"https://postkea.com/api/v1/inbox/cmt_5Gd2/reply",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"text": "Yes, we ship to Canada. Delivery takes about a week.",
},
)
reply = r.json()["data"]
print(reply)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"
}'const res = await fetch("https://postkea.com/api/v1/conversations/conv_8Kq1/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Thanks for reaching out. Here is the link to the workshop: https://studiolumen.com/workshops",
}),
});
const { data: message } = await res.json();
console.log(message);import os, requests
r = requests.post(
"https://postkea.com/api/v1/conversations/conv_8Kq1/messages",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"text": "Thanks for reaching out. Here is the link to the workshop: https://studiolumen.com/workshops",
},
)
message = r.json()["data"]
print(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.
{
"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.