Update Webhook

PUT
/v2/webhooks/{id}

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

Authorization

Bearer-Auth
headerAuthorizationBearer <token>

Path Parameters

id*string

Request Body

application/json
  1. body
kind?string
Value in"order""confirmation_document_available""certificate_document_available"
endpoint_url?string

Response Body

OK

application/json
  1. 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?string

A unique identifier for the webhook, represented as a universally unique identifier (UUID)

Formatuuid
last_failed_at?|

The timestamp of the most recent failed delivery attempt. If no failures have occurred, this field is null

Formatdate-time
last_sent_at?|

The timestamp of the most recent successful delivery attempt. If no attempts have been made, this field is null

Formatdate-time
failed_attempts?integer

The total number of consecutive failed delivery attempts

kind?string

The type of event that triggers the webhook

Value in"order""carbon_activity_expired""confirmation_document_available""certificate_document_available"
endpoint_url?string

The URL where the webhook payloads are sent. Must be a valid URI that accepts POST requests

Formaturi
Example Request
curl -X PUT 'https://api.sandbox.squake.earth/v2/webhooks/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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="}