Webhooks

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-webhooks"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/053b28fc-449b-4911-9028-f94e123b19a2/social-card.svg?v=3e7ae33eec8b" alt="Webhooks" width="600" height="315"></a>
GET http://localhost:4000/api/v1/webhooks

List the workspace's webhook endpoints

Up to 50 endpoints. health is healthy, failing or disabled (Atlas switches off an endpoint that keeps failing).

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/webhooks" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/webhooks

Add a webhook endpoint

url must be https and public. events are names from the event catalogue, or * for all. channelIds / clientIds send only events about those channels or clients (an event about neither is not sent). headers are sent on every delivery and never returned. The signing secret (Standard Webhooks) is in this answer only; POST /webhooks/{id}/rotate-secret makes a new one. At most 50 per workspace.

Request body

application/json
name
string
required
url
string
required
events
string[]
= ["*"]
channelIds
string[]
clientIds
string[]
headers
object
active
boolean
= true
{
  "name": "string",
  "url": "string",
  "events": [
    "*"
  ],
  "channelIds": [
    "string"
  ],
  "clientIds": [
    "string"
  ],
  "headers": {},
  "active": true
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/webhooks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","url":"string","events":["*"],"channelIds":["string"],"clientIds":["string"],"headers":{},"active":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
GET http://localhost:4000/api/v1/webhooks/{id}

Get one webhook endpoint

Parameters

id
string
path
required

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
DELETE http://localhost:4000/api/v1/webhooks/{id}

Delete a webhook endpoint

Parameters

id
string
path
required

Code samples

cURL
curl -X DELETE "http://localhost:4000/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
PATCH http://localhost:4000/api/v1/webhooks/{id}

Change a webhook endpoint

Send only what changes. channelIds / clientIds replace the filter (an empty list removes it); headers replace all headers (an empty object removes them). The URL cannot change: make a new endpoint.

Parameters

id
string
path
required

Request body

application/json
name
string
events
string[]
active
boolean
channelIds
string[]
clientIds
string[]
headers
object
{
  "name": "string",
  "events": [
    "string"
  ],
  "active": true,
  "channelIds": [
    "string"
  ],
  "clientIds": [
    "string"
  ],
  "headers": {}
}

Code samples

cURL
curl -X PATCH "http://localhost:4000/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","events":["string"],"active":true,"channelIds":["string"],"clientIds":["string"],"headers":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/webhooks/{id}/rotate-secret

Make a new signing secret

The new secret is in this answer only. The old one keeps signing for 24 hours (previousSecretExpiresAt), so a receiver can switch without dropping events.

Parameters

id
string
path
required

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/webhooks/{id}/rotate-secret" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/webhooks/{id}/test

Send a test event to a webhook endpoint

Sends a signed test event now and answers what the endpoint replied (status, time, the start of its answer).

Parameters

id
string
path
required

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/webhooks/{id}/test" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
GET http://localhost:4000/api/v1/webhooks/{id}/deliveries

The delivery log of a webhook endpoint

Newest first, 90 days: every attempt with its number, status, HTTP status and the start of the endpoint's answer. Page with cursor (the id of the last item).

Parameters

id
string
path
required
status
string
query
pending | success | failed
limit
integer
query
= 50
cursor
string
query

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/webhooks/{id}/deliveries" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver

Send a delivery again

Parameters

id
string
path
required
deliveryId
string
path
required

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/webhooks/{id}/deliveries/{deliveryId}/redeliver" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
Updated