Skip to main content
POST
/
webhooks
/
subscriptions
Create a webhook subscription
curl --request POST \
  --url https://api.paywalls.ai/v1/webhooks/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "description": "<string>",
  "customHeaders": {},
  "secret": "<string>"
}'
{
  "subscription": {
    "id": "<string>",
    "paywallId": "<string>",
    "url": "<string>",
    "events": [
      "<string>"
    ],
    "isActive": true,
    "description": "<string>",
    "customHeaders": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "consecutiveFailures": 123,
    "lastDeliveredAt": "2023-11-07T05:31:56Z",
    "secretSuffix": "<string>",
    "secret": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string<uri>
required

HTTPS endpoint that will receive webhook deliveries.

events
string[]
required

Event keys to subscribe to. Provide * to listen for all events.

Minimum length: 1
description
string

Optional description shown in dashboards (max 512 characters).

customHeaders
object

Optional headers added to every webhook request.

secret
string

Provide a custom signing secret (minimum 16 characters).

Response

201 - application/json

Webhook subscription created successfully.

subscription
object
required

Configuration for a webhook endpoint that receives paywall events.