ValeronDocs

Webhooks

Create a webhook endpoint

POST/v1/webhook-endpoints

Requires the scope webhooks:write

Have events sent to an https:// URL. events lists the event types to send (contact.stage_changed, meeting.booked, message.received, recording.analyzed), or ["*"] for all. The answer carries the signing secret (whsec_…) this once: every delivery has a Valeron-Signature: t=<unix seconds>,v1=<signature> header, where the signature is the hex HMAC-SHA256 of <t>.<raw body> keyed by the secret. Check it, and refuse a t more than 5 minutes old. A 2xx within 10 seconds is success; otherwise the delivery is tried again 1 minute, 5 and 30 minutes, and 2, 5, 10 and 24 hours after the event. An endpoint whose deliveries all fail for 3 days is switched off and the Owner is told. Order is not guaranteed: use the event id to ignore a repeat and the object's updated_at to ignore an older state. At most 10 endpoints (409 webhook_endpoint_limit).

#Request body

application/json
descriptionstring or null
eventsstring[]required
Allowed values: "*" "recording.analyzed" "contact.stage_changed" "contact.created" "contact.updated" "meeting.booked" "message.received" "payment.succeeded"
Items: 1 to 8
urlstringrequired

#Responses

201Successful Response
Show response fieldsHide response fields
created_atstring (date-time)required
descriptionstring or nullrequired
disabled_reasonstring or nullrequired
eventsstring[]required
Allowed values: "*" "recording.analyzed" "contact.stage_changed" "contact.created" "contact.updated" "meeting.booked" "message.received" "payment.succeeded"
failing_sincestring (date-time) or nullrequired
idstringrequired
is_enabledbooleanrequired
secretstringrequired
updated_atstring (date-time)required
urlstringrequired

#Errors

Errors use the standard error shape.

StatusMeaning
400The request is not valid.
401Not signed in, or the credentials are not valid.
402The balance is too low.
403Not allowed to do this.
404Not found.
409Conflicts with the current state.
413The request body is too large.
415The content type is not supported.
422A value in the request is not valid.
429Too many requests. Wait for Retry-After seconds.
500Something went wrong on our side.
502A service Valeron depends on refused the request.
503A service Valeron depends on is unavailable.