Skip to main content
POST
/
v1
/
webhooks
Create a webhook subscription
curl --request POST \
  --url https://api.reader.dev/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "<string>",
  "name": "<string>",
  "events": [
    "<string>"
  ],
  "secret": "<string>",
  "headers": {}
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "url": "<string>",
    "name": "<string>",
    "events": [
      "<string>"
    ],
    "headers": {},
    "active": true,
    "deliveryStats": {
      "totalAttempts": 123,
      "failedDeliveries": 123,
      "lastDeliveryAt": "2023-11-07T05:31:56Z",
      "lastDeliveryStatus": 123
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "secret": "<string>"
  }
}
Subscribe an HTTPS endpoint to job events. The secret field, if provided, is used to sign every delivery with HMAC-SHA256. See Verifying signatures. The secret is returned once on the create response and stripped from all subsequent list/get responses. Store it immediately. Maximum 10 webhooks per workspace. See Webhooks for the full delivery contract, event types, retry policy, and verification code.

Authorizations

x-api-key
string
header
required

Body

application/json
url
string<uri>
required
name
string
required
Required string length: 1 - 100
events
string[]
required
Minimum array length: 1
secret
string
Required string length: 16 - 256
headers
object

Response

Webhook created (secret visible once)

success
enum<boolean>
required
Available options:
true
data
object
required