{"openapi":"3.0.3","info":{"title":"Hive WhatsApp public API","version":"1.0.0","description":"Send messages, manage templates, upload media, and receive WhatsApp events with an API key (`hk_live_` or `hk_test_`). Authorization: `Bearer hk_live_…`. `POST /messages` and `POST /messages/bulk` require `Idempotency-Key`. A missing subscription is `402 WHATSAPP_API_SUBSCRIPTION_REQUIRED`. Session messages support text, media (image/video/document/audio), and interactive buttons or lists inside the 24h window. Optional Cloud API passthrough: POST /cloud/{phone_number_id}/messages with Meta-shaped JSON. Catalog, payments, groups, and calling are not part of this API. Meta stays on Hive's webhook. You register one HTTPS URL here and choose events."},"servers":[{"url":"https://backend.theaihive.io/wa/v1"},{"url":"/wa/v1"}],"tags":[{"name":"HTTP API","description":"Keys, numbers, templates, media, profile, contacts, and messages."},{"name":"Webhooks","description":"One HTTPS callback per workspace. Hive POSTs the envelope below with headers `X-Hive-Signature` (`sha256=` HMAC-SHA256 of the raw body), `X-Hive-Event`, `X-Hive-Delivery-Id`, and `X-Hive-Timestamp`. ACK with HTTP 2xx within 5s. These are inbound delivery headers, not parameters on PUT /webhooks.\n\n```json\n{\n  \"id\": \"whd_01J…\",\n  \"event\": \"message.status\",\n  \"created_at\": \"2026-09-26T18:01:02.000Z\",\n  \"workspace_id\": \"ws_…\",\n  \"number\": {\n    \"id\": \"pn_…\",\n    \"display\": \"9198xxxxxxx\",\n    \"phone_number_id\": \"123…\"\n  },\n  \"data\": {\n    \"message_id\": \"msg_…\",\n    \"wamid\": \"wamid.…\",\n    \"to\": \"9197xxxxxxx\",\n    \"status\": \"delivered\",\n    \"callback_data\": \"order-123\"\n  }\n}\n```"}],"x-webhook-delivery":"Hive POSTs JSON to your HTTPS URL. Reply with HTTP 2xx within 5 seconds. The body of your reply is ignored. Failed deliveries retry after 15 seconds, 1 minute, 10 minutes, and 1 hour, then stop. Headers: `X-Hive-Signature` (`sha256=` plus HMAC-SHA256 of the raw body using the webhook secret), `X-Hive-Event`, `X-Hive-Delivery-Id`, `X-Hive-Timestamp`. A webhook receives an event only when that event and that number are both attached. `history.sync` is off unless you attach it.","x-webhook-events":[{"event":"message.inbound","summary":"A customer wrote the business. Includes text, media type, and button or list reply ids when present.","example":{"id":"whd_01J…","event":"message.inbound","created_at":"2026-09-27T12:00:00.000Z","workspace_id":"ws_…","number":{"id":"ch_…","display":"9198xxxxxxx","phone_number_id":"123…"},"data":{"from":"9197xxxxxxx","type":"interactive","text":"","contact_name":"Ava","interactive_id":"track","interactive_title":"Track order","timestamp":"2026-09-27T12:00:00.000Z"}},"label":"Inbound message"},{"event":"message.status","summary":"sent, delivered, read, or failed. callback_data from the send is echoed here.","example":{"id":"whd_01J…","event":"message.status","created_at":"2026-09-26T18:01:02.000Z","workspace_id":"ws_…","number":{"id":"pn_…","display":"9198xxxxxxx","phone_number_id":"123…"},"data":{"message_id":"msg_…","wamid":"wamid.…","to":"9197xxxxxxx","status":"delivered","callback_data":"order-123"}},"label":"Delivery status"},{"event":"message.echo","summary":"A message sent from the WhatsApp Business app on a coexistence number.","example":{"event":"message.echo","data":{"from":"9198xxxxxxx","type":"text","text":"Sent from the phone"}},"label":"Business app echo"},{"event":"message.click","summary":"The customer tapped a tracked URL or call-to-action.","example":{"event":"message.click","data":{"click":{"type":"url","from":"9197xxxxxxx"}}},"label":"Link or button click"},{"event":"message.opt_out","summary":"The customer stopped or paused marketing messages.","example":{"event":"message.opt_out","data":{"preferences":[{"wa_id":"9197xxxxxxx","value":"stop"}]}},"label":"Marketing opt-out"},{"event":"template.status","summary":"Template approved, rejected, paused, quality changed, category changed, or components changed.","example":{"event":"template.status","data":{"field":"message_template_status_update","name":"order_update","language":"en_US","status":"APPROVED","template_id":"123"}},"label":"Template status"},{"event":"phone.quality","summary":"Number quality rating changed (GREEN, YELLOW, RED) or the messaging limit changed.","example":{"event":"phone.quality","data":{"quality_rating":"YELLOW","event":"FLAGGED","limit":"TIER_1K"}},"label":"Number quality"},{"event":"phone.name","summary":"Display name review finished.","example":{"event":"phone.name","data":{"decision":"APPROVED","requested_name":"Acme"}},"label":"Display name review"},{"event":"account.update","summary":"WABA ban, restriction, review, or account alert.","example":{"event":"account.update","data":{"field":"account_update","event":"ACCOUNT_RESTRICTION"}},"label":"Account update"},{"event":"capability.update","summary":"Daily conversation limit or phone-number capacity changed.","example":{"event":"capability.update","data":{"messaging_limit":"TIER_10K"}},"label":"Messaging limit"},{"event":"flow.complete","summary":"A WhatsApp Flow was submitted.","example":{"event":"flow.complete","data":{"flow":{"flow_token":"order"}}},"label":"Flow reply"},{"event":"history.sync","summary":"Coexistence history import. Off unless you attach this event. It is noisy.","example":{"event":"history.sync","data":{"from":"9197xxxxxxx","type":"text","text":"Older chat"}},"label":"History sync"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: `Authorization: Bearer hk_live_…` or `hk_test_…`."}},"parameters":{"Authorization":{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"example":"Bearer hk_live_…","description":"Bearer API key (`hk_live_` or `hk_test_`)."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1},"description":"Required on POST /messages. Same key + different body → 409 IDEMPOTENCY_KEY_REUSED."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"MediaRef":{"type":"object","properties":{"id":{"type":"string","description":"Graph media id from POST /media"},"link":{"type":"string","format":"uri"},"caption":{"type":"string"},"filename":{"type":"string"},"mime_type":{"type":"string"}}},"SendMessage":{"type":"object","required":["from","to","type"],"properties":{"from":{"type":"string","description":"Connected number display, phone_number_id, or Hive channel id."},"to":{"type":"string"},"type":{"type":"string","enum":["template","text","image","video","document","audio","interactive"]},"template":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"body":{"type":"array","items":{"type":"string"}},"header":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","document","text"]},"url":{"type":"string"},"text":{"type":"string"}}}}},"text":{"type":"object","properties":{"body":{"type":"string"}}},"image":{"$ref":"#/components/schemas/MediaRef"},"video":{"$ref":"#/components/schemas/MediaRef"},"document":{"$ref":"#/components/schemas/MediaRef"},"audio":{"$ref":"#/components/schemas/MediaRef"},"interactive":{"type":"object"},"callback_data":{"type":"string","maxLength":256}}}}},"paths":{"/me":{"get":{"operationId":"getMe","tags":["HTTP API"],"summary":"Key metadata","parameters":[{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"description":"Workspace, key id, prefix, optional number lock, scopes.","content":{"application/json":{"example":{"workspace_id":"ws_…","key_id":"key_…","prefix":"hk_live_abcd1234","channel_id":null,"scopes":[]}}}},"402":{"description":"WhatsApp API duration not active","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"example":{"error":"WhatsApp API duration not active","code":"WHATSAPP_API_SUBSCRIPTION_REQUIRED"}}}}}}},"/numbers":{"get":{"operationId":"listNumbers","tags":["HTTP API"],"summary":"List connected WhatsApp numbers","parameters":[{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"description":"Active Cloud + coexistence numbers.","content":{"application/json":{"example":{"numbers":[{"id":"ch_…","display":"9198xxxxxxx","phone_number_id":"123…","quality":"GREEN"}]}}}}}}},"/templates":{"get":{"operationId":"listTemplates","tags":["HTTP API"],"summary":"List templates","description":"Every template on the number, including rejected and paused. Scope `templates:read`. Optional `status` filters the list (APPROVED, PENDING, REJECTED).","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"Number display, phone_number_id, or channel id."},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Templates with components, quality, and whether they can be edited or deleted.","content":{"application/json":{"example":{"templates":[{"id":"123","name":"order_update","language":"en_US","status":"APPROVED","category":"UTILITY","components":[{"type":"BODY","text":"Hello {{1}}"}]}]}}}},"400":{"description":"from is required"}}},"post":{"operationId":"createTemplate","tags":["HTTP API"],"summary":"Create a template","description":"Submits a template to Meta for review. Scope `templates:write`. Name and language cannot be changed later. Variable samples go in `samples`. A media header needs `samples.headerHandle` from POST /templates/header-sample. Category is UTILITY, MARKETING, or AUTHENTICATION.","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"from":"9198xxxxxxx","name":"order_update","category":"UTILITY","language":"en_US","components":[{"type":"body","parameters":[{"type":"text","text":"Hello {{1}}, order {{2}}"}]}],"samples":{"body":["Ava","ORD-104"]}}}}},"responses":{"201":{"description":"Submitted. Status is usually PENDING until Meta reviews it. Watch template.status.","content":{"application/json":{"example":{"id":"123","name":"order_update","status":"PENDING","category":"UTILITY","language":"en_US"}}}}}}},"/templates/header-sample":{"post":{"operationId":"uploadTemplateHeaderSample","tags":["HTTP API"],"summary":"Upload a template header sample","description":"Multipart field `file` plus `from`. Returns the handle to put in samples.headerHandle. Scope `templates:write`. Max 16 MB.","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"example":{"file":"<binary>","from":"9198xxxxxxx"}}}},"responses":{"200":{"description":"Resumable-upload handle.","content":{"application/json":{"example":{"handle":"4::aW..."}}}}}}},"/templates/{name}":{"get":{"operationId":"getTemplate","tags":["HTTP API"],"summary":"Get a template by name or id","description":"Numeric path is the Meta template id and returns `{ template }`. A name returns `{ templates }` for each language. Optional query `language`.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"One template when the path is a numeric id. A name returns every language.","content":{"application/json":{"example":{"template":{"id":"123","name":"order_update","language":"en_US","status":"APPROVED","category":"UTILITY"}}}}},"404":{"description":"Template not found"}}},"delete":{"operationId":"deleteTemplate","tags":["HTTP API"],"summary":"Delete a template","description":"Deletes every language of this name on the WhatsApp account. Scope `templates:write`. Query `from` is required.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted. Empty body."},"404":{"description":"Template not found"}}}},"/templates/{hsmId}":{"post":{"operationId":"editTemplate","tags":["HTTP API"],"summary":"Edit a template","description":"Path is the numeric template id from the list. Name and language stay the same. Editing an approved template sends it back to review. Meta also enforces a cooldown. Scope `templates:write`.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"hsmId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"example":{"from":"9198xxxxxxx","category":"UTILITY","components":[{"type":"body","parameters":[{"type":"text","text":"Hello {{1}}"}]}],"samples":{"body":["Ava"]}}}}},"responses":{"200":{"description":"Updated template.","content":{"application/json":{"example":{"id":"123","name":"order_update","language":"en_US","status":"PENDING","category":"UTILITY"}}}},"400":{"description":"Template cannot be edited right now."}}}},"/media":{"post":{"operationId":"uploadMedia","tags":["HTTP API"],"summary":"Upload media","description":"Multipart `file` plus `from`. Returns a media id you can send. Scope `messages:send`. Max 16 MB.","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"example":{"file":"<binary>","from":"9198xxxxxxx"}}}},"responses":{"201":{"description":"Graph media id.","content":{"application/json":{"example":{"id":"987654"}}}}}}},"/media/{id}":{"get":{"operationId":"downloadMedia","tags":["HTTP API"],"summary":"Download media","description":"Streams the file. Query `from` selects the number whose token can read it. Scope `media:read`. Files over 20 MB are refused.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Raw file bytes. Content-Type is the media type."},"413":{"description":"Larger than 20 MB"}}}},"/window":{"get":{"operationId":"getWindow","tags":["HTTP API"],"summary":"24-hour session window","description":"Whether a free-form session message to this customer is allowed. Closed windows still accept templates.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"open is false when this customer has not written in the last 24 hours.","content":{"application/json":{"example":{"open":true,"closes_at":"2026-09-28T12:00:00.000Z","last_inbound_at":"2026-09-27T12:00:00.000Z"}}}}}}},"/profile":{"get":{"operationId":"getProfile","tags":["HTTP API"],"summary":"Business profile","description":"About, address, description, email, websites, and vertical for the number.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"from","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile fields.","content":{"application/json":{"example":{"profile":{"about":"Orders and support","email":"hi@example.com"}}}}}}},"patch":{"operationId":"updateProfile","tags":["HTTP API"],"summary":"Update business profile","description":"Send only the fields you want to change. About is 1–139 characters. At most two websites.","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"from":"9198xxxxxxx","about":"Orders and support","websites":["https://example.com"]}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"example":{"ok":true}}}}}}},"/contacts":{"post":{"operationId":"upsertContact","tags":["HTTP API"],"summary":"Create or match a contact","description":"Matches an existing contact by phone. Creates one when the phone is new. Email is saved when you send it.","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"phone":"9197xxxxxxx","name":"Ava","email":"ava@example.com"}}}},"responses":{"200":{"description":"Existing contact.","content":{"application/json":{"example":{"id":"ct_…","created":false}}}},"201":{"description":"Created.","content":{"application/json":{"example":{"id":"ct_…","created":true}}}}}}},"/messages/bulk":{"post":{"operationId":"sendBulk","tags":["HTTP API"],"summary":"Send one template to many recipients","description":"Up to 50 recipients, one template. Requires Idempotency-Key. Each recipient is sent on its own. A failure for one number is an `error` on that row. The HTTP status stays 202.","parameters":[{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"from":"9198xxxxxxx","type":"template","template":{"name":"order_update","language":"en_US","body":["Ava","ORD-104"]},"to":["9197xxxxxxx","9196xxxxxxx"],"callback_data":"batch-9"}}}},"responses":{"202":{"description":"Per-recipient results.","content":{"application/json":{"example":{"results":[{"to":"9197xxxxxxx","id":"msg_…","status":"queued"}]}}}}}}},"/messages":{"post":{"operationId":"sendMessage","tags":["HTTP API"],"summary":"Send a template or session message","description":"Template sends work outside the 24-hour window. Session types (text, media, interactive) require GET /window open. Upload media with POST /media and pass the returned id on image/video/document/audio. Interactive supports up to 3 reply buttons or one list message.","x-scopes":["messages:send"],"parameters":[{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"},"example":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"template","template":{"name":"order_update","language":"en_US","body":["Ava","ORD-104"],"header":{"type":"image","url":"https://example.com/order.png"}},"callback_data":"order-104"},"examples":{"template":{"summary":"Template","value":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"template","template":{"name":"order_update","language":"en_US","body":["Ava","ORD-104"],"header":{"type":"image","url":"https://example.com/order.png"}},"callback_data":"order-104"}},"text":{"summary":"Session text","value":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"text","text":{"body":"Your rider is 5 min away"}}},"image":{"summary":"Session image","value":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"image","image":{"id":"987654","caption":"Your receipt"}}},"interactive_buttons":{"summary":"Interactive buttons","value":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"interactive","interactive":{"kind":"buttons","body":"Need help with order ORD-104?","buttons":[{"id":"track","title":"Track order"},{"id":"agent","title":"Talk to agent"}]}}},"interactive_list":{"summary":"Interactive list","value":{"from":"9198xxxxxxx","to":"9197xxxxxxx","type":"interactive","interactive":{"kind":"list","body":"Pick a support topic","button_text":"Topics","sections":[{"rows":[{"id":"billing","title":"Billing"},{"id":"shipping","title":"Shipping"}]}]}}}}}}},"responses":{"202":{"description":"Queued. Later statuses arrive on the developer webhook.","content":{"application/json":{"example":{"id":"msg_…","wamid":"wamid.…","status":"queued"}}}},"400":{"description":"Idempotency-Key header is required, or invalid body."},"402":{"description":"WhatsApp wallet hold failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"example":{"error":"WhatsApp wallet hold failed","code":"WA_WALLET_INSUFFICIENT"}}}},"403":{"description":"Smartping credit line missing","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"example":{"error":"Smartping credit line missing","code":"WA_CREDIT_LINE_MISSING"}}}},"409":{"description":"`SESSION_WINDOW_CLOSED` when the 24h window is closed and type is not template. `IDEMPOTENCY_KEY_REUSED` when the same Idempotency-Key is sent with a different body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"examples":{"window":{"value":{"error":"Session window closed","code":"SESSION_WINDOW_CLOSED"}},"idempotency":{"value":{"error":"Idempotency key reused with a different body","code":"IDEMPOTENCY_KEY_REUSED"}}}}}}}}},"/messages/{id}":{"get":{"operationId":"getMessage","tags":["HTTP API"],"summary":"Get a sent message by Hive id or wamid","parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Last known status.","content":{"application/json":{"example":{"id":"msg_…","wamid":"wamid.…","to":"9197xxxxxxx","status":"delivered","created_at":"2026-09-26T18:01:02.000Z"}}}},"404":{"description":"Message not found"}}}},"/webhooks":{"get":{"operationId":"getWebhook","tags":["Webhooks"],"summary":"Get webhook config","x-scopes":["webhooks:manage"],"parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"multi","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, returns { webhooks: [...] } for every active endpoint."}],"responses":{"200":{"description":"URL, events, whether a secret is stored (secret never returned).","content":{"application/json":{"example":{"url":"https://crm.example.com/webhooks/hive-wa","events":["message.inbound","message.status"],"channel_ids":["ch_…"],"hasSecret":true}}}}}},"post":{"operationId":"createWebhook","tags":["Webhooks"],"summary":"Create a webhook for specific numbers","x-scopes":["webhooks:manage"],"parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"url":"https://crm.example.com/webhooks/hive-wa-2","secret":"whsec_32_chars_minimum________","events":["message.inbound","message.status","template.status"],"channelIds":["ch_…"]}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"example":{"id":"uuid","url":"https://crm.example.com/webhooks/hive-wa-2","events":["message.inbound","message.status"],"channelIds":["ch_…"],"hasSecret":true}}}}}},"put":{"operationId":"putWebhook","tags":["Webhooks"],"summary":"Set tunnel URL, secret, and event filter","parameters":[{"$ref":"#/components/parameters/Authorization"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","secret"],"properties":{"url":{"type":"string","description":"HTTPS callback URL."},"secret":{"type":"string","minLength":8,"description":"HMAC key. Shown only at set time."},"events":{"type":"array","description":"Subset of webhook events. Omitted means message.inbound and message.status. Attach history.sync only if you want coexistence history.","items":{"type":"string","enum":["message.inbound","message.status","message.echo","message.click","message.opt_out","template.status","phone.quality","phone.name","account.update","capability.update","flow.complete","history.sync"]}},"channel_ids":{"type":"array","description":"Hive channel ids that receive events. Omit to keep the current attachment.","items":{"type":"string","format":"uuid"}}}},"example":{"url":"https://crm.example.com/webhooks/hive-wa","secret":"whsec_32_chars_minimum________","events":["message.inbound","message.status"],"channel_ids":["ch_…"]}}}},"x-scopes":["webhooks:manage"],"responses":{"200":{"description":"Saved. Secret is not echoed.","content":{"application/json":{"example":{"ok":true,"url":"https://crm.example.com/webhooks/hive-wa","events":["message.inbound","message.status"]}}}},"400":{"description":"url must be https"}}}},"/webhooks/test":{"post":{"operationId":"testWebhook","tags":["Webhooks"],"summary":"Enqueue a sample message.status delivery","description":"Pushes a sample envelope to the configured URL.\n\n```json\n{\n  \"id\": \"whd_01J…\",\n  \"event\": \"message.status\",\n  \"created_at\": \"2026-09-26T18:01:02.000Z\",\n  \"workspace_id\": \"ws_…\",\n  \"number\": {\n    \"id\": \"pn_…\",\n    \"display\": \"9198xxxxxxx\",\n    \"phone_number_id\": \"123…\"\n  },\n  \"data\": {\n    \"message_id\": \"msg_…\",\n    \"wamid\": \"wamid.…\",\n    \"to\": \"9197xxxxxxx\",\n    \"status\": \"delivered\",\n    \"callback_data\": \"order-123\"\n  }\n}\n```","parameters":[{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"description":"Queued.","content":{"application/json":{"example":{"ok":true}}}},"400":{"description":"Save a webhook URL and secret before sending a test."}}}},"/webhooks/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"summary":"Recent delivery attempts","x-scopes":["webhooks:manage"],"parameters":[{"$ref":"#/components/parameters/Authorization"}],"responses":{"200":{"description":"Last 20 deliveries.","content":{"application/json":{"example":{"deliveries":[{"id":"uuid","event":"message.status","status":"delivered","attempts":1,"response_code":200,"created_at":"2026-09-26T18:01:02.000Z"}]}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","tags":["Webhooks"],"summary":"Delete a webhook endpoint","x-scopes":["webhooks:manage"],"parameters":[{"$ref":"#/components/parameters/Authorization"},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"example":{"ok":true}}}},"404":{"description":"Webhook not found"}}}},"/cloud/{phoneNumberId}/messages":{"post":{"operationId":"sendCloudMessage","tags":["Cloud API"],"summary":"Send using Meta Cloud API JSON","description":"Same auth and Idempotency-Key rules as POST /messages. Hive injects the access token and runs wallet/policy checks. Body must be a Meta `POST /{phone-number-id}/messages` payload (messaging_product, to, type, …).","x-scopes":["messages:send"],"parameters":[{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"phoneNumberId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"example":{"messaging_product":"whatsapp","to":"9197xxxxxxx","type":"text","text":{"body":"Hello from Cloud API shape"}}}}},"responses":{"202":{"description":"Queued.","content":{"application/json":{"example":{"id":"msg_…","wamid":"wamid.…","status":"queued"}}}}}}}}}