Webhooks

Webhooks: 5 operations of the ChaosDesk REST API.

Retrieves the collection of Webhook resources.

GET/api/webhooks

Responses

  • 200Webhook collection
  • 403Forbidden

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/webhooks" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Create a webhook. A signing secret is generated; read it with GET /api/webhooks/{id}/signing_secret.

POST/api/webhooks

Request body application/json

namestringrequired
descriptionstring | null
endpointstring (uri)required
method"POST" | "PUT" | "PATCH"
activeboolean
subscriptionsstring[]
Event types (ticket.created, ticket.status_changed, …) and/or conditional_ticket_events (called by triggers and automations).
body_templatestring | null
Custom JSON body for event deliveries (placeholders such as {{ticket.id}}, {{ticket.status}}, {{ticket.requester.email}}; values are JSON-escaped). Null sends the standard envelope.

Responses

  • 201Webhook resource created
  • 400Invalid input
  • 403Forbidden
  • 422An error occurred

Example request

curl -X POST "https://yourcompany.chaosdesk.io/api/webhooks" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","endpoint":"string"}'

Retrieves a Webhook resource.

GET/api/webhooks/{id}

Parameters

idstringpathrequired
Webhook identifier

Responses

  • 200Webhook resource
  • 403Forbidden
  • 404Not found

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/webhooks/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Updates the Webhook resource.

PATCH/api/webhooks/{id}

Parameters

idstringpathrequired
Webhook identifier

Request body application/merge-patch+json

namestring
descriptionstring | null
endpointstring (uri)
method"POST" | "PUT" | "PATCH"
activeboolean
subscriptionsstring[]
Event types (ticket.created, ticket.status_changed, …) and/or conditional_ticket_events (called by triggers and automations).
body_templatestring | null
Custom JSON body for event deliveries (placeholders such as {{ticket.id}}, {{ticket.status}}, {{ticket.requester.email}}; values are JSON-escaped). Null sends the standard envelope.

Responses

  • 200Webhook resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An error occurred

Example request

curl -X PATCH "https://yourcompany.chaosdesk.io/api/webhooks/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/merge-patch+json" \
  -d '{"name":"string","description":"string"}'

Removes the Webhook resource.

DELETE/api/webhooks/{id}

Parameters

idstringpathrequired
Webhook identifier

Responses

  • 204Webhook resource deleted
  • 403Forbidden
  • 404Not found

Example request

curl -X DELETE "https://yourcompany.chaosdesk.io/api/webhooks/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"