POST
/
v2
/
webhooks
curl --request POST \
  --url https://api.usecloudpress.com/v2/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endpoint": "<string>",
  "description": "<string>",
  "events": [
    "<string>"
  ],
  "connections": [
    123
  ],
  "origin": "<string>"
}'
{
  "id": 123,
  "endpoint": "<string>",
  "description": "<string>",
  "events": [
    "<string>"
  ],
  "connections": [
    {
      "id": 123,
      "name": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Creates a new webook

endpoint
string
required

The endpoint that must be called when the webhook is triggered.

Minimum length: 1
events
string[]
required

The events that will trigger this webhook.

connections
integer[]
required

The connections for which this webhook will be triggered.

description
string | null

An optional description of the purpose of the webhook.

origin
string | null

Response

200
application/json
Success

Describes a webhook.

id
integer

The ID of the webhook.

endpoint
string

The endpoint that will be called when the webhook is triggered.

description
string | null

An optional description of the purpose of the webhook.

events
string[]

The events that will trigger this webhook.

connections
object[]

The connections for which this webhook will be triggered.