Skip to main content
POST
/
api
/
v1
/
webhooks
Create a new webhook
curl --request POST \
  --url https://app.sajn.se/api/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "webhookUrl": "<string>",
  "eventTriggers": [],
  "enabled": true,
  "secret": "<string>",
  "failureNotificationEmail": "jsmith@example.com"
}
'
{
  "id": "<string>",
  "webhookUrl": "<string>",
  "secret": "<string>",
  "enabled": true,
  "failureNotificationEmail": "<string>",
  "eventTriggers": [
    "<string>"
  ],
  "createdAt": "<unknown>",
  "updatedAt": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sajn.se/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string
required

Bearer token for API authentication

Body

application/json

Body

Create webhook request

webhookUrl
string<uri>
required

URL that will receive webhook events

eventTriggers
enum<string>[]
required

List of event types to subscribe to

Minimum array length: 1
Available options:
DOCUMENT_CREATED,
DOCUMENT_SENT,
DOCUMENT_SIGNED,
DOCUMENT_COMPLETED,
DOCUMENT_REJECTED,
DOCUMENT_EXPIRED,
DOCUMENT_WITHDRAWN,
DOCUMENT_RECREATED,
DOCUMENT_DELETED,
DOCUMENT_ARCHIVED,
DOCUMENT_UNARCHIVED,
DOCUMENT_PARTY_SENT,
DOCUMENT_PARTY_DELIVERY_FAILED,
DOCUMENT_PARTY_OPENED,
DOCUMENT_PARTY_READ,
DOCUMENT_PARTY_SIGNED,
DOCUMENT_PARTY_REJECTED,
DOCUMENT_PARTY_DELEGATED,
DOCUMENT_PARTY_AUTH_FAILED,
DOCUMENT_REMINDER_AUTOMATIC,
DOCUMENT_REMINDER_MANUAL,
DOCUMENT_OPENED,
DOCUMENT_ARCHIVE_UPLOADED,
ID_CREATED,
ID_SENT,
ID_OPENED,
ID_VERIFIED,
ID_FAILED,
ID_CANCELED,
CONTACT_CREATED,
CONTACT_UPDATED,
CONTACT_DELETED,
TEMPLATE_CREATED,
TEMPLATE_UPDATED,
TEMPLATE_DELETED,
WORKSPACE_CREATED,
MEMBER_ADDED,
WORKFLOW_STARTED,
WORKFLOW_COMPLETED,
WORKFLOW_FAILED
enabled
boolean
default:true
required

Whether this webhook is active (default: true)

secret
string | null

Secret used to sign webhook payloads (sent as X-Sajn-Secret header)

failureNotificationEmail
string<email> | null

Email address that will be notified if webhook delivery fails

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

Response

Webhook response

Webhook response

id
string
required

Unique webhook identifier

webhookUrl
string
required

URL that receives webhook events

secret
string | null
required

Secret used to sign webhook payloads (sent as X-Sajn-Secret header)

enabled
boolean
required

Whether this webhook is active

failureNotificationEmail
string | null
required

Email address that receives a notification if webhook delivery fails

eventTriggers
string[]
required

List of event types this webhook subscribes to

createdAt
any
required

Date and time when webhook was created

updatedAt
any
required

Date and time when webhook was last updated