Update Webhook

patch/v1/subscriptions/webhooks/{webhook_id}

Updates the event, target URL, or static headers of an existing webhook subscription. Any subset of attributes may be supplied; omitted attributes are left unchanged. Pass headers as null to clear all stored headers. Side effects: subsequent deliveries use the updated configuration immediately.

Requires a bearer token: Authorization: Bearer <token>.

Path parameters

NameTypeRequiredDescription
webhook_idstring <uuid>YesUUID of the webhook subscription to update.e.g. c47e2f81-9b3a-4d6e-8f10-2a5b7c9d1e3f

Request

cURL
curl -X PATCH https://api.wellapp.ai/v1/subscriptions/webhooks/{webhook_id} \
  -H "Authorization: Bearer $WELL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "type": "webhook",
    "attributes": {
      "target_url": "https://foldspace.ai/webhooks/well-v2",
      "headers": {
        "X-Foldspace-Token": "fold_rotated_9d2"
      }
    }
  }
}'
Request body
{
  "data": {
    "type": "webhook",
    "attributes": {
      "target_url": "https://foldspace.ai/webhooks/well-v2",
      "headers": {
        "X-Foldspace-Token": "fold_rotated_9d2"
      }
    }
  }
}

Responses

200The updated webhook subscription.

{
  "data": {
    "type": "webhook",
    "id": "c47e2f81-9b3a-4d6e-8f10-2a5b7c9d1e3f",
    "attributes": {
      "event": "document.processed",
      "target_url": "https://foldspace.ai/webhooks/well-v2",
      "headers": {
        "X-Foldspace-Token": "fold_rotated_9d2"
      },
      "active": true,
      "created_at": "2026-06-07T14:22:05.000Z",
      "updated_at": "2026-06-07T16:30:12.000Z"
    }
  }
}

400Invalid event name or malformed target URL.

{
  "code": "BAD_REQUEST",
  "status": 400,
  "title": "Bad Request",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

401Missing or invalid bearer token.

{
  "code": "UNAUTHORIZED",
  "status": 401,
  "title": "Unauthorized",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

404No webhook subscription exists with the supplied id.

{
  "code": "NOT_FOUND",
  "status": 404,
  "title": "Not Found",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}