# Update a webhook Update an existing webhook. Endpoint: PUT /external-api/v1/webhooks/{id} Version: 1.0.1 Security: apiKey ## Path parameters: - `id` (string, required) The ID of the webhook. Example: "123e4567-e89b-12d3-a456-426614174000" ## Request fields (application/json): - `description` (string, required) A description of the webhook. This is for your own reference and will not be used by Situ. Example: "Webhook for new enquiries" - `events` (array) The events to subscribe to. This is a list of events that will trigger the webhook. You may subscribe to multiple events. If left empty, all events will be sent. Enum: "ENQUIRY.CREATED", "ENQUIRY.SPECIALIST_ASSIGNED", "ENQUIRY.SHORTLISTING", "ENQUIRY.CLOSED", "ENQUIRY.REOPENED", "ENQUIRY.QUOTED", "QUOTE.CREATED", "QUOTE.INVALIDATED", "BOOKING.PENDING", "BOOKING.CLIENT_CONFIRMATION_DETAILS_SENT", "BOOKING.PARTNER_CONFIRMATION_DETAILS_SENT", "BOOKING.CHECK_IN_DETAILS_SENT", "BOOKING.CANCELLED" - `url` (string, required) The URL to send the webhook to. Xenia will send a POST request to this URL with the event data in the body. The URL must be unique. Example: "https://example.com/webhook" ## Response 200 fields (application/json): - `data` (object) - `data.description` (string, required) A description of the webhook. This is for your own reference and will not be used by Situ. Example: "Webhook for new enquiries" - `data.events` (array) The events to subscribe to. This is a list of events that will trigger the webhook. You may subscribe to multiple events. If left empty, all events will be sent. Enum: "ENQUIRY.CREATED", "ENQUIRY.SPECIALIST_ASSIGNED", "ENQUIRY.SHORTLISTING", "ENQUIRY.CLOSED", "ENQUIRY.REOPENED", "ENQUIRY.QUOTED", "QUOTE.CREATED", "QUOTE.INVALIDATED", "BOOKING.PENDING", "BOOKING.CLIENT_CONFIRMATION_DETAILS_SENT", "BOOKING.PARTNER_CONFIRMATION_DETAILS_SENT", "BOOKING.CHECK_IN_DETAILS_SENT", "BOOKING.CANCELLED" - `data.id` (string) The ID of the webhook. This is a unique value that can be used to retrieve your webhook via other endpoints where specified. Example: "123e4567-e89b-12d3-a456-426614174000" - `data.url` (string, required) The URL to send the webhook to. Xenia will send a POST request to this URL with the event data in the body. The URL must be unique for each webhook. Example: "https://example.com/webhook" ## Response 400 fields (application/problem+json): - `detail` (string) A human-readable explanation specific to this occurrence of the problem. Example: "Validation failed for one or more fields." - `errors` (object) A dictionary containing field-specific validation errors. Example: {"clientReference":["Client reference must be at least 3 characters."],"id":["The ID field is required."]} - `instance` (string) A URI reference that identifies the specific occurrence of the problem. Example: "/api/v1/enquiries" - `status` (integer) The HTTP status code. Example: 400 - `title` (string) A short, human-readable summary of the problem type. Example: "One or more validation errors occurred." - `type` (string) The error code as a machine-readable key. Enum: "RESOURCE_NOT_FOUND", "VALIDATION_ERROR", "RESOURCE_ALREADY_EXISTS", "DUPLICATE_CLIENT_REFERENCE", "GEOCODE_FAILURE", "MALFORMED_REQUEST", "INTERNAL_SERVER_ERROR", "MAX_RESOURCE_COUNT_REACHED", "SANDBOX_SPECIFIC_ACTION_ERROR" ## Response 404 fields (application/problem+json): - `detail` (string) A human-readable explanation specific to this occurrence of the problem. Example: "The request could not be understood due to malformed syntax." - `instance` (string) A URI reference or identifier that describes the specific occurrence of the problem. Example: "/api/v1/enquiries/abc" - `status` (integer, required) The HTTP status code. Example: 400 - `title` (string, required) A short, human-readable summary of the problem type. Example: "Bad Request" - `type` (string, required) The error code as a machine-readable key. Enum: "RESOURCE_NOT_FOUND", "VALIDATION_ERROR", "RESOURCE_ALREADY_EXISTS", "DUPLICATE_CLIENT_REFERENCE", "GEOCODE_FAILURE", "MALFORMED_REQUEST", "INTERNAL_SERVER_ERROR", "MAX_RESOURCE_COUNT_REACHED", "SANDBOX_SPECIFIC_ACTION_ERROR" ## Response 500 fields (application/problem+json): - `detail` (string) A human-readable explanation specific to this occurrence of the problem. Example: "The request could not be understood due to malformed syntax." - `instance` (string) A URI reference or identifier that describes the specific occurrence of the problem. Example: "/api/v1/enquiries/abc" - `status` (integer, required) The HTTP status code. Example: 400 - `title` (string, required) A short, human-readable summary of the problem type. Example: "Bad Request" - `type` (string, required) The error code as a machine-readable key. Enum: "RESOURCE_NOT_FOUND", "VALIDATION_ERROR", "RESOURCE_ALREADY_EXISTS", "DUPLICATE_CLIENT_REFERENCE", "GEOCODE_FAILURE", "MALFORMED_REQUEST", "INTERNAL_SERVER_ERROR", "MAX_RESOURCE_COUNT_REACHED", "SANDBOX_SPECIFIC_ACTION_ERROR" ## Response 401 fields ## Response 403 fields