Skip to main content
POST
/
api
/
webhooks
/
subscriptions
Create webhook subscription
curl --request POST \
  --url https://www.lettucestream.com/api/webhooks/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "description": "<string>",
  "secret": "<string>"
}
'
{
  "subscription": {
    "id": "<string>",
    "url": "<string>",
    "events": [
      "<string>"
    ],
    "description": "<string>",
    "enabled": true,
    "createdAt": "<string>",
    "updatedAt": "<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
required
events
string[]
required
description
string
secret
string

Response

200 - application/json

Webhook subscription and optional secret

subscription
object
required
secret
string