Create a webhook
POST
/api/webhooks/endpointsSend events to an https URL.
- Ampost POSTs each event as JSON, signed with the webhook's secret (
Ampost-Signature), and retries a failed delivery 7 times (1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h). - After 5 deliveries in a row fail all retries the webhook is turned off.
- At most 10 webhooks.
- The response is the only one with the full
secret: store it now. - Revoking the key or app that created the webhook turns it off.
- Events: post.scheduled, post.unscheduled, post.discarded, post.published, post.partial, post.failed, post.platform.published, post.platform.failed, post.platform.deleted, post.platform.edited, post.approval_requested, post.approved, post.rejected, account.connected, account.disconnected, account.needs_reconnect, analytics.synced.
- Webhooks see every platform set, so keys restricted to some sets get 403 PLATFORM_SET_NOT_ALLOWED.
- Key scope
- webhooks:write
- MCP tool
- webhooks_create
- Retries
- Safe with an Idempotency-Key
Headers
AuthorizationstringrequiredBearer <API key>. Create a key in the dashboard under API keys.Idempotency-KeystringA unique value per logical request, so a retry never creates a second post. See Idempotency.
Body
urlstringrequiredPublic https URL that receives the events. Private, loopback, internal and Ampost's own hosts are rejected.
events(post.scheduled | post.unscheduled | post.discarded | post.published | post.partial | post.failed | post.platform.published | post.platform.failed | post.platform.deleted | post.platform.edited | post.approval_requested | post.approved | post.rejected | account.connected | account.disconnected | account.needs_reconnect | analytics.synced)[]requiredEvents to send to this URL
descriptionstring | nullYour note for this webhook, at most 200 characters
Errors return { error: { code, message } }; every code is in Error codes.