Skip to content

createWebhookSubscription

POST
/webhook-subscriptions
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.

Media typeapplication/json
object
url
required
string
eventTypes
Array<string>

Example generated

{
"url": "example",
"eventTypes": [
"example"
]
}

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