Pages in API reference

Webhooks

Update a webhook

PATCH/api/webhooks/endpoints/:webhookId

Change a webhook's URL, events or description, turn it on or off, or rotate its secret (the response then has the new secret, the only time it is shown).

  • While a webhook is off no events are queued for it.
  • Turning it back on resets its failure count; events it missed are not sent, so resend the ones you need with webhooks_redeliver.
  • A webhook turned off because its key or app was revoked (disabledReason: "key_revoked") can only be turned on in the dashboard.
  • Changing the URL or rotating the secret ties the webhook to the calling key or app.
Key scope
webhooks:write
MCP tool
webhooks_update

Headers

  • Authorizationstringrequired

    Bearer <API key>. Create a key in the dashboard under API keys.

Path parameters

  • webhookIdstringrequired

    Webhook id (UUID): id from webhooks_list or webhooks_create

Body

  • urlstring

    Public 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)[]

    Events to send to this URL

  • descriptionstring | null

    Your note for this webhook, at most 200 characters

  • enabledboolean

    Turn the webhook on or off. Turning it on clears disabledReason and the failure count.

  • rotateSecretboolean

    True: replace the signing secret. The old one stops working at once.

Errors return { error: { code, message } }; every code is in Error codes.