Skip to content
Documentation
Get started

Webhooks

Create a merchant webhook endpoint

POST
/v1/webhook-endpoints
curl --request POST \
--url https://api.timbro.do/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: example' \
--data '{ "url": "https://example.com", "enabledEvents": [ "subscription.canceled" ] }'

Registers an HTTPS endpoint for signed domain events. The signing secret is returned only in this response. An integration subscribes only to events of the scope families it holds, and its endpoints are deleted when the business disconnects it.

idempotency-key
required
string
>= 1 characters <= 255 characters /^[\x20-\x7e]+$/
Media typeapplication/json
object
url
required

HTTPS endpoint that receives signed events.

string format: uri
enabledEvents
required
Array
>= 1 items <= 17 items unique items

The endpoint and its new signing secret. Store the secret securely.

Media typeapplication/json
Response fields and codes

The endpoint and its new signing secret. Store the secret securely.

object
id
required

Webhook endpoint identifier.

string
/^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$/
object
required
string
Allowed value: webhook_endpoint
url
required
string format: uri
enabledEvents
required

The retained subscription configuration, including event types from earlier contracts.

Array<string>
>= 1 items
status
required
Any of:
string
Allowed value: active
secretCreatedAt
required

When the current signing secret was issued.

string format: date-time
previousSecretExpiresAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
secret
required

Signing secret in the Standard Webhooks whsec_ form. Returned only when it is issued.

string
/^whsec_[A-Za-z0-9+/]+={0,2}$/
request-id
required
string

Identifies this request. Quote it when you contact support.

Idempotent-Replayed
string
Allowed value: true

true when this response replays the stored result of an earlier request with the same Idempotency-Key.