Create webhook
create_webhookCreates an HTTPS webhook for Yandex KIT order, payment, delivery, customer, or cart events; returns a one-time signing secret to verify callback authenticity.
Instructions
Create a new webhook. The url must use HTTPS (HTTP is rejected). Allowed events: ORDER_STATUS_CHANGED, ORDER_PAYMENT_STATUS_CHANGED, ORDER_DELIVERY_STATUS_CHANGED, CUSTOMER_CHANGED, CART_UPDATED. CUSTOMER_CHANGED fires when a customer appears or their name/phone/email changes; its data carries only {customer_id}, so a CRM sync must follow up with get_customer to read the new values (no before/after diff is delivered). CART_UPDATED fires when a customer changes their cart (clearing included); data is only {customer_id}, a series of changes to one cart collapses into one event, sent at most once per 15 minutes and up to 15 minutes late — read the current contents with get_customer_cart when handling it. NOTE: ORDER_STATUS_CHANGED will stop firing for the receipt-technical statuses CREATING_INITIAL_RECEIPT and CREATING_FINAL_RECEIPTS — key new integrations on ORDER_PLACED and COMPLETED instead (the statuses themselves stay readable via get_order). IMPORTANT: the response contains the signing secret — it is shown ONLY ONCE, store it securely. Call get_operation_schema("CreateWebhook") for the exact request shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhook | Yes | Webhook record matching the CreateWebhookRequest schema (see get_operation_schema("CreateWebhook")). Required: url (HTTPS only), events. |