Skip to main content
A webhook endpoint gets the events in its events list, each as a signed POST with a JSON body. This page shows that body for every event. To add an endpoint, see Create a webhook. To check that a request came from PostSyncer, see Verify webhook signatures. To try your handler on your own machine first, see Test webhooks locally.

The request

Every event comes in the same envelope. This is the one Send a test event sends:
The request carries these headers: These rules hold for every event:
  • One event, one id. Every retry, and every Send again in the app, sends the same id and the same data. Keep the ids you have handled and skip one you’ve seen.
  • data is kept from the first send. It is built the first time the event is sent, so a retry hours later still tells you what happened then. To see a post as it is now, use Get a post.
  • Events can arrive out of order. A post.published can come before the last post.account_published of the same post. Don’t rely on the order they arrive in.
  • Two kinds of times. A post’s own fields give times in the workspace’s time zone as Y-m-d H:i, such as 2030-03-15 09:00, as Get a post does. Every other time is ISO 8601, such as 2030-03-15T09:00:41+00:00.
  • New fields can appear. data can get new fields, and a field that names a kind, such as platform or status, can get new values. Ignore the fields you don’t know. New events are added too, but an endpoint only gets the events in its list. See Versioning.

Events at a glance

Which events an endpoint gets

An endpoint gets an event when all of these hold:
  • It is on (active is true), and the event is in its events list.
  • The event happened in the endpoint’s workspace, or in one of its workspace_ids. Another workspace’s events reach it only while the person who set it up still owns that workspace or is a member of it. With ["*"], it gets the events of every workspace that person owns.
  • It has no account_ids, or the event is about one of those accounts: a post on one of them, or the account itself.
posts.bulk_removed, media.generated, media.generation_failed, brand.learned and team.member_joined are about no account, so an endpoint with account_ids never gets them. Endpoints don’t follow anyone’s notification settings. An endpoint gets every event in its list, even one nobody gets an email or a bell notification for. webhook.test is the exception to the rest: Send a test event sends it to the one endpoint you test, while it is on. A test to an endpoint that is off fails with The destination is off.

Post data

post.published, post.partially_published, post.failed, post.account_published, post.account_failed, post.scheduled and post.needs_media send the post as data. It has the same fields as Get a post, and these next to them: The approval events send the same post fields in post, without accounts.

Accounts

Each item of accounts: fix.label is the button the app shows for the fix, and fix.url opens the place in the app to do it. Both are null for a code with no button.

Fix codes

A post refused because the Free plan’s posts for the month are used up arrives today with fix.code "retry", and its error says the posts are used. Sending it again fails until they reset, so don’t retry it on its own: check the workspace’s plan first.

When the post is gone

If the post was deleted before the event was first sent, and always for post.deleted, the post fields are only these, and there is no accounts:
post.account_published and post.account_failed keep their account_id next to them, and post.needs_media its reason and stopped. In an approval event, post is this object.

Accounts and people

In the events below, account is always { "id", "platform", "name", "username" }. actor is the person who did it, { "id", "name" }.

post.published

Every account of the post is live. The post’s status is PUBLISHED, and each account has its post_url. Right after a post goes out its numbers aren’t read yet, so analytics.pending is true.

post.partially_published

Some accounts are live and some failed. The post’s status is PARTIALLY_FAILED. The failed accounts come first in accounts, each with its error and fix.

post.failed

No account went live. The post’s status is FAILED, and each account in accounts has its error and fix.

post.account_published

Sent as each account goes live. The post-level event can still arrive first. account_id names the account, and other accounts of the post can still be sending.

post.account_failed

Sent for each account that fails. account_id names the account, and its item in accounts has the error and fix.

post.scheduled

Sent when a post is scheduled or added to the queue, and when it gets a new time while it waits there. Editing only the words of a scheduled post, or the time of a draft, sends nothing. The post’s status is SCHEDULED or IN_QUEUE.

post.deleted

Sent when a whole post is deleted, in the app, with the API or with MCP. Taking some accounts off a post in the app isn’t a delete. data is only the post’s id, workspace_id and deleted_at.

post.needs_media

Sent when AI media a post was waiting for failed, or someone stopped it, before the post went out. The media is taken off the post. A post that hadn’t gone out moves to drafts and keeps its time. A post that went out and repeats stops repeating. stopped tells you which happened. reason is the failure in words, or The AI media for this post was stopped before it finished. when someone stopped it.

posts.bulk_removed

Sent when one API key or AI agent takes 10 or more scheduled posts off the schedule (moves them to drafts) or deletes them within an hour. It is sent once per key or agent and hour. A person working in the app doesn’t cause it. removed.unscheduled posts are in Drafts. removed.deleted posts are gone. removed.first_at and removed.last_at are the first and the last removal. by.surface is rest (the API), mcp (an AI connector) or chat (the in-app chat). by.client is the agent’s name, or null when PostSyncer doesn’t know it. by.api_key is { "id", "name" }, or null when the agent signed in without a key. by.user is the person whose key or sign-in it was, { "id", "name" } or null. The workspace owner and managers also get an email and an app notification, with a link that puts the posts back at their times. That link works without a sign-in, so it is not in the webhook.

