# Create webhook subscription Creates a webhook subscription to receive real-time notifications for receipt and credit note events. The webhook URL will be called when events occur for the authenticated company or client application. Accessible for: Company, Client Application Endpoint: POST /webhook/subscription Version: v1 Security: cheqi_oauth ## Request fields (application/json): - `name` (string) - `events` (array) Enum: "RECEIPT_CREATED", "RECEIPT_FINALIZED", "RETURN_REQUESTED", "CREDIT_NOTE_CREATED" - `receiptFormat` (string) Enum: "JSON", "XML" - `notificationUrl` (string) ## Response 200 fields (application/json): - `createdWebhooks` (array) - `createdWebhooks.name` (string) - `createdWebhooks.notificationUrl` (string) - `createdWebhooks.event` (string) - `createdWebhooks.clientApplicationId` (string) - `createdWebhooks.userId` (string) - `createdWebhooks.companyId` (string) - `failedEvents` (array) ## Response 400 fields (*/*): - `createdWebhooks` (array) - `createdWebhooks.name` (string) - `createdWebhooks.notificationUrl` (string) - `createdWebhooks.event` (string) - `createdWebhooks.clientApplicationId` (string) - `createdWebhooks.userId` (string) - `createdWebhooks.companyId` (string) - `failedEvents` (array) ## Response 403 fields (*/*): - `createdWebhooks` (array) - `createdWebhooks.name` (string) - `createdWebhooks.notificationUrl` (string) - `createdWebhooks.event` (string) - `createdWebhooks.clientApplicationId` (string) - `createdWebhooks.userId` (string) - `createdWebhooks.companyId` (string) - `failedEvents` (array) ## Response 409 fields (*/*): - `createdWebhooks` (array) - `createdWebhooks.name` (string) - `createdWebhooks.notificationUrl` (string) - `createdWebhooks.event` (string) - `createdWebhooks.clientApplicationId` (string) - `createdWebhooks.userId` (string) - `createdWebhooks.companyId` (string) - `failedEvents` (array)