Docs menu

API

Webhook events

Add an endpoint and choose its events. Each event is one signed POST with a JSON body; failed deliveries are retried for about 14 hours.

Endpoints

POST /v1/webhooks                                     { "url": "https://yourapp.com/hooks", "events": ["post.published", "dm.received"] }
GET  /v1/webhooks/events                              the event names
POST /v1/webhooks/{webhook_id}/test                   send a webhook.test event now
GET  /v1/webhooks/{webhook_id}/deliveries             the delivery log
POST /v1/webhooks/{webhook_id}/deliveries/{id}/retry  send one delivery again

An empty events list, or "*", subscribes to every event. The URL must be public https; private addresses are refused.

The envelope

{
  "event": "comment.received",
  "data": {
    "id": "8c1e…",
    "platform": "instagram",
    "type": "comment",
    "account_id": "…",
    "brand_id": "…",
    "author": { "id": "1784…", "name": "Asha", "username": "asha.cooks" },
    "content": { "text": "Love this!" },
    "received_at": "2026-11-22T09:14:03Z",
    "platform_post_id": "1790…",
    "permalink": "https://www.instagram.com/p/…"
  },
  "raw_payload": { … }
}
  • Comment, DM and mention events share that data shape. DMs carry platform_id (the message id) and conversation_id; comments carry platform_post_id.
  • raw_payload, when present, is what the platform sent us, untouched.
  • WhatsApp dm.received has metadata.phone_number_id, and for button, list and quick reply taps metadata.payload and metadata.interactive_type. Telegram DMs have metadata.chat_id and metadata.message_id.
  • dm.status.* from WhatsApp: one event per message with id, message_id, recipient_id, status and, on failure, error_code, error_title and error_message. From Facebook and Instagram: one event per receipt with the mids it covers.
  • account.updated has change, for example permissions_reduced with the lost permissions.
  • account.disconnected is sent when the platform cut access (reconnect_required: true), not when you call DELETE /v1/accounts/{id}.

All 25 events

Webhook events
EventWhenSent by
post.scheduledA post was scheduledEvery platform you publish to
post.publishedA post reached every targetEvery platform you publish to
post.failedA post failed on every targetEvery platform you publish to
post.partialA post reached some targets and failed on othersEvery platform you publish to
post.updatedA post was edited (before publishing, or its live text after)Every platform you publish to
post.deletedA post was deletedEvery platform you publish to
post.unpublishedA published post was removed from a platformEvery platform you publish to
post.retriedA failed post was retriedEvery platform you publish to
comment.receivedA new comment arrived on a postInstagram, Facebook (also edited comments), Threads, YouTube, X, Bluesky, LinkedIn Pages
dm.receivedA direct message arrivedInstagram, Facebook, WhatsApp, Telegram, X, Bluesky, Zalo
dm.sentA direct message was sent from the accountReplies sent through the API, and replies typed in the Instagram or Messenger app
dm.referralSomeone opened a conversation from an ad or linkInstagram, Facebook
dm.postbackSomeone tapped a button in a messageInstagram, Facebook (button and quick reply taps)
dm.deletedA message was deleted by its senderInstagram (the sender unsent it)
dm.status.sentA sent message was accepted by the platformWhatsApp
dm.status.deliveredA sent message was deliveredWhatsApp, Facebook, Instagram
dm.status.readA sent message was readWhatsApp, Facebook, Instagram
dm.status.failedA sent message failedWhatsApp
review.receivedA new review arrivedGoogle Business (App Store reviews send no event)
review.updatedA review was editedGoogle Business
mention.receivedThe account was mentioned or taggedInstagram, Threads, X, Bluesky
account.connectedAn account was connectedEvery platform
account.disconnectedThe platform ended access to an account (not sent when you disconnect it yourself)Every platform
account.updatedAn account's status or details changedEvery platform
page.removedA Page is no longer available to its loginFacebook

post.updated also follows an edit of a live post (with changed_fields).

Verify the signature

Each endpoint has its own secret. Compute HMAC-SHA256 of <timestamp>.<raw body> with it and compare, in constant time, with X-SocialHub-Signature-V2 (sha256=<hex>). Reject timestamps more than 5 minutes old. Code for Node and Python is on Webhooks.

Webhook request headers
HeaderValue
X-SocialHub-EventThe event name.
X-SocialHub-DeliveryThe delivery id: the same on every retry and resend. Use it to drop duplicates. Absent on test events.
X-SocialHub-TimestampUnix seconds when this request was signed.
X-SocialHub-Signature-V2sha256=<hex HMAC of timestamp.body>.
X-SocialHub-Signaturesha256=<hex HMAC of the body alone>. Older form without a freshness check: prefer V2.

Retries

  • Answer with any 2xx within 10 seconds. Anything else is a failed attempt.
  • When the attempt fails to connect, or your server answers 429 or a 5xx other than 501, it is sent once more 2 seconds later, inside the same attempt and with the same delivery id.
  • A delivery gets 10 attempts. The waits between them are 10 s, 1 min, 5 min, 15 min, 30 min, 1 h, 2 h, 4 h and 6 h, each varied by up to 10%: about 14 hours in all.
  • After the last attempt the delivery is marked failed and a webhook.delivery_failed entry appears in the event log. Resend it from the dashboard or with the retry endpoint.
  • Deliveries to a disabled endpoint fail at once.