/api/v1/webhooks/{id}Changes the URL, the subscribed events, the description or the status. Setting status to "enabled" on an auto-disabled endpoint reactivates it and resets its failure counter. Requires the "webhooks:manage" scope.
Path parameters#
| Field | Type | Description |
|---|---|---|
idrequired | string | Awrora id (UUID) for the endpoint. |
Headers#
| Field | Type | Description |
|---|---|---|
Idempotency-Key | string≥ 8 chars · ≤ 200 chars | Optional. A unique key, 8-200 characters. Retrying with the same key replays the first response verbatim instead of acting twice. |
Request body#
| Field | Type | Description |
|---|---|---|
url | string≥ 1 chars · ≤ 2048 chars | The https URL to POST events to. Must be a public address — private and loopback addresses are rejected. Maximum 2048 characters. |
events | string[] | Event types to subscribe to. At least one. "ping" cannot be subscribed to — test deliveries are sent regardless of this list. |
description | string | null | A note about the endpoint. Pass null to clear it. |
status | string | Turn the endpoint on or off. Setting "enabled" on an auto-disabled endpoint reactivates it and resets its failure counter. You cannot set "auto_disabled" yourself — only Awrora does that. "enabled""disabled" |
Example request#
bash
curl -X PATCH "https://your-site.awrora.app/api/v1/webhooks/id_8f2k3n" \
-H "Authorization: Bearer $AWRORA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/awrora",
"events": [
"booking.created"
],
"description": "string",
"status": "enabled"
}'Responses#
200The updated endpoint.400Invalid request — codes "validation_failed" or, on an endpoint that requires one, "idempotency_key_required".401Missing, invalid, revoked or expired API key — codes "api_key_missing", "api_key_invalid", "api_key_revoked", "api_key_expired".403The API app is off, the plan does not include the API, or the key lacks the required scope — codes "app_not_enabled", "plan_upgrade_required", "insufficient_scope" (the last carries "required_scope").404No such resource. The same response is returned for a resource that belongs to another organization — code "not_found".422The request was understood but cannot be fulfilled as asked — codes "validation_failed" or "idempotency_key_reused" (the same Idempotency-Key was already used with a different body).429Rate limit exceeded — code "rate_limited". See the x-ratelimit-* headers.500Something went wrong on our side — code "internal_error".
Response 200
| Field | Type | Description |
|---|---|---|
idrequired | string | Awrora id (UUID) for the endpoint. |
urlrequired | string | The https URL deliveries are POSTed to. |
descriptionrequired | string | null | Free-text note, or null. |
eventsrequired | string[] | The event types this endpoint receives. Test deliveries ignore this list. |
statusrequired | string | enabled = receiving; disabled = turned off by the merchant; auto_disabled = turned off by Awrora after 72 hours without a successful delivery. PATCH status back to "enabled" to resume — that also resets the failure counter. "enabled""disabled""auto_disabled" |
sourcerequired | string | "api" when created through this API, "admin" when created in Awrora. "admin""api" |
consecutive_failuresrequired | integermin -9007199254740991 · max 9007199254740991 | Failed deliveries in a row. Reset to zero by the next success. |
last_success_atrequired | string | null | ISO 8601 with offset, or null. |
last_failure_atrequired | string | null | ISO 8601 with offset, or null. |
created_atrequired | string | ISO 8601 timestamp with offset. |
updated_atrequired | string | ISO 8601 timestamp with offset. |
200 response
{
"id": "res_8f2k3n",
"url": "https://example.com/webhooks/awrora",
"description": "string",
"events": [
"string"
],
"status": "enabled",
"source": "admin",
"consecutive_failures": -9007199254740991,
"last_success_at": "string",
"last_failure_at": "string",
"created_at": "string",
"updated_at": "string"
}