Receive events with webhooks
Have Trabbly send your server a signed message when a post is published, publishing fails, or a reviewer decides.
On this page
Webhooks tell your own systems when something happens in Trabbly, so they don't need to keep asking the API. They are part of the Enterprise plan. Owners and admins add and manage them.
Events
| Event | Sent when |
|---|---|
post.published |
A post was published on a platform. |
post.failed |
Publishing a post failed. |
approval.decided |
A reviewer approved a post or asked for changes. |
Add a webhook
- Open Settings, then API access.
- Under Webhooks, select Add webhook.
- Enter Your server's address. It must be a public HTTPS address.
- Under Events to send, tick the events you want.
- Choose the brands, or All brands.
- Select Add webhook.
The signing secret is shown only once. Keep it with your server's settings: you use it to check that each event really comes from Trabbly.
An organisation can have up to 10 webhooks.
What Trabbly sends
A JSON POST with:
id: the event's own id, for exampleevt_01jb8z6y0q4m7v2k3n5p9r1s2t.type: the event, for examplepost.published.created_at: when it happened, in UTC.organisation_id: your organisation.data: the post id, the platform version (variant_id), the brand id, the platform (network), the status and, for a published post, itspermalink.
post.failed includes the reason, and approval.decided includes the stage, the decision and any note.
Check the signature
Each event carries Trabbly-Signature: t=TIMESTAMP,v1=SIGNATURE. The signature is an HMAC-SHA256 of the timestamp, a full stop and the raw body, made with your signing secret. Before trusting an event:
- Work out the same HMAC with your secret.
- Compare it with
v1using a constant-time comparison. - Reject events whose timestamp is more than a few minutes old.
The developer guide in the app has a ready-made example.
Answering and retries
- Answer with any 2xx status.
- Other answers are retried up to five more times over about nine hours (after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours).
- After 20 failures in a row the webhook is switched off until you switch it back on.
Trabbly-Deliverystays the same on retries, so you can ignore repeats.- Redirects aren't followed.
Test, switch off or delete
Each webhook has Send test event, Switch off (or Switch on) and Delete. Webhooks are only delivered while your organisation's plan includes the API.
Was this article helpful?
Related articles
- The Trabbly Social APIWhat the public API can do (read brands, posts, media and analytics, upload media, create drafts), who can use it and where the full reference is.
- Create and manage API tokensCreate a token with only the permissions and brands a tool needs, keep it safe, and revoke it at once when it is no longer needed.