Create a webhook destination
POST
/webhooks
const url = 'https://your-server.example/api/webhooks';const options = { method: 'POST', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"id":1,"name":"example","url":"https://example.com","kind":"example","secret":"example","enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-server.example/api/webhooks \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "id": 1, "name": "example", "url": "https://example.com", "kind": "example", "secret": "example", "enabled": true }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id
integer format: int64
name
string
url
string format: uri
kind
Generic, slack, or discord
string
secret
string
enabled
boolean
Example generated
{ "id": 1, "name": "example", "url": "https://example.com", "kind": "example", "secret": "example", "enabled": true}Responses
Section titled “Responses”Created.
Media typeapplication/json
object
id
integer format: int64
name
string
url
string format: uri
kind
Generic, slack, or discord
string
secret
string
enabled
boolean
Example generated
{ "id": 1, "name": "example", "url": "https://example.com", "kind": "example", "secret": "example", "enabled": true}