Webhook API Reference
SQUAKE Webhooks API reference for creating, updating and deleting webhooks
Create, update and delete the webhooks that SQUAKE sends events to.
Creating a webhook
To create a new webhook, send a POST request to the webhook endpoint.
Endpoint
POST /api/v2/webhooksRequest parameters
kindstringrequiredThe type of webhook. Must be one of: order, confirmation_document_available, certificate_document_available
endpoint_urlstringrequiredThe URL where webhook events will be sent
POST /v2/webhooks in the API referenceHeaders
- Authentication is required (based on the controller inheriting from BaseController)
Request
curl -X POST \
https://api.squake.earth/v2/webhooks \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"kind": "order",
"endpoint_url": "https://your-domain.com/webhook-receiver"
}'Response
{
"id": "webhook_id",
"kind": "order",
"endpoint_url": "https://your-domain.com/webhook-receiver",
"signing_key": "webhook_signing_key", // Only provided on creation
"last_sent_at": null,
"last_failed_at": null,
"failed_attempts": 0
}Updating a webhook
Update an existing webhook configuration.
Endpoint
PUT /api/v2/webhooks/:idRequest parameters
kindstringThe type of webhook. Must be one of: order, confirmation_document_available, certificate_document_available
endpoint_urlstringThe URL where webhook events will be sent
PUT /v2/webhooks/{id} in the API referenceExample request
curl -X PUT \
https://api.squake.earth/v2/webhooks/webhook_id \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"endpoint_url": "https://your-domain.com/new-webhook-receiver"
}'Response
{
"id": "webhook_id",
"kind": "order",
"endpoint_url": "https://your-domain.com/new-webhook-receiver"
}Not found (404)
Returned when the webhook ID doesn't exist or belongs to another client.
Deleting a webhook
Remove an existing webhook configuration.
Endpoint
DELETE /api/v2/webhooks/:idExample request
curl -X DELETE \
https://api.squake.earth/v2/webhooks/webhook_id \
-H 'Authorization: Bearer YOUR_API_TOKEN'Important notes
- The webhook signing key is only returned once during webhook creation. Make sure to store it securely.
- The endpoint URL must be a valid HTTPS URL that can receive POST requests.
- Each client can create multiple webhooks for different purposes.
- Available webhook kinds:
order: Notifications about order-related eventsconfirmation_document_available: Notifications when confirmation documents become availablecertificate_document_available: Notifications when certificate documents become available