API reference
Webhooks: published, failed and reconnect events
A Preflight webhook is an https address the workspace subscribes to the events post.published, post.failed and account.needs_reconnect. Each delivery is a signed JSON POST — HMAC-SHA256 over the timestamp and the raw body — that says which target of which post went live, with its link, or stopped being retried, with its error, or which channel has to be connected again. Anything but a 2xx within 10 seconds is retried five times.
Webhooks
POST /v1/workspace/webhooks
{ "url": "https://example.com/hooks/preflight",
"events": ["post.published", "post.failed", "account.needs_reconnect"] }
→ 201 { "id": "…", "url": "…", "events": [ … ], "secret": "whsec_…" }The address must be https and public. The secret is shown once; the list afterwards shows its last four characters as secretHint. Leave out events to get all of them. Events are post.published, once per target, when it is live; post.failed, sent only once retrying has stopped, so it does not report something that fixes itself; and account.needs_reconnect, once when a channel's sign-in stops working and a refresh could not fix it. Until someone connects it again in Settings, every post scheduled to that channel fails, so this is the alert worth wiring to Slack or Telegram.
POST https://example.com/hooks/preflight
x-preflight-event: post.published
x-preflight-id: 3f1c…
x-preflight-timestamp: 1791300000
x-preflight-signature-v2: t=1791300000,v2=9a4e…
x-preflight-signature: sha256=5f0c…
{ "id": "3f1c…", "event": "post.published", "createdAt": "…",
"data": { "postId": "…", "targetId": "…", "platform": "tiktok",
"remoteId": "…", "remoteUrl": "https://www.tiktok.com/@…/video/…" } }
{ "id": "…", "event": "post.failed", "createdAt": "…",
"data": { "postId": "…", "targetId": "…", "platform": "instagram",
"error": "…", "permanent": true, "attempts": 5 } }
{ "id": "…", "event": "account.needs_reconnect", "createdAt": "…",
"data": { "accountId": "…", "platform": "linkedin", "name": "Acme Inc.",
"reason": "…", "invalidSince": "…", "lastOkAt": "…",
"reconnectUrl": "https://preflight.social/settings" } }Verify x-preflight-signature-v2: take t from the header, compute the hex HMAC-SHA256 of `${t}.${body}` with your secret over the raw request bytes, compare it to v2, and refuse the request when t is more than five minutes from now. That stops a captured request being replayed later. id is the same on every retry of one event, so keep the ids you have handled and ignore a repeat. x-preflight-signature is the older form — the HMAC of the body alone — kept for receivers written against it; new receivers should check the timed one. Re-encoding the JSON before signing produces a signature that will never match. Every header is also sent as x-schedulr-…, the product's name before it was renamed, with the same value, so a receiver written against those names keeps working. Answer with a 2xx within 10 seconds; anything else is retried five times with growing gaps. remoteUrl can be null when a network never reports its link.
Test delivery
POST /v1/workspace/webhooks/{id}/test
{ "event": "account.needs_reconnect" }
→ 200 { "delivered": true, "event": "account.needs_reconnect",
"deliveryId": "…", "status": 200 }
→ 424 { "error": { "code": "webhook_delivery_failed", "message": "The receiver answered 500." },
"event": "…", "deliveryId": "…", "status": 500 }Sends one signed sample of an event to the webhook now and answers with what the receiver said. Use it to map fields in n8n, Make or Zapier, or to check a signature check, before anything real happens. The body is optional; without event it sends the first event the webhook listens to. The delivery has the same headers and fields as a real one, ids that point at nothing, and "test": true next to event, which a real delivery never carries. It is sent once and not retried. Scope webhooks:write, up to 10 a minute.
Questions: info@preflight.social. The same API as a schema: openapi.json (OpenAPI 3.1).
Write it once. Let the rules be our problem.
Preflight checks every post against each network's rules before it leaves, then publishes it to twelve networks. Free plan, no card.