Skip to main content
POST
/
api
/
webhooks
Create a webhook
curl --request POST \
  --url https://operator.io/api/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Stripe payment failed",
  "promptTemplate": "A payment failed. Here is the event: {{payload}}. Investigate and notify me."
}
'
{
  "webhook": {
    "id": "<string>",
    "name": "<string>",
    "promptTemplate": "<string>",
    "token": "<string>",
    "enabled": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key (ck_live_...). Create one in Settings > API Keys.

Body

application/json
name
string
required
promptTemplate
string
required

Template with {{payload}} placeholder for the incoming data.

Response

201 - application/json

Created. The response includes the trigger URL token.

webhook
object