{"openapi":"3.1.0","info":{"title":"Kibanda API","version":"2026-10-23","summary":"Sell on WhatsApp from any system.","description":"Products in; orders, customers and events out. Money is integer cents. Docs for humans and agents: https://api.kibanda.africa/docs (llms.txt at /llms.txt).","contact":{"name":"Kibanda","url":"https://api.kibanda.africa/docs"}},"servers":[{"url":"https://api.kibanda.africa","description":"This environment"},{"url":"https://api.kibanda.africa","description":"Production (kb_live_ keys)"},{"url":"https://api-staging.kibanda.africa","description":"Staging (kb_test_ keys)"}],"security":[{"bearer":[]}],"tags":[{"name":"Shop","description":"The shop an API key belongs to."},{"name":"Products","description":"The catalog customers browse on WhatsApp. Sync it with /v1/products/batch."},{"name":"Customers","description":"Customers with saved addresses, payment number, notes and tags."},{"name":"Orders","description":"Orders placed on WhatsApp: items, payment, delivery or pickup."},{"name":"Checkout sessions","description":"Carts built on a website, in an ad or by an agent, finished on WhatsApp."},{"name":"Events","description":"The event log behind webhooks."},{"name":"Webhook endpoints","description":"URLs that receive signed events."}],"paths":{"/v1/shop":{"get":{"tags":["Shop"],"operationId":"getShop","summary":"The shop this key belongs to","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shop"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"}}}},"/v1/products":{"get":{"tags":["Products"],"operationId":"listProducts","summary":"List products","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: the id of the last object on the previous page."},{"name":"active","in":"query","required":false,"schema":{"type":"string"},"description":"true|false"},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"},"description":"Your id."},{"name":"code","in":"query","required":false,"schema":{"type":"string"},"description":"Share code, e.g. UNG4."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Products"],"operationId":"createProduct","summary":"Create a product","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"price":{"type":"integer","minimum":1,"description":"Cents."},"description":{"type":["string","null"],"maxLength":72},"stock":{"type":["integer","null"],"minimum":0,"description":"null = not tracked."},"active":{"type":"boolean"},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}},"required":["name","price"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/products/batch":{"post":{"tags":["Products"],"operationId":"upsertProducts","summary":"Create or update up to 100 products by external_id (catalog sync)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["products"],"properties":{"products":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"price":{"type":"integer","minimum":1,"description":"Cents."},"description":{"type":["string","null"],"maxLength":72},"stock":{"type":["integer","null"],"minimum":0,"description":"null = not tracked."},"active":{"type":"boolean"},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}},"required":["external_id"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"},"url":{"type":"string"},"created":{"type":"integer"},"updated":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The product id."}],"get":{"tags":["Products"],"operationId":"getProduct","summary":"Retrieve a product","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Products"],"operationId":"updateProduct","summary":"Update a product (only the fields sent)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"price":{"type":"integer","minimum":1,"description":"Cents."},"description":{"type":["string","null"],"maxLength":72},"stock":{"type":["integer","null"],"minimum":0,"description":"null = not tracked."},"active":{"type":"boolean"},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Products"],"operationId":"archiveProduct","summary":"Archive a product","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/customers":{"get":{"tags":["Customers"],"operationId":"listCustomers","summary":"List customers","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: the id of the last object on the previous page."},{"name":"created_gte","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"created_lt","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"phone","in":"query","required":false,"schema":{"type":"string"},"description":"Any common format."},{"name":"email","in":"query","required":false,"schema":{"type":"string"},"description":""},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"},"description":""},{"name":"tag","in":"query","required":false,"schema":{"type":"string"},"description":""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Customers"],"operationId":"createCustomer","summary":"Create (or with upsert, update) a customer by phone","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"},"upsert":{"type":"boolean"},"name":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"format":"email"},"notes":{"type":["string","null"],"maxLength":2000},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":20},"mpesa_phone":{"type":["string","null"]},"payment_terms":{"enum":["default","pay_first","trusted"]},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}},"required":["phone"]}}}},"responses":{"200":{"description":"Updated (upsert)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/customers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The customer id."}],"get":{"tags":["Customers"],"operationId":"getCustomer","summary":"Retrieve a customer, with addresses and totals","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Customers"],"operationId":"updateCustomer","summary":"Update a customer","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":100},"email":{"type":["string","null"],"format":"email"},"notes":{"type":["string","null"],"maxLength":2000},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":20},"mpesa_phone":{"type":["string","null"]},"payment_terms":{"enum":["default","pay_first","trusted"]},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/customers/{id}/addresses":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The customer id."}],"post":{"tags":["Customers"],"operationId":"addCustomerAddress","summary":"Save a delivery address","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["lat","lng"],"properties":{"lat":{"type":"number"},"lng":{"type":"number"},"label":{"type":"string","maxLength":60},"landmark":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/customers/{id}/addresses/{address}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The customer id."},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"tags":["Customers"],"operationId":"deleteCustomerAddress","summary":"Delete a saved address","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/orders":{"get":{"tags":["Orders"],"operationId":"listOrders","summary":"List orders","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: the id of the last object on the previous page."},{"name":"created_gte","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"created_lt","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":""},{"name":"payment_status","in":"query","required":false,"schema":{"type":"string"},"description":"unpaid|pending|paid"},{"name":"customer","in":"query","required":false,"schema":{"type":"string"},"description":"A customer id."},{"name":"number","in":"query","required":false,"schema":{"type":"string"},"description":"The order number customers see."},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"description":"whatsapp|ad|website|link|agent|api"},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"},"description":""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/orders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The order id."}],"get":{"tags":["Orders"],"operationId":"getOrder","summary":"Retrieve an order","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Orders"],"operationId":"updateOrder","summary":"Set your external_id and metadata on an order","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/orders/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The order id."}],"post":{"tags":["Orders"],"operationId":"cancelOrder","summary":"Cancel an unpaid order","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/orders/{id}/require_payment":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The order id."}],"post":{"tags":["Orders"],"operationId":"requirePayment","summary":"Ask the customer to pay before delivery (full or the shop's deposit)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"enum":["full","deposit"],"default":"full"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/orders/{id}/events":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The order id."}],"get":{"tags":["Orders"],"operationId":"listOrderHistory","summary":"An order's history","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/checkout_sessions":{"get":{"tags":["Checkout sessions"],"operationId":"listCheckoutSessions","summary":"List checkout sessions","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: the id of the last object on the previous page."},{"name":"created_gte","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"created_lt","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"open|claimed|completed|expired"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSession"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Checkout sessions"],"operationId":"createCheckoutSession","summary":"Create a cart the customer finishes on WhatsApp (returns a wa.me url)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"product":{"type":"string"},"external_id":{"type":"string"},"code":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}}},"source":{"enum":["website","agent","ad","link","api"]},"customer":{"type":"object","properties":{"phone":{"type":"string"},"name":{"type":"string"}}},"attribution":{"type":"object","description":"Your tracking fields (UTM tags…), copied to the order."},"expires_in":{"type":"integer","minimum":300,"maximum":604800},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/checkout_sessions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The checkout session id."}],"get":{"tags":["Checkout sessions"],"operationId":"getCheckoutSession","summary":"Retrieve a checkout session","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/checkout_sessions/{id}/expire":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The checkout session id."}],"post":{"tags":["Checkout sessions"],"operationId":"expireCheckoutSession","summary":"Expire an open session","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/insights":{"get":{"tags":["Shop"],"operationId":"getInsights","summary":"Sales, top products, delivery performance, repeat customers","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer"},"description":"1–365, default 30"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/events":{"get":{"tags":["Events"],"operationId":"listEvents","summary":"List events","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."},{"name":"starting_after","in":"query","required":false,"schema":{"type":"string"},"description":"Cursor: the id of the last object on the previous page."},{"name":"created_gte","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"created_lt","in":"query","required":false,"schema":{"type":"integer"},"description":"Unix seconds."},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"A type or prefix like order.*"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/events/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The event id."}],"get":{"tags":["Events"],"operationId":"getEvent","summary":"Retrieve an event","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook_endpoints":{"get":{"tags":["Webhook endpoints"],"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Webhook endpoints"],"operationId":"createWebhookEndpoint","summary":"Create a webhook endpoint (returns its signing secret)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes a retried POST safe. See /docs/idempotency."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"enabled_events":{"type":"array","items":{"enum":["*","order.created","order.paid","order.deposit_paid","order.payment_required","order.payment_failed","order.dispatched","order.picked_up","order.arrived","order.delivered","order.delivery_failed","order.ready_for_pickup","order.cancelled","order.refund_needed","order.rated","customer.created","cart.abandoned","checkout_session.completed"]}}}}}}},"responses":{"201":{"description":"Created (includes secret)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook_endpoints/event_types":{"get":{"tags":["Webhook endpoints"],"operationId":"listEventTypes","summary":"Every event type","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/webhook_endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."}],"get":{"tags":["Webhook endpoints"],"operationId":"getWebhookEndpoint","summary":"Retrieve","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Webhook endpoints"],"operationId":"updateWebhookEndpoint","summary":"Update","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string"}},"disabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Webhook endpoints"],"operationId":"deleteWebhookEndpoint","summary":"Delete","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook_endpoints/{id}/test":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."}],"post":{"tags":["Webhook endpoints"],"operationId":"testWebhookEndpoint","summary":"Send a signed ping now","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/webhook_endpoints/{id}/reveal_secret":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."}],"post":{"tags":["Webhook endpoints"],"operationId":"revealWebhookSecret","summary":"Reveal the signing secret","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/webhook_endpoints/{id}/rotate_secret":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."}],"post":{"tags":["Webhook endpoints"],"operationId":"rotateWebhookSecret","summary":"Rotate the signing secret","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/webhook_endpoints/{id}/deliveries":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."}],"get":{"tags":["Webhook endpoints"],"operationId":"listWebhookDeliveries","summary":"Recent delivery attempts","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"1–100, default 20."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/webhook_endpoints/{id}/deliveries/{delivery}/retry":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook endpoint id."},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Webhook endpoints"],"operationId":"retryWebhookDelivery","summary":"Re-send a delivery now","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthenticated"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"webhooks":{"order.created":{"post":{"operationId":"webhook_order_created","summary":"order.created","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.paid":{"post":{"operationId":"webhook_order_paid","summary":"order.paid","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.deposit_paid":{"post":{"operationId":"webhook_order_deposit_paid","summary":"order.deposit_paid","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.payment_required":{"post":{"operationId":"webhook_order_payment_required","summary":"order.payment_required","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.payment_failed":{"post":{"operationId":"webhook_order_payment_failed","summary":"order.payment_failed","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.dispatched":{"post":{"operationId":"webhook_order_dispatched","summary":"order.dispatched","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.picked_up":{"post":{"operationId":"webhook_order_picked_up","summary":"order.picked_up","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.arrived":{"post":{"operationId":"webhook_order_arrived","summary":"order.arrived","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.delivered":{"post":{"operationId":"webhook_order_delivered","summary":"order.delivered","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.delivery_failed":{"post":{"operationId":"webhook_order_delivery_failed","summary":"order.delivery_failed","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.ready_for_pickup":{"post":{"operationId":"webhook_order_ready_for_pickup","summary":"order.ready_for_pickup","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.cancelled":{"post":{"operationId":"webhook_order_cancelled","summary":"order.cancelled","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.refund_needed":{"post":{"operationId":"webhook_order_refund_needed","summary":"order.refund_needed","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"order.rated":{"post":{"operationId":"webhook_order_rated","summary":"order.rated","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"customer.created":{"post":{"operationId":"webhook_customer_created","summary":"customer.created","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"cart.abandoned":{"post":{"operationId":"webhook_cart_abandoned","summary":"cart.abandoned","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}},"checkout_session.completed":{"post":{"operationId":"webhook_checkout_session_completed","summary":"checkout_session.completed","description":"Signed per Standard Webhooks: headers webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>). See /docs/webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Return any 2xx quickly."}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"kb_test_… / kb_live_…"}},"responses":{"InvalidRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthenticated":{"description":"Missing, invalid or wrong-environment key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The object's state doesn't allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message","doc_url"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","not_found_error","conflict_error","idempotency_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"doc_url":{"type":"string"}}}}},"Shop":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"shop"},"name":{"type":"string"},"slug":{"type":["string","null"]},"livemode":{"type":"boolean"},"whatsapp":{"type":["object","null"],"properties":{"phone":{"type":"string"},"url":{"type":"string"}}},"currency":{"const":"KES"}}},"Product":{"type":"object","required":["id","object","name","price","currency","active"],"properties":{"id":{"type":"string","examples":["pr_9f2c…"]},"object":{"const":"product"},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"integer","description":"Unit price. In cents (KES): 25000 = KES 250."},"currency":{"const":"KES"},"active":{"type":"boolean"},"stock":{"type":["integer","null"]},"available":{"type":["integer","null"],"description":"stock minus units held by open orders."},"image_url":{"type":["string","null"]},"code":{"type":["string","null"],"description":"Share code: 'P-<code>' sent to the shop opens this product."},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."},"created":{"type":"integer"},"updated":{"type":"integer"}}},"Address":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"address"},"label":{"type":["string","null"]},"lat":{"type":"number"},"lng":{"type":"number"},"landmark":{"type":["string","null"]},"last_used":{"type":["integer","null"]},"created":{"type":"integer"}}},"Customer":{"type":"object","required":["id","object"],"properties":{"id":{"type":"string"},"object":{"const":"customer"},"name":{"type":["string","null"]},"phone":{"type":["string","null"],"description":"E.164. null for WhatsApp username users who haven't shared a number."},"mpesa_phone":{"type":["string","null"]},"whatsapp_user_id":{"type":["string","null"]},"email":{"type":["string","null"]},"notes":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"delivered_orders":{"type":"integer"},"refused_orders":{"type":"integer"},"payment_terms":{"enum":["default","pay_first","trusted"],"description":"Set by the shop."},"order_count":{"type":"integer","description":"On retrieve."},"total_spent":{"type":"integer","description":"Paid orders, on retrieve. In cents (KES): 25000 = KES 250."},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"},"description":"On retrieve."},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."},"last_message_at":{"type":["integer","null"]},"created":{"type":"integer"}}},"Order":{"type":"object","required":["id","object","number","status","total","items"],"properties":{"id":{"type":"string","examples":["ord_0196…"]},"object":{"const":"order"},"number":{"type":"integer","description":"Per-shop order number customers see (#128)."},"status":{"enum":["awaiting_payment","confirmed","dispatched","delivered","ready","collected","failed","cancelled"]},"source":{"type":"string"},"currency":{"const":"KES"},"subtotal":{"type":"integer","description":" In cents (KES): 25000 = KES 250."},"delivery_fee":{"type":"integer","description":" In cents (KES): 25000 = KES 250."},"total":{"type":"integer","description":" In cents (KES): 25000 = KES 250."},"payment":{"type":"object","properties":{"mode":{"enum":["pay_now","pay_on_delivery"]},"status":{"enum":["unpaid","pending","partial","paid"]},"amount_paid":{"type":"integer"},"amount_due":{"type":"integer"},"upfront_due":{"type":"integer","description":"Owed before the order goes ahead (deposit, whole order, or 0)."},"upfront_required_by":{"type":["string","null"],"enum":["policy","shop",null]},"paid_at":{"type":["integer","null"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"method":{"enum":["mpesa","link","cash"]},"provider":{"type":"string"},"amount":{"type":"integer"},"status":{"type":"string"},"receipt":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"created":{"type":"integer"}}}}}},"items":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"product_external_id":{"type":["string","null"]},"name":{"type":["string","null"]},"quantity":{"type":"integer"},"unit_price":{"type":"integer"},"amount":{"type":"integer"}}}},"customer":{"anyOf":[{"$ref":"#/components/schemas/Customer"},{"type":"null"}]},"fulfilment":{"enum":["delivery","pickup"]},"delivery":{"type":["object","null"],"properties":{"location":{"type":["object","null"],"properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"landmark":{"type":["string","null"]},"instructions":{"type":["string","null"]},"distance_km":{"type":["number","null"]},"status":{"type":["string","null"],"description":"assigned | picked_up | arrived | delivered | failed | cancelled"},"rider":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"eta_minutes":{"type":["integer","null"]},"failure_reason":{"type":["string","null"]}}},"pickup":{"type":["object","null"],"properties":{"code":{"type":["string","null"]},"ready_at":{"type":["integer","null"]}}},"attribution":{"type":["object","null"],"description":"Ad click (ctwaClid, sourceId, headline) or checkout session (checkoutSession, UTM tags) that led to the order."},"rating":{"type":["integer","null"]},"cancel_reason":{"type":["string","null"]},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."},"created":{"type":"integer"},"updated":{"type":"integer"}}},"CheckoutSession":{"type":"object","required":["id","object","code","status","items"],"properties":{"id":{"type":"string"},"object":{"const":"checkout_session"},"code":{"type":"string","examples":["C-7K2Q9"]},"url":{"type":["string","null"],"description":"wa.me link that opens WhatsApp with the order message ready to send."},"status":{"enum":["open","claimed","completed","expired"]},"items":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"quantity":{"type":"integer"}}}},"source":{"type":"string"},"customer":{"type":["object","null"]},"order":{"type":["string","null"]},"attribution":{"type":"object"},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your id for this object. Unique per shop."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"description":"Your key/value pairs. Merged on update; set a key to \"\" to remove it."},"expires_at":{"type":"integer"},"created":{"type":"integer"}}},"Event":{"type":"object","required":["id","object","type","created","data"],"properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"enum":["order.created","order.paid","order.deposit_paid","order.payment_required","order.payment_failed","order.dispatched","order.picked_up","order.arrived","order.delivered","order.delivery_failed","order.ready_for_pickup","order.cancelled","order.refund_needed","order.rated","customer.created","cart.abandoned","checkout_session.completed"]},"created":{"type":"integer"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook_endpoint"},"url":{"type":"string"},"description":{"type":["string","null"]},"enabled_events":{"type":"array","items":{"type":"string"}},"status":{"enum":["enabled","disabled"]},"secret":{"type":"string","description":"Only on create, reveal and rotate."},"created":{"type":"integer"}}}}}}