Webhooks
Register a webhook
POST
https://postifuse.com/v1/webhooksRegister a URL. Each event is signed with Postifuse-Signature (HMAC SHA-256 of the raw body) and retried with backoff for 24 h. Every event carries the profile and its external_id, so you route it to the right client without a lookup.
curl --request POST \
--url 'https://postifuse.com/v1/webhooks' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://app.example.com/hooks/postifuse",
"events": [
"post.delivered",
"post.failed",
"post.held",
"account.paused"
]
}'
const res = await fetch("https://postifuse.com/v1/webhooks", {
method: "POST",
headers: {
"Authorization": "Bearer pf_live_…",
"Content-Type": "application/json"
},
body: JSON.stringify({
"url": "https://app.example.com/hooks/postifuse",
"events": [
"post.delivered",
"post.failed",
"post.held",
"account.paused"
]
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://postifuse.com/v1/webhooks",
headers={"Authorization": "Bearer pf_live_…"},
json={
"url": "https://app.example.com/hooks/postifuse",
"events": [
"post.delivered",
"post.failed",
"post.held",
"account.paused"
]
},
)
print(res.json())
{
"id": "whk_3",
"secret": "whsec_…",
"events": [
"post.delivered",
"post.failed",
"post.held",
"account.paused"
]
}
{
"error": "workspace_not_active",
"message": "The workspace for this key is not active yet.",
"docs": "https://postifuse.com/docs/errors/"
}
Headers
AuthorizationstringrequiredBearer followed by a workspace key, a profile key or an OAuth token. See authentication.
Example Bearer pf_live_…
Body application/json
urlstring<uri>requiredYour HTTPS endpoint.
Example https://app.example.com/hooks/postifuse
eventsarray<string>requiredThe events to receive.
One of post.scheduled post.held post.delivered post.failed approval.decided account.paused account.disconnected media.ready post.unpublished
Example ["post.delivered","post.failed","post.held","account.paused"]
Response
200The webhook and its secret
403Workspace not active
Events
| Event | When |
|---|---|
media.ready | The per-network versions of an adjusted file are ready |
post.scheduled | A post is accepted for at least one account |
post.held | A post needs a person for one account (a video too long, a file to convert); the payload says what to do. Text problems are corrected, not held |
post.delivered | One account published; one event per account, with the live URL |
post.failed | The network refused at publish time |
post.unpublished | A post was taken down from one account |
approval.decided | A person approved or rejected a post |
account.paused | Paused by you, or by Postifuse after a network warning |
account.disconnected | The token expired or the owner revoked it; send them a new connect link |