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/webhooks

Request parameters

kindstringrequired

The type of webhook. Must be one of: order, confirmation_document_available, certificate_document_available

endpoint_urlstringrequired

The URL where webhook events will be sent

See every field of POST /v2/webhooks in the API reference

Headers

  • 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

201 Createdapplication/json
{
  "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/:id

Request parameters

kindstring

The type of webhook. Must be one of: order, confirmation_document_available, certificate_document_available

endpoint_urlstring

The URL where webhook events will be sent

See every field of PUT /v2/webhooks/{id} in the API reference

Example 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

200 OKapplication/json
{
  "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/:id

Example request

curl -X DELETE \
  https://api.squake.earth/v2/webhooks/webhook_id \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

Important notes

  1. The webhook signing key is only returned once during webhook creation. Make sure to store it securely.
  2. The endpoint URL must be a valid HTTPS URL that can receive POST requests.
  3. Each client can create multiple webhooks for different purposes.
  4. Available webhook kinds:
    • order: Notifications about order-related events
    • confirmation_document_available: Notifications when confirmation documents become available
    • certificate_document_available: Notifications when certificate documents become available

On this page

POST/v2/webhooks

Run this request against the sandbox with your test key.

Open in API reference