# Create New Webhook Creates a webhook to listen for events related to widgets. Endpoint: POST /api/v1/webhooks Version: 1.0.0 ## Header parameters: - `Accept` (string) Example: "application/json" - `token` (string) Example: "{API key}" ## Request fields (application/json): - `name` (string, required) Webhook name. Example: "Webhook Name" - `url` (string, required) Webhook callback URL that will receive posted webhook events. Example: "https://webhook.site/6979dd8e-c00b-427a-8c42-245ad782f4bc" - `events` (array, required) Event types that will be sent to the registered webhook endpoint. Example: ["lead.created","lead.updated","widget.created","widget.updated"] - `timeoutSeconds` (number) Time (in seconds) the system waits for a status code response from the registered endpoint before marking the attempt as failed. Default - . Example: 30 ## Response 201 fields (application/json): - `id` (string) Unique identifier of the webhook. Example: "7352983b-2f3e-4e6f-b472-061945204d79" - `name` (string) Webhook name. Example: "Webhook 1" - `url` (string) Webhook callback URL. Example: "https://webhook.site/6979dd8e-c00b-427a-8c42-245ad782f4bc" - `events` (array) Represents which types of events will be posted to the registered webhook endpoint. Example: ["lead.created","lead.updated","widget.created","widget.updated"] - `active` (boolean) Represents whether webhook is active and accepts posted events. Example: true - `secret` (string) Webhook secret parameter, which is used for the implementation of webhook security. The value is shown only in the POST method response. Example: "dc2503b83d28fe85b57c55ad83daca63..." - `failureCount` (integer) Number of failed webhook delivery attempts. - `successCount` (integer) Number of successful webhook deliveries. Example: 12 - `lastFailureAt` (string,null) Timestamp of the last failed attempt. It is provided in ISO 8601 format. - `lastSuccessAt` (string,null) Timestamp of the last successful attempt. It is provided in ISO 8601 format. Example: "2025-07-09T16:00:53.244Z" - `timeoutSeconds` (integer) Time (in seconds) the system waits for a status code response from the registered endpoint before marking the attempt as failed. Example: 10 - `createdAt` (string) Timestamp of webhook creation. It is provided in ISO 8601 format. Example: "2025-07-09T14:04:03.771Z" - `updatedAt` (string) Timestamp of last update to the webhook. It is provided in ISO 8601 format. Example: "2025-07-09T14:25:36.471Z" ## Response 400 fields (application/json): - `error` (string) Example: "Bad Request" - `statusCode` (integer) Example: 400 - `message` (string) Example: "The request contains a syntax error. Please check the format and ensure the fields are correctly specified." ## Response 401 fields (application/json): - `error` (string) Example: "Unauthorized" - `statusCode` (integer) Example: 401 - `message` (string) Example: "Invalid API Key" ## Response 404 fields (application/json): - `error` (string) Example: "Not Found" - `statusCode` (integer) Example: 404 - `message` (string) Example: "Cannot POST /api/v1/webhooks" ## Response 500 fields (application/json): - `error` (string) Example: "Internal Server Error" - `statusCode` (integer) Example: 500 - `message` (string) Example: "Unexpected server error occurred. Please try again later."