createWebhookSubscription
POST
/webhook-subscriptions
const url = 'https://app.dev.buildtrace.eu/api/webhook-subscriptions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","eventTypes":["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://app.dev.buildtrace.eu/api/webhook-subscriptions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "eventTypes": [ "example" ] }'Required scope: webhooks:write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string
eventTypes
Array<string>
Example generated
{ "url": "example", "eventTypes": [ "example" ]}Responses
Section titled “Responses”Created (secret returned once)
Media typeapplication/json
object
id
required
string format: uuid
url
required
string
eventTypes
required
Array<string>
isActive
required
boolean
secret
required
string
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "url": "example", "eventTypes": [ "example" ], "isActive": true, "secret": "example"}Bad request
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}Unauthorized