# Register New Webhook This endpoint allows you to register a new Webhook to subscribe to certain kind of events being triggered by Squake This endpoint returns a newly created webhook upon a successful request. The webhook includes a used to verify the authenticity of future webhook messages. Please ensure you save this , as it cannot be retrieved later. Endpoint: POST /v2/webhooks Security: Bearer-Auth ## Request fields (application/json): - `kind` (string) Enum: "order", "confirmation_document_available", "certificate_document_available" - `endpoint_url` (string) ## Response 201 fields (application/json): - `id` (string) A unique identifier for the webhook, represented as a universally unique identifier (UUID) - `last_failed_at` (string,null) The timestamp of the most recent failed delivery attempt. If no failures have occurred, this field is null - `last_sent_at` (string,null) he timestamp of the most recent successful delivery attempt. If no attempts have been made, this field is null - `failed_attempts` (integer) The total number of consecutive failed delivery attempts - `kind` (string) The type of event that triggers the webhook Enum: "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 - `signing_key` (string) 32 bit signing key that we're using to generate webhook signature. is being generated on webhook creation and being exposed only once, so make sure you've saved it ## Response 422 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string)