approval.requested

Sent when a post is sent for review. actor is who sent it. post has the same fields as Get a post, and its status is PENDING_APPROVAL.

approval.approved

Sent when a post is approved. actor is who approved it. The post moves on as the approval chose: scheduled, published or kept as a draft.

approval.rejected

Sent when a post is rejected. actor is who rejected it, and reason is what they wrote, or null.

account.needs_reconnect

Sent when an account has to be connected again before it can post. reason is why, in words, or null when PostSyncer doesn’t know. Create a connect link gives a link to reconnect it.

account.expires_soon

Sent when the sign-in of an account that can’t renew it ends within 7 days, and again within 1 day. days is 7 or 1, and expires_at is when the sign-in ends. Reconnect the account before then.

account.paused

Sent when the platform puts the account’s publishing on hold, for example until its owner confirms their identity, or while the account is locked or suspended. Sort it out on the platform.

account.connected

Sent when an account is added to the workspace. actor is who connected it, or null when PostSyncer can’t tell.

account.disconnected

Sent when an account is removed from the workspace. actor is who removed it, or null when PostSyncer can’t tell.

account.posts_to_put_back

Sent when a profile that was disconnected is connected again to the same workspace, within 90 days, and posts the old account was on can get the new one back. Nothing changes until someone chooses, in the app or with Put an account back on its posts. account is the new account. put_back.posts is how many posts can get it back. put_back.scheduled_again is how many of them the disconnect moved to drafts, which go back on the schedule. put_back.disconnected_at is when the profile was disconnected. The account’s published posts are linked to it again on their own, with their numbers and comments. No event is sent for that.

comment.mentioned

Sent once for each person tagged in a team comment, the comments your team writes on a post in PostSyncer. Tagging yourself sends nothing. actor wrote the comment, and mentioned is the person tagged. comment.parent_comment_id is the comment it answers, or null. comment.quote is the part of the post the comment quotes, or null. There is no media.

comment.received

Sent when someone else comments on a published post. Your team’s own comments and replies don’t send it. Neither do the comments a post already had when PostSyncer first read them. There is no comment id: list the post’s comments to find it. comment.media lists the photos, GIFs, videos and audio clips in the comment, in the order it shows them, each { "type", "mime_type", "url", "sensitive" }. type is image, video or audio: the type of the file PostSyncer saved, so a video or GIF PostSyncer keeps as its still comes as image. sensitive is true when the network marked the picture sensitive, for example a Mastodon post marked sensitive or a Bluesky post with an adult or graphic label. url is a link to PostSyncer’s copy of the file. It is made with the rest of data, when the event is first sent, and works for about two and a half days from then (at least 59 hours). That covers every automatic retry, but a Send again after that sends a link that no longer works, so download the file if you want to keep it. url is null when PostSyncer couldn’t make the link. Instagram doesn’t share the pictures in comments, so there media is [], and media_hidden_by_platform is true when the comment holds a GIF, sticker or photo Instagram didn’t share. Instagram sends such a comment with no text, and a webhook sends empty text as null, so its content is null (API v1 returns it as ""). On Threads, a GIF in a reply with text isn’t kept.

share.comment_received

Sent when a client comments on a post through its share link. comment.author_name is the name they gave. There is no media.

review.received

Sent when a new review comes in on a Google Business Profile location. The first read of a location brings in its past reviews, and those send nothing. There is no review id: list the location’s reviews to find it. review.reviewer_name is null for an anonymous review. review.star_rating is 1 to 5.

media.generated

Sent when an AI image or video is ready. media.kind is image or video, and media.error is null. media.title is the start of the prompt: its first 100 characters, followed by ... when the prompt is longer. For an image or video made in Chat it is a neutral title instead, such as Your Chat image is ready, Your Chat image was added to your post (Chat put it into the post it was made for) or A Chat video didn't finish: a chat’s prompt stays with the member who wrote it. A video that took too long can still arrive after media.generation_failed. It is then sent as media.generated, at no charge.

media.generation_failed

Sent when an AI image or video couldn’t be made. media.error says why, in words, or is null. media.title follows the same rules as in media.generated.

brand.learned

Sent when the brand brain learns something on its own: after setup, after a newly connected account’s past posts come in, and after a weekly update that learned something. It is not sent when someone asks it to learn in Settings → Brand. It carries no brand text, so read the brand with Get the brand to see what changed.
  • version is the brand’s version after it learned.
  • source is setup (the build from the website and past posts) or weekly (the weekly update).
  • changes is how many fields it changed, not counting the accounts’ numbers.
  • sections are the keys of the sections that changed, in this order: identity, voice, look, accounts, competitors, learnings, rules.

team.member_joined

Sent when someone accepts an invitation to the workspace. member.role is the role they joined with: Manager, Content Manager, Content Creator or Client.

webhook.test

Sent by Send a test event, or the test button in the app, to that one endpoint. message is always This is a test event from PostSyncer.