Register New Webhook
This endpoint allows you to register a new Webhook to subscribe to certain kind of events being triggered by Squake
Important: This endpoint returns a newly created webhook upon a successful request.
The webhook includes a signing_key used to verify the authenticity of future webhook messages.
Please ensure you save this signing_key, as it cannot be retrieved later.
Bearer-AuthAuthorizationBearer <token>This endpoint accepts JSON object with two fields:
kindendpoint_url
Right now we're supporting next types:
order- we'll send you an event when purchase which was made via stripe changes statusconfirmation_document_available- we'll send a document when it's generatedcertificate_document_available- we'll send a document when it's generated
The endpoint_url value should be a valid URL that accepts POST requests.
application/json- body
kind?string"order""confirmation_document_available""certificate_document_available"endpoint_url?stringCreated
application/json- response
Squake application generates events on certain actions. To be notified about these actions client can create a webhook. For now you can create one webhook per one kind of events.
On the first creation of webhook, you would receive signing_key.
You should save these signing key securely as we're using it to sign our webhooks, so later you can check the authentity of the received event.
To sign the webhook payload, we're creating HMAC signature of the payload using SHA256.
id?stringA unique identifier for the webhook, represented as a universally unique identifier (UUID)
uuidlast_failed_at?|The timestamp of the most recent failed delivery attempt. If no failures have occurred, this field is null
date-timelast_sent_at?|he timestamp of the most recent successful delivery attempt. If no attempts have been made, this field is null
date-timefailed_attempts?integerThe total number of consecutive failed delivery attempts
kind?stringThe type of event that triggers the webhook
"order""carbon_activity_expired""confirmation_document_available""certificate_document_available"endpoint_url?stringThe URL where the webhook payloads are sent. Must be a valid URI that accepts POST requests
urisigning_key?string32 bit signing key that we're using to generate webhook signature.
signing_key is being generated on webhook creation and being exposed only once, so make sure you've saved it
curl -X POST 'https://api.sandbox.squake.earth/v2/webhooks' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_failed_at": "2024-08-22T14:10:18Z", "last_sent_at": "2024-08-24T14:15:22Z", "failed_attempts": 0, "kind": "order", "endpoint_url": "http://example.com", "signing_key": "TAWHPBAVckH8KmxRtlRX/rQ/mona5vUem7QFtozGHxM="}Retrieve Registered Webhooks
Webhooks are HTTP callbacks that notify your application when events happen in SQUAKE's system. Instead of continuously polling our API, webhooks push data to your endpoint when events occur. This endpoint returns the list of currently registered webhooks. See the Integration Documentation for more information.
Update Webhook
This endpoint allows you to update a previously registered webhook. It accepts the same parameters as the Register New Webhook endpoint and responds with an updated Webhook entity