Skip to main content

Overview

Updates an existing webhook subscription. You can change the target URL, the list of subscribed events, or the subscription status (activate/deactivate).

Endpoint

PATCH /partners/webhooks/subscriptions/:id

Authentication

Requires a valid API Key with the partner_webhooks_manage permission.

Path Parameters

ParameterTypeRequiredDescription
idUUIDYesThe subscription ID.

Request Body

All fields are optional. Only include the fields you want to change.
{
  "url": "https://yourplatform.com/webhooks/cleanlife-v2",
  "events": ["booking.created", "booking.cancelled", "booking.appointment_status_changed"],
  "status": "ACTIVE"
}
FieldTypeRequiredDescription
urlstring (URL)NoNew webhook URL. Must pass all URL validation rules.
eventsstring[]NoNew list of events. Replaces the entire existing list.
statusstringNoACTIVE or INACTIVE. Set to INACTIVE to pause deliveries without deleting.

Example Request

curl -X PATCH "https://apiv3.thecleanlife.dev/v1/partners/webhooks/subscriptions/gggggggg-0000-0000-0000-000000000001" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["booking.created", "booking.cancelled", "booking.appointment_status_changed", "booking.payment_confirmed"]
  }'

Success Response

HTTP Status: 200 OK
{
  "success": true,
  "data": {
    "id": "gggggggg-0000-0000-0000-000000000001",
    "partnerClientId": "hhhhhhhh-0000-0000-0000-000000000001",
    "url": "https://yourplatform.com/webhooks/cleanlife",
    "events": ["booking.created", "booking.cancelled", "booking.appointment_status_changed", "booking.payment_confirmed"],
    "status": "ACTIVE",
    "createdAt": "2026-06-15T10:00:00+03:00",
    "updatedAt": "2026-06-15T11:30:00+03:00"
  }
}

Error Responses

HTTP StatusCodeDescription
400VALIDATION_ERRORInvalid URL, event name, or status value
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENMissing partner_webhooks_manage permission
404RESOURCE_NOT_FOUNDSubscription not found

Notes

  • Providing events replaces the entire list of subscribed events — it is not additive.
  • Setting status to INACTIVE pauses deliveries. Existing PENDING deliveries in the queue will still be attempted but will fail immediately (subscription inactive check at dispatch time).
  • The secret is not affected by updates. To rotate the secret, use the dedicated rotate-secret endpoint.