Webhooks
Hear about publishing outcomes and account health without polling.
Delivery is asynchronous, so a 202 from the publish endpoint tells you the post was accepted, not that it is live. Webhooks are how you find out what actually happened without polling: FoPost POSTs a signed JSON event to your endpoint when a post publishes, a delivery fails, or a connected account's credentials degrade.
These endpoints need the webhooks scope, and work from the API, the SDKs, or the CLI.
Subscribe
POST /v1/webhookscurl -X POST https://api.fopost.com/v1/webhooks \
-H "X-API-Key: $FOPOST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "7d2b8c11-4e5a-4a8f-b0d9-3c5e6f7a8b90",
"url": "https://yourbrand.com/hooks/fopost",
"events": ["post.published", "post.partially_failed", "delivery.failed"]
}'workspaceId, url, and at least one event are required; the names are on the events page. Use an HTTPS URL your server exposes publicly; deliveries come from the open internet.
The response carries the webhook's signing secret. It is returned only on creation and cannot be shown or rotated later. To rotate, create a new webhook and delete the old one. It is what you verify the signature with.
Manage
| Endpoint | What it does |
|---|---|
GET /v1/webhooks | List your subscriptions, with lastTriggeredAt and failureCount. Spans every workspace you belong to |
PUT /v1/webhooks/{id} | Change the URL, the events, or active. Setting active: true also resets the failure count |
POST /v1/webhooks/{id}/test | Send a test event. See test deliveries for how it behaves |
DELETE /v1/webhooks/{id} | Delete it |
Workspace viewers can list webhooks but not create, change, or delete them.
The shape of a delivery
Every event arrives as a POST with a three-key JSON body:
{
"event": "delivery.published",
"data": { "postId": "…", "accountId": "…", "platform": "linkedin", "externalUrl": "…" },
"timestamp": "2026-09-01T09:00:12.000Z"
}There is no id inside the body: the delivery id travels in the X-FoPost-Delivery header, which is also what you deduplicate on. The full per-event data shapes are on the events page.
In this section
Next
Related documentation
- Events
Every webhook event FoPost can send, when it fires, and its payload.
- Verifying Signatures
Prove a delivery came from FoPost before acting on it.
- Retries and Failures
Timeouts, retry backoff, auto-disable, and test deliveries.
- API Overview
Base URL, envelopes, pagination, and errors for the FoPost REST API.
- SDKs Overview
Every official FoPost client, what it covers, and how to pick one.
- Automations and Webhooks
Trigger automations and manage webhook subscriptions from the terminal.