workspace

Create a webhook endpoint

Registers an outbound webhook endpoint and returns it with its full signingSecret. Use the secret to verify each delivery’s x-saperly-signature: v1=<hex> header (HMAC-SHA256 over ${x-saperly-timestamp}.${rawBody}).

post/workspaces/{slug}/webhooks

Request

  • Base URL: https://api.saperly.com
  • URL: https://api.saperly.com/workspaces/{slug}/webhooks
  • Auth: none required

Path parameters

slugstring required

The workspace's URL slug.

Request body

urlstring required

The HTTPS URL Saperly will POST each subscribed event to.

eventsstring[] required

The event types this endpoint subscribes to (e.g. call.completed, message.received). At least one.

descriptionstring nullable

An optional human label for the endpoint.

Response

Success

idstring required
urlstring required

The HTTPS URL Saperly POSTs each subscribed event to.

enabledboolean required
eventsstring[] required

The event types this endpoint is subscribed to.

successRatenumber required

Delivery success rate (0–100) over all recorded attempts for this endpoint; 100 when there are none yet.

signingSecretstring required

The endpoint signing secret (whsec_…). Verify each delivery by recomputing HMAC-SHA256 over ${x-saperly-timestamp}.${rawBody} and comparing (constant-time) against the hex in the x-saperly-signature: v1=<hex> header.

Changes

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