Skip to Content
Webhooks

Update a webhook

PATCH
/api/v1/webhooks/{id}

Update webhook properties. Every field is optional, and an omitted field keeps its value.

To move the endpoint to a newer payload shape, set apiVersion. Every delivery after the change uses the new version, including retries of earlier events.

To replace the signing secret, use POST /api/v1/webhooks/:id/rotate-secret.

Plan Requirement: Requires the Team plan or higher, or a sandbox organization.

Authorization

headerAuthorizationBearer <token>

API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.

Path Parameters

id*string

The webhook ID.

Header Parameters

Sajn-Version?string

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Value in"2026-09""2026-10"
Sajn-Workspace?string

ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body

Update webhook request

url?string

URL that will receive webhook events

Formaturi
events?array<>

The event types to subscribe to. Replaces the current list

Items1 <= items
enabled?boolean

Whether this webhook is active

failureNotificationEmail?|

Email address that will be notified if webhook delivery fails

Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
apiVersion?string

API version that determines the payload shape this endpoint receives. Set it to upgrade the endpoint to a newer payload shape

Value in"2026-09""2026-10"

Response Body

Webhook response

application/json
  1. response

Webhook response

id*string

Unique webhook identifier

url*string

URL that receives webhook events

secret?string

Signing secret for this endpoint, in the Standard Webhooks format whsec_<base64>. Returned only when you create the webhook and when you rotate the secret, so store it then.

enabled*boolean

Whether this webhook is active

status*string

DISABLED when enabled is false. PAUSED when sajn stopped delivering because the endpoint failed for three days or answered 410 Gone; resume with POST /api/v1/webhooks/:id/reactivate.

Value in"ENABLED""DISABLED""PAUSED"
pausedAt*|

When sajn paused the webhook. Null unless status is PAUSED.

Formatdate-time
pauseReason*|

Why sajn paused the webhook: HTTP_<status code> for the last answer, such as HTTP_410, or NETWORK_ERROR. Null unless status is PAUSED.

failureNotificationEmail*|

Email address that receives a notification if webhook delivery fails

events*array<>

The event types this webhook subscribes to

apiVersion*string

API version, in YYYY-MM format, that determines the payload shape this endpoint receives

createdAt*string

Date and time when webhook was created

Formatdate-time
updatedAt*string

Date and time when webhook was last updated

Formatdate-time
Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/webhooks/cm4k2x9p10013abcd1234efgh' \  -H 'Content-Type: application/json' \  -d '{  "events": [    "document.fully_signed",    "document.completed",    "document.rejected"  ]}'
Example Response
{  "id": "cm4k2x9p10013abcd1234efgh",  "url": "https://example.com/webhooks/sajn",  "enabled": true,  "status": "ENABLED",  "pausedAt": null,  "pauseReason": null,  "failureNotificationEmail": "dev@example.com",  "events": [    "document.fully_signed",    "document.completed",    "document.rejected"  ],  "apiVersion": "2026-10",  "createdAt": "2026-09-01T12:00:00.000Z",  "updatedAt": "2026-09-01T12:00:00.000Z"}

Was this page helpful?