Create webhook-subscription
POST
/api/v1/webhooks
const url = 'https://example.com/api/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"disabled":true,"name":"example","secret":"example","selector":"example","types":["example"],"url":"example"}'};
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://example.com/api/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "disabled": true, "name": "example", "secret": "example", "selector": "example", "types": [ "example" ], "url": "example" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
disabled
boolean
name
required
string
secret
string
selector
string
types
Array<string>
url
required
string
Examplegenerated
{ "disabled": true, "name": "example", "secret": "example", "selector": "example", "types": [ "example" ], "url": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
disabled
boolean
name
required
string
secret
string
selector
string
types
Array<string>
url
required
string
Examplegenerated
{ "disabled": true, "name": "example", "secret": "example", "selector": "example", "types": [ "example" ], "url": "example"}default
Section titled “default”Problem Details (RFC 9457)
Media typeapplication/problem+json
object
code
required
string
detail
string
instance
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{ "code": "example", "detail": "example", "instance": "example", "status": 1, "title": "example", "type": "example"}