Webhooks

Create a webhook endpoint

Creates a new webhook endpoint for the authenticated organization. The signing secret is returned in the response — this is the only time it will be shown. Use the secret to verify webhook signatures via the X-Astrocal-Signature header.

Astrocal immediately POSTs a verification challenge to the URL, which your endpoint must echo back. The endpoint receives no events until verification_status is verified. Creation always succeeds — check verification_status in the response and retry with POST /v1/webhooks/{id}/verify if it is not yet verified.

An organization may hold at most 50 webhook endpoints.

post/v1/webhooks

Request

  • Base URL: https://api.astrocal.dev
  • URL: https://api.astrocal.dev/v1/webhooks
  • Auth: HTTP bearer

Request body

urlstring uri required
eventsstring[] required
activeboolean

Response

Webhook endpoint created

idstring uuid required
urlstring required
eventsstring[] required
secretstring required
activeboolean required
verification_status'pending' | 'verified' | 'failed' required
verified_atstring nullable required
verification_last_errorstring nullable required
consecutive_failuresinteger required
suspended_atstring nullable required
created_atstring required
updated_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.