cdn.pizzaDocumentation

Services

Webhooks

Webhooks automate reactions to supported account events.

#Overview

Webhooks automate reactions to supported account events.

#Receive events safely

A webhook associates an HTTPS URL with events available in the form or API. Store any secret returned at creation on the receiver and never log it.

The receiver should respond quickly, process idempotently, and queue heavy work. Validate the signature mechanism actually provided before trusting a payload; if none is available, use a secret URL and additional network controls.

#Put a receiver into production

  1. Create a dedicated HTTPS endpoint.

  2. Register the webhook and store its secret once.

  3. Validate the event and reject invalid payloads.

  4. Deduplicate, acknowledge quickly, and monitor failures.

#Permissions by role

Actionowneradminmemberviewer
List destinations and eventsReadReadReadRead
Create a destination and its secretAllowedAllowedNoNo
Delete a destinationAllowedAllowedNoNo

#Customer REST operations

Base URL: https://api.cdn.pizzaDownload OpenAPI 3.1

Webhooks 3

GET /api/webhooks

#List webhooks

Authentication
Personal Bearer token
Roles
owner, admin, member, viewer
Success
200
Example
bash
curl --request GET \
  --url 'https://api.cdn.pizza/api/webhooks' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
POST /api/webhooks

#Create a webhook

Authentication
Personal Bearer token
Roles
owner, admin
Success
201

Request fields

FieldTypeRequiredDescription
urlstringyesPublic HTTP(S) receiver URL; HTTPS is recommended.format: uri · length: 0…500
eventsarray<string>yesSubscribed events.items: file.uploaded | file.deleted | domain.created | zone.created | zone.updated | zone.deleted | cache.purged | node.online | node.offline | node.deployed | billing.updated | invoice.paid | mail.accepted | mail.rejected | mail.deferred
secretstringnoCustomer-selected signing secret.length: 0…255
Example
bash
curl --request POST \
  --url 'https://api.cdn.pizza/api/webhooks' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"url":"https://hooks.example.com/cdn-pizza","events":["file.uploaded","file.deleted"]}'
DELETE /api/webhooks/{id}

#Delete a webhook

Authentication
Personal Bearer token
Roles
owner, admin
Success
200

Request fields

FieldTypeRequiredDescription
idintegeryesWebhook identifier.
Example
bash
curl --request DELETE \
  --url 'https://api.cdn.pizza/api/webhooks/WEBHOOK_ID' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'
Customer documentationReference generated from published interfaces