Use case
Social media webhooks for post status and failures
Socifyr sends a signed HTTP POST to your endpoint when a post finishes or fails. Events are upload.completed, upload.failed, upload.partial_failure, plus per-platform platform.success and platform.failed. Each request carries an X-Webhook-Signature header (sha256=HMAC of the body), and the SDK includes verifyWebhookSignature. Webhooks are available on the Business plan.
Register an endpointVerify with the SDK
How it works
- 1
Register an endpoint
POST /api/webhooks with a url and the events you want. The response includes the signing secret. - 2
Verify every request
Compute an HMAC-SHA256 of the raw body with your secret and compare it to the X-Webhook-Signature header. Reject mismatches. - 3
React to the event
Mark a CMS entry as published, alert a channel on failure, or kick off a retry for a failed platform. - 4
Debug with delivery logs
GET /api/webhooks/:id/deliveries lists recent attempts with status codes, kept for 30 days.
Working code
curl -X POST https://api.socifyr.com/api/webhooks \
-H "Authorization: Bearer sk_your_key" \
-H "X-Workspace-Id: your_workspace_id" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/hooks/socifyr",
"events": ["upload.completed", "upload.failed", "upload.partial_failure"],
"description": "Publishing status"
}'import { verifyWebhookSignature, parseWebhookEvent } from '@socifyr/sdk'
// Express-style handler; req body must be the raw bytes you received
export function handler(raw: Buffer, signature: string | undefined) {
const isValid = verifyWebhookSignature(raw, signature, process.env.WEBHOOK_SECRET!)
if (!isValid) throw new Error('Invalid signature')
const event = parseWebhookEvent(raw)
// route on the parsed event type here
return event
}Replace sk_your_key and the workspace ID with your own from the dashboard, and use your own connection slugs.
Who this is for
Teams syncing publish state back into a CMS or database
Avoid polling and update your own records the moment a post lands.On-call and ops teams
Page or post to Slack when a scheduled post fails.Automation builders
Trigger the next step of a pipeline from a publish event.
Frequently asked questions
Which events can I subscribe to?
upload.completed, upload.failed, upload.partial_failure, platform.success and platform.failed.
Which plan includes webhooks?
Business. It allows up to 25 webhook endpoints. Free and Pro can poll GET /api/content/status instead.
How do I verify a webhook came from Socifyr?
Check X-Webhook-Signature, formatted as sha256=<hex>, against an HMAC-SHA256 of the raw body using your endpoint secret. The SDK exposes verifyWebhookSignature for this.
Can I see past deliveries?
Yes. The deliveries endpoint returns recent attempts with status codes and responses for 30 days.
What is the alternative without webhooks?
Poll GET /api/content/status?requestId=..., or call waitForCompletion in the SDK, which polls for you.