{"openapi":"3.0.1","info":{"version":"5.0.1","title":"WhatsApp API – Official (Meta Cloud API) & Unofficial","description":"Unified WhatsApp API: connect via the <b>Official WhatsApp Cloud API (Meta)</b> or the <b>Unofficial API (QR Code)</b> — same platform, same SDK, same webhook format. WAME is a <b>Meta Business Partner</b>.<br/>Send and receive messages, manage contacts, run official templates and automate conversations. Unlike unofficial-only providers, and self-hosted projects (Evolution, Baileys), WAME offers both models together.<br/>The unofficial layer is independent and not affiliated with, endorsed, or supported by WhatsApp Inc.; the official layer runs on Meta's WhatsApp Cloud API.","contact":{"name":"Sign Up","url":"https://api-wa.me/sign-up"}},"servers":[{"url":"https://us.api-wa.me","description":""},{"url":"https://server.api-wa.me","description":""},{"url":"http://0.0.0.0:3002","description":"Development"}],"paths":{"/{key}/instance":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the current instance status, connection state, QR code availability, and profile information.","summary":"Get instance details","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceInfo","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Initiates a new WhatsApp connection. Returns a QR code that must be scanned with the WhatsApp mobile app to authenticate.","summary":"Connect via QR Code","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceConnect","security":[{},{"accessToken":[]}]},"patch":{"responses":{"200":{"description":"Success"}},"description":"Configures instance behavior: auto-read messages, media saving, status message reception, and presence tracking.","summary":"Update instance settings","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"markMessageRead","schema":{"type":"boolean","enum":[false,true],"example":false}},{"in":"query","required":true,"name":"saveMedia","schema":{"type":"boolean","enum":[false,true],"example":false}},{"in":"query","required":true,"name":"receiveStatusMessage","schema":{"type":"boolean","enum":[false,true],"example":false}},{"in":"query","required":true,"name":"receivePresence","schema":{"type":"boolean","enum":[false,true],"example":false}}],"tags":["Instance"],"operationId":"instanceSetting","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Sets up webhook URLs for receiving real-time events (messages, connection changes, QR codes, etc.). Use allowWebhook to enable/disable and allowNumber to filter by phone numbers.","summary":"Configure webhooks","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaWebhook"}}}},"tags":["Instance"],"operationId":"instanceWebhook","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Disconnects the WhatsApp session and removes authentication data. The instance will need to re-authenticate via QR code or pairing code.","summary":"Disconnect and logout","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceLogout","security":[{},{"accessToken":[]}]}},"/{key}/instance/health":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns only whether the instance is connected. Unlike GET /instance, it makes no call to the Meta Graph API — use this one for monitoring and health checks.","summary":"Get instance connection status (cheap)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceHealth","security":[{},{"accessToken":[]}]}},"/{key}/instance/official/sync":{"post":{"responses":{"200":{"description":"Success"}},"description":"Asks Meta to send the business contacts (`smb_app_state_sync`) and up to 180 days of chat history (`history`) for a number onboarded in coexistence mode. Meta only sends those webhooks after this call — the Embedded Signup QR code merely collects the customer authorization. Each sync type is accepted only ONCE per onboarding and must be requested within 24h of it, so this endpoint skips a type already requested unless `force=true`. The incoming history and contacts are stored locally and delivered on the `webhookHistory` channel.","summary":"Request the WhatsApp Business app contacts and 6-month chat history (coexistence)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"tags":["Instance"],"operationId":"instanceOfficialSync","security":[{},{"accessToken":[]}]},"get":{"responses":{"200":{"description":"Success"}},"description":"Returns when each coexistence sync type (contacts / chat history) was requested, or null if never.","summary":"Coexistence sync status","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceOfficialSyncStatus","security":[{},{"accessToken":[]}]}},"/{key}/instance/meta/history-sync":{"post":{"responses":{"200":{"description":"Success"}},"description":"Fetches the conversations that already exist on the connected Instagram and Messenger accounts (Meta Conversations API) and stores them, so `GET /chat` and `GET /contacts` know who the customer was talking to before the instance was connected. Unlike WhatsApp coexistence there is no history webhook for these channels, so this pull is the only way to recover that past.\n\nBy default it pulls **everything Meta returns** — there is no time cutoff, because the real limit is not temporal: Meta caps each conversation at its **20 most recent messages**, with no pagination past that. A busy chat therefore comes back truncated — the goal is recovering who and when, not a full transcript. Pass `hours` only to NARROW the window (e.g. `hours=24`). Runs once per channel automatically when the instance loads; use `force=true` to run it again.","summary":"Pull recent Instagram and Messenger conversations into the instance","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"hours","required":false,"schema":{"type":"number"}}],"tags":["Instance"],"operationId":"instanceMetaHistorySync","security":[{},{"accessToken":[]}]},"get":{"responses":{"200":{"description":"Success"}},"description":"Returns when each channel (instagram, messenger) had its conversations pulled, or null if never.","summary":"Instagram / Messenger history sync status","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceMetaHistorySyncStatus","security":[{},{"accessToken":[]}]}},"/{key}/instance/web-session":{"post":{"responses":{"200":{"description":"Success"}},"description":"Receives a session exported by the WAME Passkey desktop app (passkey linking) and connects the instance without a QR code. Body: { session }.","summary":"Import a WhatsApp Web session (WAME Passkey app)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"session":{"type":"object"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceImportWebSession","security":[{},{"accessToken":[]}]}},"/{key}/instance/pairing-code":{"post":{"responses":{"200":{"description":"Success"}},"description":"Initiates a WhatsApp connection using a pairing code instead of QR code. Requires the phone number registered on WhatsApp.","summary":"Connect via pairing code","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"phoneNumber":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceRequestPairingCode","security":[{},{"accessToken":[]}]}},"/{key}/instance/mongodb":{"post":{"responses":{"200":{"description":"Success"}},"description":"Attaches a MongoDB database for cloud-based session and message storage. Provide the connection URI and database name.","summary":"Configure cloud MongoDB storage","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"uri":{"type":"string"},"dbName":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceAddMongoDb","security":[{},{"accessToken":[]}]}},"/{key}/instance/proxy":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sets an HTTP proxy for the WhatsApp connection. Recommended format: http://username:password@ip:port or http://ip:port","summary":"Configure connection proxy","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"proxy":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceSetProxy","security":[{},{"accessToken":[]}]}},"/{key}/instance/resync":{"post":{"responses":{"200":{"description":"Success"}},"description":"Forces a complete resynchronization of messages, contacts, and chats from WhatsApp servers. Use when data appears outdated or incomplete.","summary":"Force full data resync","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceResync","security":[{},{"accessToken":[]}]}},"/{key}/instance/restart":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Restart the instance (works even if it is not loaded)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceRestart","security":[{},{"accessToken":[]}]}},"/{key}/instance/status":{"put":{"responses":{"200":{"description":"Success"}},"description":"Changes the \"About\" text displayed on your WhatsApp profile. Supports emojis.","summary":"Update profile status text","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"type":"string","example":"😃"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceUpdateProfileStatus","security":[{},{"accessToken":[]}]}},"/{key}/instance/profile/picture":{"put":{"responses":{"200":{"description":"Success"}},"description":"Sets a new profile picture from a publicly accessible image URL.","summary":"Update profile picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceUpdateProfilePicture","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the current profile picture, reverting to the default placeholder.","summary":"Remove profile picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceRemoveProfilePicture","security":[{},{"accessToken":[]}]}},"/{key}/instance/profile/name":{"put":{"responses":{"200":{"description":"Success"}},"description":"Changes the display name shown on your WhatsApp profile.","summary":"Update profile display name","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceUpdateProfileName","security":[{},{"accessToken":[]}]}},"/{key}/instance/mobile/prepare":{"post":{"responses":{"200":{"description":"Success"}},"description":"Generate keys and prepare for mobile registration. This is step 1 of 3. The MCC (Mobile Country Code) is resolved automatically from the country code.","summary":"Prepare mobile registration","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"phoneNumberCountryCode":{"type":"string","example":"55"},"phoneNumberNationalNumber":{"type":"string","example":"11999999999"},"phoneNumberMobileNetworkCode":{"type":"string","example":"11"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceMobileRegisterPrepare","security":[{},{"accessToken":[]}]}},"/{key}/instance/mobile/request-code":{"post":{"responses":{"200":{"description":"Success"}},"description":"Request SMS or voice verification code. This is step 2 of 3. Must call /mobile/prepare first.","summary":"Request mobile verification code","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"method":{"type":"string","example":"sms"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceMobileRequestCode","security":[{},{"accessToken":[]}]}},"/{key}/instance/mobile/verify":{"post":{"responses":{"200":{"description":"Success"}},"description":"Verify the code received via SMS/voice and register the device. This is step 3 of 3.","summary":"Verify mobile code and register","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"code":{"type":"string","example":"123456"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceMobileVerifyCode","security":[{},{"accessToken":[]}]}},"/{key}/instance/official/register":{"post":{"responses":{"200":{"description":"Success"}},"description":"Registers the official number on the Cloud API using the 6-digit two-step verification PIN. Also used to re-register after a display name is approved. Body: { pin }.","summary":"Register the official number (Cloud API)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"pin":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceOfficialRegister","security":[{},{"accessToken":[]}]}},"/{key}/instance/official/deregister":{"post":{"responses":{"200":{"description":"Success"}},"description":"Removes the official number registration on the Cloud API.","summary":"Deregister the official number (Cloud API)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceOfficialDeregister","security":[{},{"accessToken":[]}]}},"/{key}/instance/official/two-step-pin":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sets or updates the official number 6-digit two-step verification PIN. Body: { pin }.","summary":"Set the two-step verification PIN (Cloud API)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"pin":{"type":"string"}},"type":"object"}}}},"tags":["Instance"],"operationId":"instanceOfficialTwoStepPin","security":[{},{"accessToken":[]}]}},"/{key}/instance/webhook/statistics":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns webhook delivery metrics including success/failure counts, response times, and recent delivery history.","summary":"Get webhook delivery statistics","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Instance"],"operationId":"instanceStatistics","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot":{"get":{"responses":{"200":{"description":"Success"}},"summary":"Retorna a config Chatwoot da instância (segredo mascarado)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Chatwoot"],"operationId":"chatwootGet","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/enable":{"post":{"responses":{"200":{"description":"Success"}},"description":"Recebe { baseUrl, inboxIdentifier, hmacSecret, apiAccessToken? }, valida a inbox e ativa o relay. O apiAccessToken (Perfil → Token de Acesso, no Chatwoot) é OPCIONAL e serve só para os riscos de entregue/lido: a API pública da inbox não atualiza status de mensagem. Campo vazio preserva o token já salvo, igual ao hmacSecret.","summary":"Ativa a integração Chatwoot (modo manual)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["Chatwoot"],"operationId":"chatwootEnable","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/provision":{"post":{"responses":{"200":{"description":"Success"}},"description":"Recebe { baseUrl, apiAccessToken, accountId?, channels? } e cria uma inbox API por canal, já apontando o webhook para cá e lendo inbox_identifier e segredo da própria resposta do Chatwoot. Cada inbox nasce com o nome e a foto da conta conectada (número do WhatsApp, @handle do Instagram, nome da Página). `channels` filtra os canais conectados; ausente = todos. Idempotente: rodar de novo ADOTA as inboxes que já existem em vez de duplicar — é a mesma chamada do botão \"Reparar\". Exige Token de Acesso de ADMINISTRADOR da conta: só administrador consegue ler o segredo do webhook pela API. Responde 409 com a lista de contas quando o token enxerga mais de uma — repita informando accountId.","summary":"Cria as inboxes do Chatwoot automaticamente (modo auto)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["Chatwoot"],"operationId":"chatwootProvision","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/inbox/disconnect":{"post":{"responses":{"200":{"description":"Success"}},"description":"Recebe { channel } e desliga a inbox daquele canal: zera o webhook_url no Chatwoot (ela para de entregar mensagens na hora) e tira a entrada da config. A inbox e TODO o histórico continuam existindo no Chatwoot do cliente — apagar levaria as conversas junto, sem lixeira. Reversível: o /provision readota a inbox pelo carimbo.","summary":"Desconecta a inbox de um canal (NÃO apaga nada no Chatwoot)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["Chatwoot"],"operationId":"chatwootDisconnectInbox","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/disable":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Desativa a integração Chatwoot","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Chatwoot"],"operationId":"chatwootDisable","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/webhook-token/regenerate":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Gera um novo token de webhook (invalida o anterior)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Chatwoot"],"operationId":"chatwootRegenerateToken","security":[{},{"accessToken":[]}]}},"/{key}/chatwoot/webhook":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Recebe eventos do Chatwoot (webhook da inbox)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"header","name":"x-chatwoot-signature","required":false,"schema":{"type":"string"}},{"in":"header","name":"x-chatwoot-timestamp","required":false,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["Chatwoot"],"operationId":"chatwootWebhook","security":[{},{"accessToken":[]}]}},"/{key}/message":{"post":{"responses":{"200":{"description":"Success"}},"description":"Send a message using the exact WhatsApp Cloud API (Meta) request body and response envelope. Supports text, media (image/audio/video/document/sticker) via URL link, location, reaction, interactive (button/list/cta_url), and contacts.","summary":"Send a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendMessageMeta"}}}},"tags":["Message"],"operationId":"messageSendMessage","security":[{},{"accessToken":[]}]}},"/{key}/message/presence":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a presence update (composing, recording, paused) to a chat. The recipient will see \"typing...\" or \"recording audio...\".","summary":"Send typing or recording indicator","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingPresence"}}}},"tags":["Message"],"operationId":"messageSendingPresence","security":[{},{"accessToken":[]}]}},"/{key}/message/read":{"post":{"responses":{"200":{"description":"Success"}},"description":"Marks a received message as read by its ID. On official (Cloud API) instances, set typing:true to also show the \"typing…\" indicator (both are the same Cloud API call).","summary":"Mark a message as read (and optionally show typing)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaMarkRead"}}}},"tags":["Message"],"operationId":"messageMarkRead","security":[{},{"accessToken":[]}]}},"/{key}/message/text":{"post":{"responses":{"200":{"description":"Success"}},"description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.","summary":"Send a text message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingText"}}}},"tags":["Message"],"operationId":"messageSendingText","security":[{},{"accessToken":[]}]}},"/{key}/message/template":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a pre-approved WhatsApp message template via the Cloud API. This is the only way to start a conversation or re-engage a contact outside the 24-hour customer service window. Body: { to, name, language?, components? }.\n\nDynamic parts go in `components`. `index` is the position of the button in the template (0-based):\n\n```json\n[\n  { \"type\": \"header\", \"parameters\": [{ \"type\": \"text\", \"text\": \"#123\" }] },\n  { \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"Ana\" }] },\n  { \"type\": \"button\", \"sub_type\": \"url\", \"index\": \"0\", \"parameters\": [{ \"type\": \"text\", \"text\": \"123\" }] },\n  { \"type\": \"button\", \"sub_type\": \"copy_code\", \"index\": \"2\", \"parameters\": [{ \"type\": \"coupon_code\", \"coupon_code\": \"ANA10\" }] }\n]\n```","summary":"Send an approved template message (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingTemplate"}}}},"tags":["Message"],"operationId":"messageSendingTemplate","security":[{},{"accessToken":[]}]}},"/{key}/message/button_reply":{"post":{"responses":{"200":{"description":"Success"}},"description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.\nSend a message with buttons and call to action and media attachment.\n\n### Header with  media attachment example:\n```json\n{\n  \"header\": {\n    \"title\": \"Example Header With media\",\n    \"hasMediaAttachment\": true,\n    \"imageMessage\": {\n      \"url\": \"https://raphaelvserafim.com/og-image.png\"\n    },\n    \"documentMessage\": {\n      \"url\": \"https://raphaelvserafim.com/RaphaelSerafimResume.pdf\",\n      \"mimetype\": \"application/pdf\",\n      \"fileName\": \"Raphael.pdf\"\n    }\n  }\n}\n```\n\n### Fields:\n- **header**: Optional. Can contain image, video OR document (only one media type)\n","summary":"Send interactive button message (reply type)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaButtonMessageReply"}}}},"tags":["Message"],"operationId":"messageButtonMessageReply","security":[{},{"accessToken":[]}]}},"/{key}/message/button_action":{"post":{"responses":{"200":{"description":"Success"}},"description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.\nSend a message with buttons and call to action and media attachment.\n\n### Header with  media attachment example:\n```json\n{\n  \"header\": {\n    \"title\": \"Example Header With media\",\n    \"hasMediaAttachment\": true,\n    \"imageMessage\": {\n      \"url\": \"https://raphaelvserafim.com/og-image.png\"\n    },\n    \"documentMessage\": {\n      \"url\": \"https://raphaelvserafim.com/RaphaelSerafimResume.pdf\",\n      \"mimetype\": \"application/pdf\",\n      \"fileName\": \"Raphael.pdf\"\n    }\n  }\n}\n```\n\n### Fields:\n- **header**: Optional. Can contain image, video OR document (only one media type)\n","summary":"Send interactive button message (call-to-action)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaButtonMessage"}}}},"tags":["Message"],"operationId":"messageSendingButton","security":[{},{"accessToken":[]}]}},"/{key}/message/pix":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a Brazilian Pix payment message with QR code or copy-paste code. Requires Pix permission.","summary":"Send a Pix payment message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingPix"}}}},"tags":["Message"],"operationId":"messagePix","security":[{},{"accessToken":[]}]}},"/{key}/message/order-details":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends an order_details message with a payment link (payment_link) for the customer to pay off-WhatsApp. Body: SchemaSendingOrderDetails. On official instances routes to the Cloud API.","summary":"Send an order with a payment link (Payments BR)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingOrderDetails"}}}},"tags":["Message"],"operationId":"messageOrderDetails","security":[{},{"accessToken":[]}]}},"/{key}/message/order-status":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends an order_status update for a previous order. Body: { to, referenceId, status, description? }. Official (Cloud API) only.","summary":"Update an order status (official only — Payments BR)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"},"referenceId":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageOrderStatus","security":[{},{"accessToken":[]}]}},"/{key}/message/list":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send an interactive list message","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingList"}}}},"tags":["Message"],"operationId":"messageSendingList","security":[{},{"accessToken":[]}]}},"/{key}/message/flow":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send an interactive Flow message (Cloud API)","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingFlow"}}}},"tags":["Message"],"operationId":"messageSendingFlow","security":[{},{"accessToken":[]}]}},"/{key}/message/survey":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a poll message with selectable options. Recipients can vote directly in the chat.","summary":"Send a poll/survey message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingSurvey"}}}},"tags":["Message"],"operationId":"messageSendingSurvey","security":[{},{"accessToken":[]}]}},"/{key}/message/title":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a formatted message with a bold title, body text, and a smaller footer section.","summary":"Send a rich text message with title and footer","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendWithTitleAndFooter"}}}},"tags":["Message"],"operationId":"messageSendWithTitleAndFooter","security":[{},{"accessToken":[]}]}},"/{key}/message/audio":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send an audio file","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Supports URL to audio files (mp3, ogg, etc). Audio is sent as a voice message (PTT).","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingAudio"}}}},"tags":["Message"],"operationId":"messageSendingAudio","security":[{},{"accessToken":[]}]}},"/{key}/message/image":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send an image file","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Supports URL to image files (jpg, png, webp, gif). Optional caption text.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingImage"}}}},"tags":["Message"],"operationId":"messageSendingImage","security":[{},{"accessToken":[]}]}},"/{key}/message/video":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a video file","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Supports URL to video files (mp4, 3gp). Optional caption text.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingVideo"}}}},"tags":["Message"],"operationId":"messageSendingVideo","security":[{},{"accessToken":[]}]}},"/{key}/message/document":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a document/file","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Supports any file type via URL. The file name and MIME type are detected automatically.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingDocument"}}}},"tags":["Message"],"operationId":"messageSendingDocument","security":[{},{"accessToken":[]}]}},"/{key}/message/contact":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a contact card (vCard)","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingContact"}}}},"tags":["Message"],"operationId":"messageSendingContact","security":[{},{"accessToken":[]}]}},"/{key}/message/contacts":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send multiple contact cards","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Sends a batch of contact cards in a single message.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingContacts"}}}},"tags":["Message"],"operationId":"messageSendingContacts","security":[{},{"accessToken":[]}]}},"/{key}/message/location":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a static location pin","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingLocation"}}}},"tags":["Message"],"operationId":"messageSendingLocation","security":[{},{"accessToken":[]}]}},"/{key}/message/location-request":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Request the recipient to share their location","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Sends a native \"request location\" button asking the recipient to share their location.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingLocationRequest"}}}},"tags":["Message"],"operationId":"messageSendingLocationRequest","security":[{},{"accessToken":[]}]}},"/{key}/message/ad":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a message with ad context","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Sends a message carrying ad (Click-to-WhatsApp) context — the outbound counterpart of the inbound referral.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingAd"}}}},"tags":["Message"],"operationId":"messageSendingAd","security":[{},{"accessToken":[]}]}},"/{key}/message/live-location":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a real-time live location","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Shares your live location that updates in real-time for the recipient.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5511999999999"},"latitude":{"type":"number","example":-23.5505},"longitude":{"type":"number","example":-46.6333},"caption":{"type":"string","example":"I am here!"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingLiveLocation","security":[{},{"accessToken":[]}]}},"/{key}/message/unpin":{"post":{"responses":{"200":{"description":"Success"}},"description":"Removes the pin from a previously pinned message in a chat.","summary":"Unpin a message from chat","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","example":"ABCDEF123456"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageUnpinMessage","security":[{},{"accessToken":[]}]}},"/{key}/message/link":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a URL with a customized preview (title, description, thumbnail). To send a plain URL, use the text endpoint instead.","summary":"Send a custom link preview message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingLink"}}}},"tags":["Message"],"operationId":"messageSendingLink","security":[{},{"accessToken":[]}]}},"/{key}/message/reaction":{"post":{"responses":{"200":{"description":"Success"}},"summary":"React to a message with emoji","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Send an empty reaction to remove a previous reaction.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingReaction"}}}},"tags":["Message"],"operationId":"messageSendingReaction","security":[{},{"accessToken":[]}]}},"/{key}/message/sticker":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a sticker","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Converts the image URL to a WebP sticker automatically.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"},"url":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingSticker","security":[{},{"accessToken":[]}]}},"/{key}/message/video-note":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send a circular video note (PTV)","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Sends a short circular video (like Telegram video messages). Also known as PTV (Push-To-View).","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5511999999999"},"url":{"type":"string","example":"https://www.w3schools.com/html/mov_bbb.mp4"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingVideoNote","security":[{},{"accessToken":[]}]}},"/{key}/message/poll":{"post":{"responses":{"200":{"description":"Success"}},"description":"Creates an interactive poll with multiple choice options. Set selectableCount to limit how many options each person can choose.","summary":"Send a poll message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5511999999999"},"name":{"type":"string","example":"What is your favorite color?"},"values":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true},"example":["Red","Blue","Green"]},"selectableCount":{"type":"number","example":1}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingPoll","security":[{},{"accessToken":[]}]}},"/{key}/message/event":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends an event message with name, description, date/time, and optional location. Recipients can view event details inline.","summary":"Send an event/calendar invite","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5511999999999"},"name":{"type":"string","example":"Team Meeting"},"description":{"type":"string","example":"Weekly sync with the team"},"startTime":{"type":"string","example":"2026-06-10T14:00:00Z"},"locationName":{"type":"string","example":"Office HQ"},"locationAddress":{"type":"string","example":"123 Main St, São Paulo"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingEvent","security":[{},{"accessToken":[]}]}},"/{key}/message/pin":{"post":{"responses":{"200":{"description":"Success"}},"description":"Pins a message to the top of a chat. Duration is in seconds (default: 7 days = 604800).","summary":"Pin a message in chat","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","example":"ABCDEF123456"},"duration":{"type":"number","example":604800}},"type":"object"}}}},"tags":["Message"],"operationId":"messagePinMessage","security":[{},{"accessToken":[]}]}},"/{key}/message/call-link":{"post":{"responses":{"200":{"description":"Success"}},"description":"Generates and sends a WhatsApp call link (audio or video) to a contact with an optional caption.","summary":"Send a call link invitation","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5511999999999"},"type":{"type":"string","example":"audio"},"caption":{"type":"string","example":"Let's talk!"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendingCallLink","security":[{},{"accessToken":[]}]}},"/{key}/message/{messageId}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Retrieves the full message object including metadata, content, and delivery status by its unique message ID.","summary":"Get message by ID","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"messageId","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Message"],"operationId":"messageGetMessageDetails","security":[{},{"accessToken":[]}]}},"/{key}/message/{messageId}/media":{"get":{"responses":{"200":{"description":"Success"}},"description":"Downloads media from a message by its ID. Use ?format=binary for raw file download, or ?format=json (default) for base64 JSON response.","summary":"Download media from a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"messageId","required":true,"schema":{"type":"string","minLength":1}},{"in":"query","name":"format","required":false,"schema":{"type":"string"}}],"tags":["Message"],"operationId":"messageDownloadMedia","security":[{},{"accessToken":[]}]}},"/{key}/message/base64/image":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send an image from base64 data","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'. Send an image encoded as a base64 string instead of a URL.","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingImageBase64"}}}},"tags":["Message"],"operationId":"messageSendingImageBase64","security":[{},{"accessToken":[]}]}},"/{key}/message/base64/audio":{"post":{"responses":{"200":{"description":"Success"}},"description":"Send an audio file encoded as a base64 string instead of a URL. Works on official (WhatsApp Cloud API), Instagram and Messenger accounts too: the audio is converted to the format each channel accepts (ogg/opus for WhatsApp voice notes, m4a/aac for Instagram and Messenger, which do not accept ogg) and uploaded before sending.","summary":"Send audio from base64 data","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingAudioBase64"}}}},"tags":["Message"],"operationId":"messageSendingAudioBase64","security":[{},{"accessToken":[]}]}},"/{key}/message/base64/document":{"post":{"responses":{"200":{"description":"Success"}},"description":"Send a document encoded as a base64 string instead of a URL.","summary":"Send a document from base64 data","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingDocumentBase64"}}}},"tags":["Message"],"operationId":"messageSendingDocumentBase64","security":[{},{"accessToken":[]}]}},"/{key}/message/product":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a product card from a WhatsApp Business catalog. Requires the business owner JID and product ID.","summary":"Send a product catalog card","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"},"businessOwnerJid":{"type":"string"},"productId":{"type":"string"},"catalogId":{"type":"string"},"body":{"type":"string"},"footer":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendProduct","security":[{},{"accessToken":[]}]}},"/{key}/message/product-list":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a multi-product message (product_list) from the catalog. Official (Cloud API) only. Body: { to, header, body, footer?, sections:[{ title, productRetailerIds:[] }], catalogId? }.","summary":"Send a product list (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"},"header":{"type":"string"},"body":{"type":"string"},"sections":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true}},"footer":{"type":"string"},"catalogId":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendProductList","security":[{},{"accessToken":[]}]}},"/{key}/message/group-invite":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a rich group invite message with group name and join link. The recipient can tap to join directly.","summary":"Send a group invite link message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"},"groupJid":{"type":"string"},"groupName":{"type":"string"},"inviteCode":{"type":"string"},"inviteExpiration":{"type":"number"},"caption":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageSendGroupInvite","security":[{},{"accessToken":[]}]}},"/{key}/message/request-phone":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a request to a contact asking them to share their phone number.","summary":"Request phone number from contact","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageRequestPhoneNumber","security":[{},{"accessToken":[]}]}},"/{key}/message/create-call-link":{"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a WhatsApp call link (audio or video) and returns it without sending to anyone. Useful for embedding in external apps.","summary":"Generate a call link (without sending)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"type":{"type":"string","example":"audio"}},"type":"object"}}}},"tags":["Message"],"operationId":"messageCreateCallLink","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Deletes a message for everyone in the chat. The message ID must be from a message sent by this instance. Not available on official (Cloud API) instances — the Meta Cloud API cannot delete a sent message.","summary":"Delete a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Action message"],"operationId":"actionMessageDelete","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Replaces the text content of a previously sent message. Only text messages can be updated. Not available on official (Cloud API) instances — the Meta Cloud API cannot edit a sent message.","summary":"Update a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"type":"string"}},"type":"object"}}}},"tags":["Action message"],"operationId":"actionMessageUpdate","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/forwarding":{"post":{"responses":{"200":{"description":"Success"}},"description":"Forwards an existing message to another chat. The original sender information is preserved.","summary":"Forward a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5566997145103"}},"type":"object"}}}},"tags":["Action message"],"operationId":"actionMessageForwardingMessages","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/edit":{"put":{"responses":{"200":{"description":"Success"}},"description":"Edits the text of a previously sent message. The message will show an \"edited\" label. Not available on official (Cloud API) instances — the Meta Cloud API cannot edit a sent message.","summary":"Edit a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"type":"string"}},"type":"object"}}}},"tags":["Action message"],"operationId":"actionMessageEditMessageText","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/keep":{"post":{"responses":{"200":{"description":"Success"}},"description":"Stars (bookmarks) a message for easy retrieval later.","summary":"Star/keep a message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Action message"],"operationId":"actionMessageKeepMessage","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/text":{"post":{"responses":{"200":{"description":"Success"}},"description":"Sends a text message as a reply to a specific message, showing a quote of the original.","summary":"Reply with text","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingText"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyText","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/button_reply":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Reply with interactive buttons (reply type)","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.\nSend a message with buttons and call to action and media attachment.\n\n### Header with  media attachment example:\n```json\n{\n  \"header\": {\n    \"title\": \"Example Header With media\",\n    \"hasMediaAttachment\": true,\n    \"imageMessage\": {\n      \"url\": \"https://raphaelvserafim.com/og-image.png\"\n    },\n    \"documentMessage\": {\n      \"url\": \"https://raphaelvserafim.com/RaphaelSerafimResume.pdf\",\n      \"mimetype\": \"application/pdf\",\n      \"fileName\": \"Raphael.pdf\"\n    }\n  }\n}\n```\n\n### Fields:\n- **header**: Optional. Can contain image, video OR document (only one media type)\n","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaButtonMessageReply"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageButtonMessageReply","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/button_action":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Reply with interactive buttons (call-to-action)","description":"**to** a specific recipient. \n- Phone number must include the country code, and should be in the following format: 'countryCodePhoneNumber' (e.g., '5566997145103' for Brazil).\n- Group should be in the format: 'groupId@g.us'.\n- ID should be in the format: 'id@lid'.\nSend a message with buttons and call to action and media attachment.\n\n### Header with  media attachment example:\n```json\n{\n  \"header\": {\n    \"title\": \"Example Header With media\",\n    \"hasMediaAttachment\": true,\n    \"imageMessage\": {\n      \"url\": \"https://raphaelvserafim.com/og-image.png\"\n    },\n    \"documentMessage\": {\n      \"url\": \"https://raphaelvserafim.com/RaphaelSerafimResume.pdf\",\n      \"mimetype\": \"application/pdf\",\n      \"fileName\": \"Raphael.pdf\"\n    }\n  }\n}\n```\n\n### Fields:\n- **header**: Optional. Can contain image, video OR document (only one media type)\n","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaButtonMessage"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingButton","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/pix":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with a Brazilian Pix payment message.","summary":"Reply with a Pix payment","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingPix"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessagePix","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/title":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies with a formatted message containing title, body, and footer.","summary":"Reply with rich text (title and footer)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendWithTitleAndFooter"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendWithTitleAndFooter","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/audio":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with an audio file sent as voice message.","summary":"Reply with audio","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingAudio"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyAudio","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/image":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with an image file. Supports caption.","summary":"Reply with image","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingImage"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyImage","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/video":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with a video file. Supports caption.","summary":"Reply with video","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingVideo"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyVideo","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/document":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with a document/file attachment.","summary":"Reply with document","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingDocument"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyDocument","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/contact":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with a contact vCard.","summary":"Reply with contact card","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingContact"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyContact","security":[{},{"accessToken":[]}]}},"/{key}/message/{id}/location":{"post":{"responses":{"200":{"description":"Success"}},"description":"Replies to a message with a location pin.","summary":"Reply with location","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaSendingLocation"}}}},"tags":["Reply to a message"],"operationId":"replyToAMessageSendingReplyLocation","security":[{},{"accessToken":[]}]}},"/{key}/chat":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the chats of ONE channel (individual and group) with their last message timestamp, message count, the channel they belong to, and the contact behind the chat (`contact: { phone, name }` — name is empty when not in the address book).\n\nUse `provider` to pick the channel: `whatsapp` (default), `instagram` or `messenger`. WhatsApp, Instagram and Messenger conversations share the same storage, so without a channel they would come back mixed — an Instagram IGSID and a Messenger PSID look just like phone numbers in `chatId`. Asking for a channel the instance does not have connected returns 422.","summary":"List all chats","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"provider","required":false,"schema":{"type":"string","example":"whatsapp"}}],"tags":["Chat"],"operationId":"chatDelete","security":[{},{"accessToken":[]}]},"patch":{"responses":{"200":{"description":"Success"}},"description":"Update chat attributes. Supported actions: \"markRead\" (mark messages as read/unread), \"pin\" (pin/unpin chat to top), \"mute\" (mute/unmute; with value=true, `duration` is 8h, 1w or always — default always) and \"archive\" (archive/unarchive). Changes sync to the phone and the other linked devices.","summary":"Modify chat properties","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"id","description":"Phone number (5566997145103) or JID (…@s.whatsapp.net, …@lid, …@g.us).","schema":{"type":"string","example":"5566997145103","minLength":1}},{"in":"query","required":true,"name":"action","schema":{"type":"string","enum":["markRead","pin","mute","archive"],"example":"markRead","minLength":1}},{"in":"query","required":true,"name":"value","schema":{"type":"boolean","enum":[false,true],"example":true}},{"in":"query","required":false,"name":"duration","description":"Only for action \"mute\" with value=true: how long to mute. Defaults to \"always\".","schema":{"type":"string","enum":["8h","1w","always"],"example":"8h"}}],"tags":["Chat"],"operationId":"chatModifyChat","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Permanently deletes a chat on the phone and the other linked devices, and its local message history. `chatId` accepts the phone number (e.g., 5511999999999) or the JID (5511999999999@s.whatsapp.net, …@lid, …@g.us).","summary":"Delete a chat","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"chatId","required":false,"schema":{"type":"string","example":"5566997145103@s.whatsapp.net"}}],"tags":["Chat"],"operationId":"chatDeleteChat","security":[{},{"accessToken":[]}]}},"/{key}/chat/messages":{"get":{"responses":{"200":{"description":"Success"}},"description":"Retrieves messages from a specific chat with pagination. Returns up to 100 messages per page (default: 50).","summary":"Get paginated chat messages","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"chatId","required":false,"schema":{"type":"string","example":"5566997145103@s.whatsapp.net"}},{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}}],"tags":["Chat"],"operationId":"chatGetMessages","security":[{},{"accessToken":[]}]}},"/{key}/chat/presence/subscribe":{"post":{"responses":{"200":{"description":"Success"}},"description":"Subscribes to real-time presence updates (online/offline/typing) for a specific contact. Updates are delivered via webhook.","summary":"Subscribe to contact presence","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"jid":{"type":"string","example":"5566997145103"}},"type":"object"}}},"description":"Phone number (5566997145103) or JID."},"tags":["Chat"],"operationId":"chatPresenceSubscribe","security":[{},{"accessToken":[]}]}},"/{key}/chat/disappearing":{"post":{"responses":{"200":{"description":"Success"}},"description":"Enables or disables disappearing messages for a 1:1 chat. Set expiration in seconds (0 to disable, 86400 for 24h, 604800 for 7 days, 7776000 for 90 days).","summary":"Toggle disappearing messages","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"jid":{"type":"string","example":"5566997145103"},"expiration":{"type":"number"}},"type":"object"}}},"description":"Phone number (5566997145103) or JID."},"tags":["Chat"],"operationId":"chatToggleDisappearing","security":[{},{"accessToken":[]}]}},"/{key}/chat/privacy":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the current privacy settings including who can see your last seen, profile photo, about, status, and read receipts.","summary":"Get privacy settings","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Chat"],"operationId":"chatFetchPrivacySettings","security":[{},{"accessToken":[]}]}},"/{key}/call":{"post":{"responses":{"200":{"description":"Success"}},"description":"Initiates a voice call to a contact. Requires call permission enabled on the instance.","summary":"Make a voice call","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"to"}},"type":"object"}}}},"tags":["Call"],"operationId":"callCallPix","security":[{},{"accessToken":[]}]}},"/{key}/call/{id}/{from}":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Rejects an incoming call by its call ID and caller JID.","summary":"Reject an incoming call","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"from","required":true,"schema":{"type":"string"}}],"tags":["Call"],"operationId":"callReject","security":[{},{"accessToken":[]}]}},"/{key}/call/accept":{"post":{"responses":{"200":{"description":"Success"}},"description":"Accepts a pending incoming call using the call ID and caller JID.","summary":"Accept an incoming call","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"callId":{"type":"string"},"callFrom":{"type":"string"}},"type":"object"}}}},"tags":["Call"],"operationId":"callAccept","security":[{},{"accessToken":[]}]}},"/{key}/call/end":{"post":{"responses":{"200":{"description":"Success"}},"description":"Terminates an ongoing call by its call ID and peer JID.","summary":"End an active call","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"callId":{"type":"string"},"peerJid":{"type":"string"}},"type":"object"}}}},"tags":["Call"],"operationId":"callEnd","security":[{},{"accessToken":[]}]}},"/{key}/call/{callId}/audio":{"post":{"responses":{"200":{"description":"Success"}},"summary":"Send audio into an active call","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"callId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"file":{"type":"string"},"url":{"type":"string"},"base64":{"type":"string"}},"type":"object"}}}},"tags":["Call"],"operationId":"callSendAudio","security":[{},{"accessToken":[]}]}},"/{key}/labels":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all custom labels created for organizing chats. Labels include name, color, and ID.","summary":"List all labels","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Labels"],"operationId":"labelsGetLabels","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a label on WhatsApp Business (synced to the phone). Pass an existing labelId to rename/recolor it. color is the WhatsApp palette index (0-19).","summary":"Create a new label","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"labelId":{"type":"string"},"color":{"type":"number"}},"type":"object"}}}},"tags":["Labels"],"operationId":"labelsCreateLabel","security":[{},{"accessToken":[]}]}},"/{key}/labels/{id}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all chats that have been tagged with the specified label ID.","summary":"List chats with a specific label","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Labels"],"operationId":"labelsGetChatLabel","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Tags a chat with a label. Provide the contact/group number in the \"to\" field.","summary":"Assign a label to a chat","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"to":{"type":"string","example":"5566997145103"}},"type":"object"}}}},"tags":["Labels"],"operationId":"labelsAddChatLabel","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Permanently deletes a label. All chats tagged with this label will be untagged.","summary":"Delete a label","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Labels"],"operationId":"labelsDeleteLabel","security":[{},{"accessToken":[]}]}},"/{key}/labels/{id}/chat/{to}":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the specified label from a chat.","summary":"Remove a label from a chat","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"to","required":true,"schema":{"type":"string"}}],"tags":["Labels"],"operationId":"labelsRemoveChatLabel","security":[{},{"accessToken":[]}]}},"/{key}/actions/registered":{"get":{"responses":{"200":{"description":"Success"}},"description":"Verifies whether a phone number is registered on WhatsApp. Returns the JID if registered.","summary":"Check if number is on WhatsApp","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"number","required":false,"schema":{"type":"string"}}],"tags":["Actions"],"operationId":"actionsOnWhatsApp","security":[{},{"accessToken":[]}]}},"/{key}/actions/download/media":{"post":{"responses":{"200":{"description":"Success"}},"description":"Downloads media content from a WhatsApp message. Deprecated: use GET /message/:messageId/media instead.","summary":"(Deprecated) Download media from message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"type","schema":{"type":"string","enum":["image","video","sticker","audio","document"],"example":"image","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadableMessage"}}}},"tags":["Actions"],"operationId":"actionsDownload","security":[{},{"accessToken":[]}]}},"/{key}/actions/storage":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Permanently deletes all saved media files for this instance from S3/storage.","summary":"Delete stored media files","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Actions"],"operationId":"actionsDeleteS3","security":[{},{"accessToken":[]}]}},"/{key}/contacts":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the complete contact list with names, phone numbers, and profile information.","summary":"List all contacts","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Contacts"],"operationId":"contactsList","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Saves a contact to the device address book with the specified name and phone number.","summary":"Add a new contact","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"number":{"type":"string","example":"5511999999999"},"name":{"type":"string","example":"João Silva"},"firstName":{"type":"string","example":"João"},"saveOnPrimaryAddressbook":{"type":"boolean","example":true},"lidJid":{"type":"string"}},"type":"object"}}}},"tags":["Contacts"],"operationId":"contactsAddContact","security":[{},{"accessToken":[]}]}},"/{key}/contacts/{number}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the profile information for a specific contact including name, profile picture URL, and status text. Use `picture=image` for the full-resolution photo instead of the default 96x96 thumbnail; when the contact has no full-resolution photo the thumbnail is returned.","summary":"Get contact profile","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"type":"string"}},{"in":"query","name":"picture","required":false,"schema":{"type":"string","example":"image"}}],"tags":["Contacts"],"operationId":"contactsProfile","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Deletes a contact from the device address book. This does not delete the chat history.","summary":"Remove a contact","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"type":"string"}}],"tags":["Contacts"],"operationId":"contactsRemoveContact","security":[{},{"accessToken":[]}]},"patch":{"responses":{"200":{"description":"Success"}},"description":"Toggles the block status of a contact. Blocked contacts cannot send you messages or see your profile updates.","summary":"Block or unblock a contact","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"action","schema":{"type":"string","enum":["block","unblock"],"example":"block","minLength":1}}],"tags":["Contacts"],"operationId":"contactsBlock","security":[{},{"accessToken":[]}]}},"/{key}/contacts/{number}/session":{"delete":{"responses":{"200":{"description":"Success"}},"description":"This endpoint is useful when you want to clear the session of a contact without deleting the chat history. It will remove the session from the device, but the messages will still be available in the chat history.","summary":"Clear contact session (chat history will not be deleted)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"type":"string"}}],"tags":["Contacts"],"operationId":"contactsClearSession","security":[{},{"accessToken":[]}]}},"/{key}/contacts/{number}/status":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the \"About\" status text of a specific contact.","summary":"Get contact status text","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"type":"string"}}],"tags":["Contacts"],"operationId":"contactsStatus","security":[{},{"accessToken":[]}]}},"/{key}/contacts/blocked":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all contacts that have been blocked by this instance.","summary":"List blocked contacts","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Contacts"],"operationId":"contactsBlocked","security":[{},{"accessToken":[]}]}},"/{key}/contacts/resolve-lids":{"post":{"responses":{"200":{"description":"Success"}},"description":"Converts LID (Linked Identity) JIDs to their corresponding phone numbers in batch. Useful for resolving anonymous group participants.","summary":"Resolve LID JIDs to phone numbers","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"lids":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true}}},"type":"object"}}}},"tags":["Contacts"],"operationId":"contactsResolveLiDs","security":[{},{"accessToken":[]}]}},"/{key}/groups":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all WhatsApp groups the instance is a member of, including group metadata.","summary":"List all groups","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsList","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a new WhatsApp group with a subject (name) and optional initial participants.","summary":"Create a new group","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupCreate"}}}},"tags":["Groups"],"operationId":"groupsCreate","security":[{},{"accessToken":[]}]}},"/{key}/groups/readiness":{"get":{"responses":{"200":{"description":"Success"}},"description":"Diagnostic for group support. On official (Cloud API) instances, checks platform type and business verification (OBA) and probes the Groups API — returning `ready`, per-check results, and human-readable `blockers` explaining why groups may be unavailable. On non-official instances, groups run via the connected Baileys session.","summary":"Check groups readiness (diagnostic)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsReadiness","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns detailed information about a specific group including subject, description, participants, settings and `pictureUrl` (full-resolution group photo; omitted when the group has no photo or on official accounts). The ID can be the group number (120363XXXXX) or the JID (120363XXXXX@g.us).","summary":"Get group details","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsInfo","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Updates the group name (subject) and/or description text.","summary":"Update group subject and description","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupUpdate"}}}},"tags":["Groups"],"operationId":"groupsUpdate","security":[{},{"accessToken":[]}]},"patch":{"responses":{"200":{"description":"Success"}},"description":"Changes group settings such as who can send messages (announcement mode) and who can edit group info.","summary":"Update group settings","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"setting","schema":{"type":"string","enum":["announcement","not_announcement","locked","unlocked"],"example":"announcement","minLength":1}}],"tags":["Groups"],"operationId":"groupsChangeSettings","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the instance from the specified group. This action cannot be undone without a new invite.","summary":"Leave a group","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsLeave","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/members":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all participants of a group with their roles (admin, superadmin, or member).","summary":"List group members","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsGetMembers","security":[{},{"accessToken":[]}]}},"/{key}/groups/invite/info":{"get":{"responses":{"200":{"description":"Success"}},"description":"Retrieves group metadata using an invite code (the part after chat.whatsapp.com/).","summary":"Get group info from invite code","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"code","required":false,"schema":{"type":"string","example":"ABcDeFgHiJk"}}],"tags":["Groups"],"operationId":"groupsGetInviteInfo","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/invite":{"get":{"responses":{"200":{"description":"Success"}},"description":"Generates and returns the invite link for a group. Requires admin privileges.","summary":"Get group invite link","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsGetInviteCode","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/picture":{"put":{"responses":{"200":{"description":"Success"}},"description":"Sets a new group profile picture from a publicly accessible image URL. Requires admin privileges.","summary":"Update group picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Groups"],"operationId":"groupsUpdateProfilePicture","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the group profile picture, reverting to the default placeholder. Requires admin privileges.","summary":"Remove group picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsRemoveProfilePicture","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/participants":{"post":{"responses":{"200":{"description":"Success"}},"description":"Adds one or more users to a group. Requires admin privileges. Provide participant phone numbers in JID format.","summary":"Add participants to group","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupParticipants"}}}},"tags":["Groups"],"operationId":"groupsAddUsers","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes one or more users from a group. Requires admin privileges.","summary":"Remove participants from group","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupParticipants"}}}},"tags":["Groups"],"operationId":"groupsRemoveUsers","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/role":{"patch":{"responses":{"200":{"description":"Success"}},"description":"Promotes a participant to admin or demotes an admin to regular member. Requires superadmin privileges.","summary":"Change participant role (promote/demote)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","required":true,"name":"action","schema":{"type":"string","enum":["promote","demote"],"example":"promote","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupParticipants"}}}},"tags":["Groups"],"operationId":"groupsUpdateUserRole","security":[{},{"accessToken":[]}]}},"/{key}/groups/{id}/request_participants_list":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the list of users who have requested to join the group and are waiting for admin approval.","summary":"List pending join requests","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Groups"],"operationId":"groupsGroupRequestParticipantsList","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Approves or rejects pending group join requests. Requires admin privileges.","summary":"Approve or reject join requests","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupParticipants"}}}},"tags":["Groups"],"operationId":"groupsGroupRequestParticipants","security":[{},{"accessToken":[]}]}},"/{key}/community":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns all WhatsApp communities the instance is a member of.","summary":"List all communities","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Community"],"operationId":"communityList","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a new WhatsApp community with a name, description, and initial groups.","summary":"Create a new community","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaCommunityCreate"}}}},"tags":["Community"],"operationId":"communityCreate","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns detailed information about a community including linked groups and member counts.","summary":"Get community details","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Community"],"operationId":"communityInfo","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Updates the community name and/or description.","summary":"Update community info","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaCommunityUpdate"}}}},"tags":["Community"],"operationId":"communityUpdate","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the instance from the community. You will also leave all community-linked groups.","summary":"Leave a community","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Community"],"operationId":"communityLeave","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/picture":{"put":{"responses":{"200":{"description":"Success"}},"description":"Sets a new profile picture for the community from a URL. Requires admin privileges.","summary":"Update community picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Community"],"operationId":"communityUpdateProfilePicture","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/invite":{"post":{"responses":{"200":{"description":"Success"}},"description":"Generates and returns the invite link for the community. Requires admin privileges.","summary":"Get community invite link","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Community"],"operationId":"communityGetInviteCode","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/participants":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes one or more members from the community. Requires admin privileges.","summary":"Remove community members","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaGroupParticipants"}}}},"tags":["Community"],"operationId":"communityRemoveUsers","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/request_participants_list":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns users who have requested to join the community and are awaiting approval.","summary":"List pending join requests","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Community"],"operationId":"communityGetRequestParticipants","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Processes pending community join requests. Requires admin privileges.","summary":"Approve or reject join requests","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupParticipants"}}}},"tags":["Community"],"operationId":"communityUpdateRequestParticipants","security":[{},{"accessToken":[]}]}},"/{key}/community/invite/accept":{"post":{"responses":{"200":{"description":"Success"}},"description":"Joins a community using an invite code.","summary":"Accept a community invite","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"}},"type":"object"}}}},"tags":["Community"],"operationId":"communityAcceptInvite","security":[{},{"accessToken":[]}]}},"/{key}/community/invite/info":{"get":{"responses":{"200":{"description":"Success"}},"description":"Retrieves community metadata using an invite code.","summary":"Get community info from invite code","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"code","required":false,"schema":{"type":"string","example":"ABcDeFgHiJk"}}],"tags":["Community"],"operationId":"communityGetInviteInfo","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/group":{"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a new group linked to the community with a subject and optional initial participants.","summary":"Create a group within the community","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"subject":{"type":"string"},"participants":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true}}},"type":"object"}}}},"tags":["Community"],"operationId":"communityCreateGroup","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/ephemeral":{"post":{"responses":{"200":{"description":"Success"}},"description":"Enables or disables disappearing messages for all community groups. Set expiration in seconds (0 to disable).","summary":"Toggle disappearing messages","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"expiration":{"type":"number"}},"type":"object"}}}},"tags":["Community"],"operationId":"communityToggleEphemeral","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/settings":{"patch":{"responses":{"200":{"description":"Success"}},"description":"Changes community settings such as announcements and restrictions.","summary":"Update community settings","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"setting":{"type":"string"}},"type":"object"}}}},"tags":["Community"],"operationId":"communitySettingUpdate","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/member-add-mode":{"patch":{"responses":{"200":{"description":"Success"}},"description":"Controls who can add new members to the community: \"admin_add\" (admins only) or \"all_member_add\" (any member).","summary":"Set member addition permissions","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"mode":{"type":"string"}},"type":"object"}}}},"tags":["Community"],"operationId":"communityMemberAddMode","security":[{},{"accessToken":[]}]}},"/{key}/community/{id}/join-approval":{"patch":{"responses":{"200":{"description":"Success"}},"description":"When enabled (\"on\"), new members must be approved by an admin before joining. Set to \"off\" to allow instant joins.","summary":"Toggle join approval requirement","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"mode":{"type":"string"}},"type":"object"}}}},"tags":["Community"],"operationId":"communityJoinApprovalMode","security":[{},{"accessToken":[]}]}},"/{key}/business/collections":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns product collections from the WhatsApp Business catalog.","summary":"List product collections","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}}],"tags":["Business"],"operationId":"businessCollections","security":[{},{"accessToken":[]}]}},"/{key}/business/catalog":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns paginated products from the WhatsApp Business catalog. Use cursor for pagination.","summary":"List catalog products","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"tags":["Business"],"operationId":"businessCatalog","security":[{},{"accessToken":[]}]}},"/{key}/business/catalog/product":{"post":{"responses":{"200":{"description":"Success"}},"description":"Adds a new product to the WhatsApp Business catalog with name, price, description, and images.","summary":"Create a catalog product","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaProduct"}}}},"tags":["Business"],"operationId":"businessProductCreate","security":[{},{"accessToken":[]}]}},"/{key}/business/catalog/product/{product_id}":{"put":{"responses":{"200":{"description":"Success"}},"description":"Updates an existing product in the WhatsApp Business catalog by its product ID.","summary":"Update a catalog product","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaProduct"}}}},"tags":["Business"],"operationId":"businessProductUpdate","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Permanently removes a product from the WhatsApp Business catalog.","summary":"Delete a catalog product","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}}],"tags":["Business"],"operationId":"businessProductDelete","security":[{},{"accessToken":[]}]}},"/{key}/business/order/{order_id}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns details of a specific order by its ID. Requires the order token.","summary":"Get order details","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"order_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"token","required":false,"schema":{"type":"string"}}],"tags":["Business"],"operationId":"businessOrderDetails","security":[{},{"accessToken":[]}]}},"/{key}/business/commerce-settings":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the WhatsApp commerce settings (cart enabled, catalog visibility) for the number. Official (Cloud API) only.","summary":"Get commerce settings (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Business"],"operationId":"businessCommerceSettings","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Toggles cart (isCartEnabled) and catalog visibility (isCatalogVisible). Official (Cloud API) only.","summary":"Update commerce settings (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"isCartEnabled":{"type":"boolean"},"isCatalogVisible":{"type":"boolean"}},"type":"object"}}}},"tags":["Business"],"operationId":"businessUpdateCommerceSettings","security":[{},{"accessToken":[]}]}},"/{key}/newsletter":{"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a new WhatsApp Channel (newsletter) with a name and optional description.","summary":"Create a newsletter channel","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterCreate","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/metadata":{"get":{"responses":{"200":{"description":"Success"}},"description":"Retrieves newsletter details by invite code or JID. Set type to \"invite\" for invite codes or \"jid\" for direct JID lookup.","summary":"Get newsletter metadata","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"type","required":false,"schema":{"type":"string","example":"jid"}},{"in":"query","name":"id","required":false,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterMetadata","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/subscribers":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the total number of followers for a newsletter.","summary":"Get subscriber count","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterSubscribers","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/admins":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the number of administrators managing the newsletter.","summary":"Get admin count","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterAdminCount","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/follow":{"post":{"responses":{"200":{"description":"Success"}},"description":"Subscribes the instance to a newsletter channel to receive its updates.","summary":"Follow a newsletter","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterFollow","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/unfollow":{"post":{"responses":{"200":{"description":"Success"}},"description":"Unsubscribes the instance from a newsletter channel.","summary":"Unfollow a newsletter","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterUnfollow","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/name":{"put":{"responses":{"200":{"description":"Success"}},"description":"Changes the display name of a newsletter. Requires owner/admin privileges.","summary":"Update newsletter name","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterUpdateName","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/description":{"put":{"responses":{"200":{"description":"Success"}},"description":"Changes the description text of a newsletter. Requires owner/admin privileges.","summary":"Update newsletter description","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"description":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterUpdateDescription","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/picture":{"put":{"responses":{"200":{"description":"Success"}},"description":"Sets a new profile picture for the newsletter from a URL. Requires owner/admin privileges.","summary":"Update newsletter picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterUpdatePicture","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes the newsletter profile picture. Requires owner/admin privileges.","summary":"Remove newsletter picture","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterRemovePicture","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/owner":{"put":{"responses":{"200":{"description":"Success"}},"description":"Transfers ownership of the newsletter to another user. This action is irreversible.","summary":"Transfer newsletter ownership","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"newOwnerJid":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterChangeOwner","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/demote":{"put":{"responses":{"200":{"description":"Success"}},"description":"Removes admin privileges from a newsletter administrator.","summary":"Demote a newsletter admin","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"userJid":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterDemote","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/messages":{"get":{"responses":{"200":{"description":"Success"}},"description":"Fetches newsletter messages with pagination. Use \"since\" for messages after a timestamp, \"after\" for messages after a specific server ID.","summary":"Get newsletter messages","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"count","required":false,"schema":{"type":"number","example":"50"}},{"in":"query","name":"since","required":false,"schema":{"type":"number"}},{"in":"query","name":"after","required":false,"schema":{"type":"number"}}],"tags":["Newsletter"],"operationId":"newsletterFetchMessages","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/react":{"post":{"responses":{"200":{"description":"Success"}},"description":"Adds or removes a reaction emoji on a newsletter message. Send without reaction to remove.","summary":"React to a newsletter message","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"serverId":{"type":"string"},"reaction":{"type":"string"}},"type":"object"}}}},"tags":["Newsletter"],"operationId":"newsletterReactMessage","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/mute":{"post":{"responses":{"200":{"description":"Success"}},"description":"Silences push notifications for a newsletter while staying subscribed.","summary":"Mute newsletter notifications","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterMute","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}/unmute":{"post":{"responses":{"200":{"description":"Success"}},"description":"Re-enables push notifications for a previously muted newsletter.","summary":"Unmute newsletter notifications","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterUnmute","security":[{},{"accessToken":[]}]}},"/{key}/newsletter/{id}":{"delete":{"responses":{"200":{"description":"Success"}},"description":"Permanently deletes a newsletter and all its messages. Requires owner privileges. This action cannot be undone.","summary":"Delete a newsletter","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Newsletter"],"operationId":"newsletterDeleteNewsletter","security":[{},{"accessToken":[]}]}},"/{key}/status/text":{"post":{"responses":{"200":{"description":"Success"}},"description":"Publish a text-only status. Optionally limit visibility with statusJidList (array of JIDs who can see it). If omitted, it goes to all contacts in the address book.","summary":"Send a text status/story","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"type":"string","example":"Hello World! This is my status."},"statusJidList":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true},"example":["5511999999999@s.whatsapp.net"]}},"type":"object"}}}},"tags":["Status"],"operationId":"statusSendTextStatus","security":[{},{"accessToken":[]}]}},"/{key}/status/image":{"post":{"responses":{"200":{"description":"Success"}},"description":"Publish an image status. Supports URL to any image format (jpg, png, webp, etc). Optionally limit visibility with statusJidList (array of JIDs who can see it). If omitted, it goes to all contacts in the address book.","summary":"Send an image status/story","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string","example":"https://a.cdn-hotels.com/gdcs/production190/d988/1071675e-1bd7-4a81-8b40-735eb9241410.jpg"},"caption":{"type":"string","example":"Beautiful view!"},"statusJidList":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true},"example":["5511999999999@s.whatsapp.net"]}},"type":"object"}}}},"tags":["Status"],"operationId":"statusSendImageStatus","security":[{},{"accessToken":[]}]}},"/{key}/status/video":{"post":{"responses":{"200":{"description":"Success"}},"description":"Publish a video status. Max 30 seconds recommended. Supports mp4 format. Optionally limit visibility with statusJidList (array of JIDs who can see it). If omitted, it goes to all contacts in the address book.","summary":"Send a video status/story","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string","example":"https://www.w3schools.com/html/mov_bbb.mp4"},"caption":{"type":"string","example":"Check this out!"},"statusJidList":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true},"example":["5511999999999@s.whatsapp.net"]}},"type":"object"}}}},"tags":["Status"],"operationId":"statusSendVideoStatus","security":[{},{"accessToken":[]}]}},"/{key}/status/audio":{"post":{"responses":{"200":{"description":"Success"}},"description":"Publish an audio status as a voice note (PTT). Optionally limit visibility with statusJidList (array of JIDs who can see it). If omitted, it goes to all contacts in the address book.","summary":"Send an audio status/story","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string","example":"https://url-audio"},"statusJidList":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true},"example":["5511999999999@s.whatsapp.net"]}},"type":"object"}}}},"tags":["Status"],"operationId":"statusSendAudioStatus","security":[{},{"accessToken":[]}]}},"/{key}/status/mention":{"post":{"responses":{"200":{"description":"Success"}},"description":"Send a mention to a contact referencing a specific status message.","summary":"Mention a contact in a status","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"jid":{"type":"string","example":"5511999999999@s.whatsapp.net"},"statusMsgId":{"type":"string","example":"ABCDEF123456"}},"type":"object"}}}},"tags":["Status"],"operationId":"statusMention","security":[{},{"accessToken":[]}]}},"/{key}/templates":{"get":{"responses":{"200":{"description":"Success"}},"description":"Lists the WABA message templates with their approval status, category, language and components. Available only for official (Cloud API) instances.","summary":"List message templates (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Templates"],"operationId":"templatesList","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Submits a new WhatsApp message template to Meta for review. The template comes back as PENDING and can only be sent once Meta approves it — poll GET /{key}/templates for the status. Available only for official (Cloud API) instances.\n\nEvery variable and every media header needs a sample value in `example`, or Meta rejects the template. A media header also needs POST /{key}/templates/upload first, to turn the file into the handle that goes in `example.header_handle`.\n\nComplete request body, with a document header and three body variables:\n\n```json\n{\n  \"name\": \"confirmacao_pedido\",\n  \"language\": \"pt_BR\",\n  \"category\": \"UTILITY\",\n  \"components\": [\n    {\n      \"type\": \"HEADER\",\n      \"format\": \"DOCUMENT\",\n      \"example\": { \"header_handle\": [\"4::YXBwbGlj...:ARZ1\"] }\n    },\n    {\n      \"type\": \"BODY\",\n      \"text\": \"Ola, {{1}}! Seu pedido {{2}} no valor de {{3}} foi confirmado.\",\n      \"example\": { \"body_text\": [[\"Joao\", \"#123\", \"R$ 250,00\"]] }\n    },\n    { \"type\": \"FOOTER\", \"text\": \"Equipe Wame\" }\n  ]\n}\n```\n\nMeta rejects the body text if it starts or ends with a variable, if two variables sit next to each other, if the numbering skips a step, or if the number of samples in `example` does not match the number of variables.\n\nButtons (`BUTTONS`): up to 10 in total — QUICK_REPLY up to 10, URL up to 2, PHONE_NUMBER 1, COPY_CODE 1 (MARKETING only). Put every QUICK_REPLY together, before or after the others (QUICK_REPLY, URL, QUICK_REPLY is rejected). A URL can end in one variable; its `example` is only that ending, not the whole URL:\n\n```json\n{\n  \"type\": \"BUTTONS\",\n  \"buttons\": [\n    { \"type\": \"URL\", \"text\": \"Ver pedido\", \"url\": \"https://site.com/pedido/{{1}}\", \"example\": [\"123\"] },\n    { \"type\": \"PHONE_NUMBER\", \"text\": \"Ligar\", \"phone_number\": \"5511999999999\" },\n    { \"type\": \"COPY_CODE\", \"example\": \"PROMO10\" }\n  ]\n}\n```","summary":"Create a message template (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaCreateTemplate"}}}},"tags":["Templates"],"operationId":"templatesCreate","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Removes a WhatsApp message template from the WABA by its name.","summary":"Delete a message template by name (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"name","required":false,"schema":{"type":"string"}}],"tags":["Templates"],"operationId":"templatesRemove","security":[{},{"accessToken":[]}]}},"/{key}/templates/upload":{"post":{"responses":{"200":{"description":"Success"}},"description":"Uploads a media (public URL or base64 data URL) and returns the handle to use in a template header example (example.header_handle).","summary":"Upload a header media sample and get its handle (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Templates"],"operationId":"templatesUpload","security":[{},{"accessToken":[]}]}},"/{key}/templates/{id}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns a single template (status, category, language, components) by its ID.","summary":"Get a message template by ID (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"tags":["Templates"],"operationId":"templatesGetOne","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Edits an existing template (category and/or components) — name/language cannot change. Re-submits for Meta review.","summary":"Edit a message template by ID (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaUpdateTemplate"}}}},"tags":["Templates"],"operationId":"templatesUpdate","security":[{},{"accessToken":[]}]}},"/{key}/flows":{"get":{"responses":{"200":{"description":"Success"}},"description":"Lists the WABA Flows with status (DRAFT, PUBLISHED, DEPRECATED) and pending validation errors.","summary":"List Flows (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsList","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Creates a Flow in DRAFT. The content goes separately through PUT /{key}/flows/{flowId}/json. Pass `cloneFlowId` to duplicate an existing Flow — the official path to change a published one.","summary":"Create a Flow (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaCreateFlow"}}}},"tags":["Flows"],"operationId":"flowsCreate","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}":{"get":{"responses":{"200":{"description":"Success"}},"summary":"Get one Flow (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsGet","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"summary":"Update Flow name or categories (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaUpdateFlow"}}}},"tags":["Flows"],"operationId":"flowsUpdate","security":[{},{"accessToken":[]}]},"delete":{"responses":{"200":{"description":"Success"}},"description":"Only DRAFT Flows can be deleted.","summary":"Delete a Flow (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsRemove","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}/json":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the current Flow JSON, or null when the Flow has no content yet.","summary":"Read the Flow JSON (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsReadJson","security":[{},{"accessToken":[]}]},"put":{"responses":{"200":{"description":"Success"}},"description":"Replaces the Flow content. Meta validation problems come back as `validation_errors` with HTTP 200 — they are not transport errors, they are what blocks publishing.","summary":"Upload the Flow JSON (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaFlowJson"}}}},"tags":["Flows"],"operationId":"flowsSaveJson","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}/publish":{"post":{"responses":{"200":{"description":"Success"}},"description":"Publishes a DRAFT Flow. All validation errors must be resolved first.","summary":"Publish a Flow (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsPublish","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}/deprecate":{"post":{"responses":{"200":{"description":"Success"}},"description":"Retires a published Flow. It can no longer be sent, and the change cannot be undone.","summary":"Deprecate a Flow (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsDeprecate","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}/preview":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns a login-free preview URL, valid for 30 days, that works for DRAFT Flows and can be embedded in an iframe. Pass `invalidate=true` to generate a new link — it invalidates any link already shared.","summary":"Get the Flow preview URL (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}},{"in":"query","name":"invalidate","required":false,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsPreview","security":[{},{"accessToken":[]}]}},"/{key}/flows/{flowId}/responses":{"get":{"responses":{"200":{"description":"Success"}},"description":"Responses collected from this Flow, newest first, with the union of the field names observed. Use the id `__sem_origem__` to read responses whose flow_token did not match any send.","summary":"List Flow responses (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"flowId","required":true,"schema":{"type":"string"}}],"tags":["Flows"],"operationId":"flowsResponses","security":[{},{"accessToken":[]}]}},"/{key}/media":{"post":{"responses":{"200":{"description":"Success"}},"description":"Uploads a media (public URL or base64 data URL) to the Cloud API and returns the media id to use as a template header parameter at send time.","summary":"Upload a runtime media and get its Meta media id (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}}},"tags":["Media"],"operationId":"mediaUpload","security":[{},{"accessToken":[]}]}},"/{key}/analytics/usage":{"get":{"responses":{"200":{"description":"Success"}},"description":"Billable (outside customer service window) messages delivered in the last 24h across the WABA vs the messaging limit (whatsapp_business_manager_messaging_limit). usageAvailable=false means the usage read failed. `unlimited` is true only for TIER_UNLIMITED; limit=null with unlimited=false means the tier could not be read. Approximation — Meta does not expose the exact real-time counter.","summary":"Usage vs messaging limit (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Analytics"],"operationId":"analyticsUsage","security":[{},{"accessToken":[]}]}},"/{key}/analytics/conversations":{"get":{"responses":{"200":{"description":"Success"}},"description":"LEGACY — conversation-based pricing, replaced by per-message pricing on July 1, 2025 (use /analytics/pricing). Only meaningful for periods before that. Query: start, end (unix seconds), granularity (HALF_HOUR|DAILY|MONTHLY).","summary":"Conversation analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}},{"in":"query","name":"granularity","required":false,"schema":{"type":"string"}}],"tags":["Analytics"],"operationId":"analyticsConversations","security":[{},{"accessToken":[]}]}},"/{key}/analytics/messages":{"get":{"responses":{"200":{"description":"Success"}},"description":"Sent/delivered message counts. Query: start, end (unix seconds), granularity (HALF_HOUR|DAILY|MONTHLY).","summary":"Messaging analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}},{"in":"query","name":"granularity","required":false,"schema":{"type":"string"}}],"tags":["Analytics"],"operationId":"analyticsMessages","security":[{},{"accessToken":[]}]}},"/{key}/analytics/templates":{"get":{"responses":{"200":{"description":"Success"}},"description":"Per-template metrics (sent, delivered, read, button clicks) in the period. Query: start, end (unix seconds; up to 90 days back). Reads and clicks stop updating 7 days after sending.","summary":"Template analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}}],"tags":["Analytics"],"operationId":"analyticsTemplates","security":[{},{"accessToken":[]}]}},"/{key}/analytics/pricing":{"get":{"responses":{"200":{"description":"Success"}},"description":"Cost and delivered-message volume by pricing category in the period (per-message pricing, from pricing_analytics). costAvailable=false when Meta returns no cost (WABA billed through a partner credit line). Query: start, end (unix seconds; up to 1 year back).","summary":"Pricing analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}}],"tags":["Analytics"],"operationId":"analyticsPricing","security":[{},{"accessToken":[]}]}},"/{key}/analytics/overview":{"get":{"responses":{"200":{"description":"Success"}},"description":"Messages sent, delivered and received by this number in the period, plus delivered messages by pricing category, free (customer service window / free entry point) vs paid (REGULAR), and a daily series (`date` is the day in the WABA timezone). No cost is returned. `totals` come from Meta messaging analytics; `delivered`, `free` and `paid` come from pricing analytics, so `totals.delivered` and `delivered.total` can differ slightly. `unavailable` lists the parts whose Meta call failed: `messages` → totals.sent/delivered are null, `received` → totals.received is null, `pricing` → delivered/free/paid are 0. An error status is returned only when all parts fail. Query: start, end (unix seconds; up to 1 year back).","summary":"Messaging overview (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}}],"tags":["Analytics"],"operationId":"analyticsOverview","security":[{},{"accessToken":[]}]}},"/{key}/analytics/calls":{"get":{"responses":{"200":{"description":"Success"}},"description":"Call count, cost and average duration by direction. Query: start, end (unix seconds), granularity (HALF_HOUR|DAILY|MONTHLY), direction (USER_INITIATED|BUSINESS_INITIATED).","summary":"Call analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}},{"in":"query","name":"granularity","required":false,"schema":{"type":"string"}},{"in":"query","name":"direction","required":false,"schema":{"type":"string"}}],"tags":["Analytics"],"operationId":"analyticsCalls","security":[{},{"accessToken":[]}]}},"/{key}/analytics/groups/{groupId}":{"get":{"responses":{"200":{"description":"Success"}},"description":"Messages sent/delivered/read and participants joined/left for a Cloud API group. Query: start, end (unix seconds; up to 90 days back).","summary":"Group analytics (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}},{"in":"query","name":"start","required":false,"schema":{"type":"number"}},{"in":"query","name":"end","required":false,"schema":{"type":"number"}}],"tags":["Analytics"],"operationId":"analyticsGroup","security":[{},{"accessToken":[]}]}},"/{key}/calling/settings":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the number calling configuration (status, call hours, callback permission, SIP).","summary":"Get calling settings (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Calling"],"operationId":"callingGetSettings","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Configures calling: { calling: { status, call_icon_visibility, callback_permission_status, call_hours, sip } }. Use SIP to bridge audio to your PBX (no WebRTC stack needed).","summary":"Update calling settings (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"calling":{"type":"object"}},"type":"object"}}}},"tags":["Calling"],"operationId":"callingUpdateSettings","security":[{},{"accessToken":[]}]}},"/{key}/calling/call":{"post":{"responses":{"200":{"description":"Success"}},"description":"Signaling for the WhatsApp Business Calling API. connect requires \"to\"; the others require \"callId\". Pass \"sdp\" (WebRTC) when applicable. Audio media is WebRTC/SIP — not handled here.","summary":"Control a call: connect/pre_accept/accept/reject/terminate (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"action":{"type":"string"},"to":{"type":"string"},"callId":{"type":"string"},"sdp":{"type":"string"},"sdpType":{"type":"string"}},"type":"object"}}}},"tags":["Calling"],"operationId":"callingAction","security":[{},{"accessToken":[]}]}},"/{key}/conversation":{"get":{"responses":{"200":{"description":"Success"}},"description":"Returns the welcome message toggle, ice breakers (prompts) and commands configured on the number.","summary":"Get conversational components (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"tags":["Conversation"],"operationId":"conversationGet","security":[{},{"accessToken":[]}]},"post":{"responses":{"200":{"description":"Success"}},"description":"Sets welcome message, ice breakers (prompts, up to 4) and commands. Body: { enableWelcomeMessage, prompts:[], commands:[{command_name,command_description}] }.","summary":"Update conversational components (official only)","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"enableWelcomeMessage":{"type":"boolean"},"prompts":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true}},"commands":{"type":"array","items":{"oneOf":[{"type":"integer","multipleOf":1},{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}],"nullable":true}}},"type":"object"}}}},"tags":["Conversation"],"operationId":"conversationUpdate","security":[{},{"accessToken":[]}]}}},"tags":[{"name":"Instance"},{"name":"Chatwoot"},{"name":"Message"},{"name":"Action message"},{"name":"Reply to a message"},{"name":"Chat"},{"name":"Call"},{"name":"Labels"},{"name":"Actions"},{"name":"Contacts"},{"name":"Groups"},{"name":"Community"},{"name":"Business"},{"name":"Newsletter"},{"name":"Status"},{"name":"Templates"},{"name":"Flows"},{"name":"Media"},{"name":"Analytics"},{"name":"Calling"},{"name":"Conversation"}],"components":{"schemas":{"SchemaWebhook":{"type":"object","properties":{"allowWebhook":{"type":"boolean","example":true,"enum":[true,false]},"allowNumber":{"type":"string","description":"Use \"all\" to receive events from any number, or specify numbers separated by commas to filter events (e.g. \"5566999999,5511888888\").","example":"all"},"webhookMessage":{"type":"string","example":""},"webhookGroup":{"type":"string","example":""},"webhookConnection":{"type":"string","example":""},"webhookQrCode":{"type":"string","example":""},"webhookMessageFromMe":{"type":"string","example":""},"webhookHistory":{"type":"string","example":""},"webhookFlowResponse":{"type":"string","description":"Canal dedicado da resposta de WhatsApp Flow (interactive.nfm_reply).","example":""},"webhookFormat":{"type":"string","description":"Formato do payload de saída: \"native\" (atual, default), \"meta\" (envelope da WhatsApp Cloud API) ou \"both\" (envia os dois).","enum":["native","meta","both"],"example":"native"}},"required":["allowWebhook"]},"SchemaSendMessageMeta":{"type":"object","properties":{"messaging_product":{"type":"string","example":"whatsapp","minLength":1},"recipient_type":{"type":"string","example":"individual"},"to":{"type":"string","example":"5566997145103","minLength":1},"type":{"type":"string","example":"text","enum":["text","image","audio","video","document","sticker","location","reaction","interactive","contacts"],"minLength":1},"text":{"$ref":"#/components/schemas/MetaText"},"image":{"$ref":"#/components/schemas/MetaMediaLink"},"audio":{"$ref":"#/components/schemas/MetaMediaLink"},"video":{"$ref":"#/components/schemas/MetaMediaLink"},"document":{"$ref":"#/components/schemas/MetaMediaLink"},"sticker":{"$ref":"#/components/schemas/MetaMediaLink"},"location":{"$ref":"#/components/schemas/MetaLocation"},"reaction":{"$ref":"#/components/schemas/MetaReaction"},"interactive":{"type":"object"},"contacts":{"type":"array","items":{"type":"object"}}},"required":["messaging_product","to","type"]},"MetaText":{"type":"object","properties":{"body":{"type":"string","example":"Hello from Wame","minLength":1},"preview_url":{"type":"boolean","example":false}},"required":["body"]},"MetaMediaLink":{"type":"object","properties":{"link":{"type":"string","example":"https://example.com/file.jpg"},"caption":{"type":"string"},"filename":{"type":"string"}}},"MetaLocation":{"type":"object","properties":{"latitude":{"type":"number","example":-23.5505},"longitude":{"type":"number","example":-46.6333},"name":{"type":"string"},"address":{"type":"string"}},"required":["latitude","longitude"]},"MetaReaction":{"type":"object","properties":{"message_id":{"type":"string","example":"wamid.HBgL...","minLength":1},"emoji":{"type":"string","example":"👍"}},"required":["message_id","emoji"]},"SchemaSendingPresence":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"status":{"type":"string","enum":["unavailable","available","composing","recording","paused"],"example":"composing","minLength":1},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","status"]},"SchemaMarkRead":{"type":"object","properties":{"messageId":{"type":"string","example":"wamid.HBgL...","minLength":1},"typing":{"type":"boolean","example":true},"to":{"type":"string","example":"1040574664587044"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["messageId"]},"SchemaSendingText":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"text":{"type":"string","example":"Hey !","minLength":1},"ia":{"type":"boolean","example":false},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","text"]},"SchemaSendingTemplate":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"name":{"type":"string","example":"hello_world","minLength":1},"language":{"type":"string","example":"pt_BR"},"components":{"type":"array","example":[{"type":"body","parameters":[{"type":"text","text":"Fulano"}]}],"items":{}},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","name"]},"SchemaButtonMessageReply":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"header":{"type":"object","example":{"title":"Example Header","hasMediaAttachment":true,"imageMessage":{"url":"https://raphaelvserafim.com/og-image.png"}}},"text":{"type":"string","example":"This is a test","minLength":1},"footer":{"type":"string","example":"choose an option"},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/SchemaButton"},"example":[{"type":"quick_reply","id":"uniqId1","text":"Yes"},{"type":"quick_reply","id":"uniqId2","text":"No"}]},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","header","text"]},"SchemaButton":{"type":"object","properties":{"type":{"type":"string","example":"quick_reply"},"id":{"type":"string","example":"click_1"},"text":{"type":"string","example":"Click here 001"},"url":{"type":"string","example":"https://api-wa.me"},"copy_code":{"type":"string","example":"1234567890"},"phone_number":{"type":"string","example":"+5566997145103"}}},"SchemaButtonMessage":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"header":{"type":"object","example":{"title":"Example Title","hasMediaAttachment":true,"imageMessage":{"url":"https://raphaelvserafim.com/og-image.png"}}},"text":{"type":"string","example":"This is a test","minLength":1},"footer":{"type":"string","example":"choose an option"},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/SchemaButton"},"example":[{"type":"cta_copy","copy_code":"1234567890","text":"Copy barcode"},{"type":"cta_url","url":"https://api-wa.me","text":"Access the website"},{"type":"cta_call","phone_number":"+5566997145103","text":"Call us"}]},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","header","text"]},"SchemaSendingPix":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"title":{"type":"string","minLength":1,"example":"Pizza"},"text":{"type":"string","minLength":1,"example":"Pizza "},"referenceId":{"type":"string","minLength":1,"example":"apiwame"},"code":{"type":"string","example":"0020101021226700014br.gov.bcb.pix2548pix.example.com"},"key":{"type":"string","minLength":1,"example":"23711695000115"},"merchantName":{"type":"string","minLength":1,"example":"CACHE SISTEMAS WEB"},"keyType":{"type":"string","minLength":1,"example":"CNPJ"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"},"example":[{"id":"123","name":"Pizza G","price":10,"quantity":10},{"id":"122","name":"Pizza GG","price":20,"quantity":10}]},"subtotal":{"type":"number","example":90},"totalAmount":{"type":"number","example":100}},"required":["to","title","text","referenceId","key","merchantName","keyType","subtotal","totalAmount"]},"Item":{"type":"object","properties":{"id":{"type":"string","example":"id-123"},"name":{"type":"string","example":"Pizza"},"price":{"type":"number","example":10},"quantity":{"type":"number","example":1}}},"SchemaSendingOrderDetails":{"type":"object","properties":{"to":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"referenceId":{"type":"string","minLength":1},"paymentLinkUri":{"type":"string","minLength":1},"totalAmount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"$ref":"#/components/schemas/OrderTax"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}},"required":["to","text","title","referenceId","paymentLinkUri","totalAmount","subtotal","items"]},"OrderTax":{"type":"object","properties":{"value":{"type":"number"},"description":{"type":"string"}},"required":["value"]},"OrderItem":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"price":{"type":"number"},"quantity":{"type":"number"}},"required":["id","name","price","quantity"]},"SchemaSendingList":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"buttonText":{"type":"string","example":"Ver opções"},"text":{"type":"string","example":"Selecione uma opção:"},"title":{"type":"string","example":"Menu Principal"},"description":{"type":"string","example":"Selecione uma opção:"},"footer":{"type":"string","example":"Wame API"},"sections":{"type":"array","items":{"$ref":"#/components/schemas/ListSection"},"example":[{"title":"Serviços","rows":[{"title":"Suporte","description":"Falar com atendente","rowId":"support"},{"title":"Financeiro","rowId":"finance"}]},{"title":"Info","rows":[{"title":"Horário","description":"Seg-Sex 9h-18h","rowId":"hours"}]}]},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to"]},"ListSection":{"type":"object","properties":{"title":{"type":"string","example":"Serviços"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ListRow"}}}},"ListRow":{"type":"object","properties":{"title":{"type":"string","example":"Suporte"},"description":{"type":"string","example":"Falar com atendente"},"rowId":{"type":"string","example":"support"}}},"SchemaSendingFlow":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"flowId":{"type":"string","minLength":1,"example":"1605871230584440"},"flowCta":{"type":"string","minLength":1,"example":"Abrir"},"body":{"type":"string","example":"Toque no botão abaixo para abrir o formulário."},"header":{"type":"string","example":"Suporte Wame API"},"footer":{"type":"string","example":"Wame API"},"flowAction":{"type":"string","enum":["navigate","data_exchange"],"example":"navigate"},"screen":{"type":"string","example":"WELCOME"},"data":{"type":"object","example":{"userId":123}},"flowToken":{"type":"string","example":"a1b2c3d4"},"mode":{"type":"string","enum":["draft","published"],"example":"published"}},"required":["to","flowId","flowCta"]},"SchemaSendingSurvey":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"name":{"type":"string","example":"Do you like PHP?","minLength":1},"options":{"type":"array","items":{"type":"string"},"example":["Yes","No"]},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","name","options"]},"SchemaSendWithTitleAndFooter":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"title":{"type":"string","example":"Raphael Serafim","minLength":1},"text":{"type":"string","example":"Hey !","minLength":1},"footer":{"type":"string","example":"# 123","minLength":1}},"required":["to","title","text","footer"]},"SchemaSendingAudio":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"url":{"type":"string","minLength":1,"example":"https://url-audio"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","url"]},"SchemaSendingImage":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"url":{"type":"string","minLength":1,"example":"https://a.cdn-hotels.com/gdcs/production190/d988/1071675e-1bd7-4a81-8b40-735eb9241410.jpg"},"caption":{"type":"string","example":"Toronto"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","url"]},"SchemaSendingVideo":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"url":{"type":"string","minLength":1,"example":"https://www.w3schools.com/html/mov_bbb.mp4"},"caption":{"type":"string","example":"Big Buck Bunny"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","url"]},"SchemaSendingDocument":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"url":{"type":"string","minLength":1,"example":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]},"mimetype":{"type":"string","minLength":1,"example":"application/pdf"},"fileName":{"type":"string","example":"document.pdf"},"caption":{"type":"string","example":"Example document"}},"required":["to","url","mimetype"]},"SchemaSendingContact":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"contact":{"$ref":"#/components/schemas/SchemaContact"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","contact"]},"SchemaContact":{"type":"object","properties":{"fullName":{"type":"string","example":"Raphael Serafim","minLength":1},"organization":{"type":"string","example":"api-wa.me"},"phoneNumber":{"type":"string","example":"5566997145103","minLength":1}},"required":["fullName","phoneNumber"]},"SchemaSendingContacts":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"displayName":{"type":"string","example":"My Contacts","minLength":1},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/SchemaContact"},"example":[{"fullName":"Raphael Serafim","phoneNumber":"5511999999999","organization":"APIWame"},{"fullName":"John Doe","phoneNumber":"5511888888888"}]}},"required":["to","displayName","contacts"]},"SchemaSendingLocation":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"location":{"$ref":"#/components/schemas/SchemaLocation"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","location"]},"SchemaLocation":{"type":"object","properties":{"latitude":{"type":"number","example":37.7749},"longitude":{"type":"number","example":-122.4194},"name":{"type":"string","example":"Google Brasil"},"address":{"type":"string","example":"Av. Brg. Faria Lima, 3477 - Itaim Bibi, São Paulo - SP"}},"required":["latitude","longitude"]},"SchemaSendingLocationRequest":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"text":{"type":"string","example":"Compartilhe sua localização, por favor","minLength":1}},"required":["to","text"]},"SchemaSendingAd":{"type":"object","properties":{"to":{"type":"string","example":"5566997145103","minLength":1},"text":{"type":"string","example":"Confira nossa promoção!","minLength":1},"url":{"type":"string","example":"https://example.com/promo"},"sourceId":{"type":"string","example":"AD123"},"sourceUrl":{"type":"string","example":"https://fb.me/xyz"},"title":{"type":"string","example":"Promoção de verão"},"body":{"type":"string","example":"Clique e fale com a gente"},"mentions":{"type":"array","items":{"type":"string"},"example":["5566997145103@s.whatsapp.net"]}},"required":["to","text"]},"SchemaSendingLink":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"title":{"type":"string","minLength":1,"example":"Raphael Serafim"},"text":{"type":"string","minLength":1},"description":{"type":"string","example":"Software Developer"},"thumbnailUrl":{"type":"string","example":"https://avatars.githubusercontent.com/u/68257896","minLength":1},"sourceUrl":{"type":"string","example":"https://github.com/raphaelvserafim","minLength":1}},"required":["to","title","text","thumbnailUrl","sourceUrl"]},"SchemaSendingReaction":{"type":"object","properties":{"text":{"type":"string","example":"👽"},"msgId":{"type":"string","example":"ABSHDGHRYA","minLength":1},"to":{"type":"string","example":"5511999999999"},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["text","msgId"]},"SchemaSendingImageBase64":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"base64":{"type":"string","minLength":1},"caption":{"type":"string"}},"required":["to","base64"]},"SchemaSendingAudioBase64":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"base64":{"type":"string","minLength":1},"provider":{"type":"string","example":"whatsapp","enum":["whatsapp","instagram","messenger","telegram"]}},"required":["to","base64"]},"SchemaSendingDocumentBase64":{"type":"object","properties":{"to":{"type":"string","minLength":1,"example":"5566997145103"},"base64":{"type":"string","minLength":1},"mimetype":{"type":"string","minLength":1},"fileName":{"type":"string"},"caption":{"type":"string"}},"required":["to","base64","mimetype"]},"DownloadableMessage":{"type":"object","properties":{"mediaKey":{"type":"string","minLength":1},"directPath":{"type":"string","minLength":1},"url":{"type":"string","minLength":1}},"required":["mediaKey","directPath","url"]},"SchemaGroupCreate":{"type":"object","properties":{"name":{"type":"string","example":"Devs","minLength":1},"participants":{"type":"array","example":["5566997145103"],"items":{}}},"required":["name","participants"]},"SchemaGroupUpdate":{"type":"object","properties":{"name":{"type":"string","example":"Devs","minLength":1},"description":{"type":"string","example":"is description","minLength":1}},"required":["name","description"]},"SchemaGroupParticipants":{"type":"object","properties":{"participants":{"type":"array","example":["5566997145103"],"items":{}}},"required":["participants"]},"GroupParticipants":{"type":"object","properties":{"participants":{"type":"array","example":["5566997145103"],"items":{}},"action":{"type":"string","enum":["reject","approve"],"example":"approve","minLength":1}},"required":["participants","action"]},"SchemaCommunityCreate":{"type":"object","properties":{"name":{"type":"string","example":"Community api-wa.me","minLength":1},"subject":{"type":"string","example":"is subject","minLength":1}},"required":["name","subject"]},"SchemaCommunityUpdate":{"type":"object","properties":{"subject":{"type":"string","example":"is subject updated","minLength":1},"description":{"type":"string","example":"is description updated","minLength":1}},"required":["subject","description"]},"SchemaProduct":{"type":"object","properties":{"name":{"type":"string","example":"Ovo"},"description":{"type":"string","example":"Ovo Branco"},"originCountryCode":{"type":"string","example":"BR"},"currency":{"type":"string","example":"BRL"},"price":{"type":"number","example":20},"images":{"type":"array","example":[{"url":"https://raphaelvserafim.com/og-image.png"}],"items":{}}}},"SchemaCreateTemplate":{"type":"object","properties":{"name":{"type":"string","example":"confirmacao_pedido","minLength":1},"language":{"type":"string","example":"pt_BR","minLength":1},"category":{"type":"string","example":"UTILITY","enum":["MARKETING","UTILITY","AUTHENTICATION"],"minLength":1},"components":{"type":"array","items":{"$ref":"#/components/schemas/TemplateComponent"}},"allow_category_change":{"type":"boolean","example":false}},"required":["name","language","category","components"]},"TemplateComponent":{"type":"object","properties":{"type":{"type":"string","example":"BODY","enum":["HEADER","BODY","FOOTER","BUTTONS"],"description":"Which block this is. Exactly one BODY is required; HEADER, FOOTER and BUTTONS are optional and appear at most once each.","minLength":1},"format":{"type":"string","example":"TEXT","enum":["TEXT","IMAGE","VIDEO","DOCUMENT"],"description":"HEADER only. TEXT takes `text`; IMAGE, VIDEO and DOCUMENT take no text and require a media sample: upload it first with POST /{key}/templates/upload and put the returned handle in `example.header_handle`."},"text":{"type":"string","example":"Olá {{1}}, seu pedido {{2}} foi confirmado!","description":"Component text. Variables are positional placeholders written as {{1}}, {{2}}, … and Meta enforces four rules on them: the text cannot start or end with a variable, two variables cannot sit next to each other, numbering must run sequentially from 1, and every variable needs a matching sample in `example`. Breaking any of these is rejected at creation."},"buttons":{"type":"array","items":{"$ref":"#/components/schemas/TemplateButton"},"description":"BUTTONS only. Up to 10 buttons, and Meta limits how they can be mixed — see `type` on the button."},"add_security_recommendation":{"type":"boolean","example":true,"description":"AUTHENTICATION templates only, on the BODY: appends Meta's standard \"do not share this code\" warning."},"code_expiration_minutes":{"type":"number","example":10,"description":"AUTHENTICATION templates only, on the FOOTER: minutes until the code expires, shown as an expiry notice."},"example":{"type":"object","example":{"body_text":[["Joao","#123"]]},"description":"Sample values Meta requires whenever the component has variables or media. Required for BODY with {{n}} placeholders: { \"body_text\": [[\"Joao\", \"#123\"]] } — note the nested array, and one entry per variable, in order. Required for HEADER with format IMAGE/VIDEO/DOCUMENT: { \"header_handle\": [\"<handle>\"] }, where the handle comes from POST /{key}/templates/upload. For HEADER with format TEXT containing {{1}}: { \"header_text\": [\"Joao\"] }. Omitting this is the most common cause of Meta rejecting a template."}},"description":"One block of a template. `type` decides which other fields apply: HEADER takes `format` plus `text` (TEXT) or `example.header_handle` (media); BODY takes `text` and, when it has variables, `example.body_text`; FOOTER takes `text` and accepts no variables; BUTTONS takes `buttons`. A template needs exactly one BODY.","required":["type"]},"TemplateButton":{"type":"object","properties":{"type":{"type":"string","example":"URL","enum":["QUICK_REPLY","URL","PHONE_NUMBER","COPY_CODE","OTP"],"minLength":1},"text":{"type":"string","example":"Acessar site"},"url":{"type":"string","example":"https://exemplo.com/{{1}}"},"phone_number":{"type":"string","example":"5511999999999"},"otp_type":{"type":"string","example":"COPY_CODE","enum":["COPY_CODE","ONE_TAP","ZERO_TAP"]},"autofill_text":{"type":"string","example":"Preencher código"},"package_name":{"type":"string","example":"com.exemplo.app"},"signature_hash":{"type":"string","example":"K8a/AINcGX7"},"supported_apps":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSupportedApp"}},"zero_tap_terms_accepted":{"type":"boolean","example":true},"example":{"example":["promo"],"description":"URL buttons: required when `url` ends in {{1}} — an array with the sample value for that placeholder, e.g. url \"https://exemplo.com/{{1}}\" with example [\"promo\"]. COPY_CODE buttons: required — the coupon code as a string, e.g. \"PROMO10\".","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"description":"A button inside the BUTTONS component. `type` decides which other fields apply: QUICK_REPLY takes only `text`; URL takes `text` + `url`; PHONE_NUMBER takes `text` + `phone_number`; COPY_CODE takes only `example` (the coupon code as a string, e.g. \"PROMO10\"); OTP is for AUTHENTICATION templates and takes `otp_type` (plus the autofill fields for ONE_TAP/ZERO_TAP, and `zero_tap_terms_accepted` for ZERO_TAP).","required":["type"]},"TemplateSupportedApp":{"type":"object","properties":{"package_name":{"type":"string","example":"com.exemplo.app"},"signature_hash":{"type":"string","example":"K8a/AINcGX7"}}},"SchemaUpdateTemplate":{"type":"object","properties":{"category":{"type":"string","example":"UTILITY","enum":["MARKETING","UTILITY","AUTHENTICATION"]},"components":{"type":"array","items":{"$ref":"#/components/schemas/TemplateComponent"}}}},"SchemaCreateFlow":{"type":"object","properties":{"name":{"type":"string","description":"Nome do Flow, visível apenas no gerenciador — o cliente final não vê.","example":"Captação de lead","minLength":1},"categories":{"type":"array","items":{"enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"type":"string"},"description":"Uma ou mais categorias. A Meta usa isso para revisão e métricas.","example":["LEAD_GENERATION"]},"cloneFlowId":{"type":"string","description":"ID de um Flow existente para duplicar. É o caminho oficial para alterar um Flow já publicado.","example":""}},"required":["name","categories"]},"SchemaUpdateFlow":{"type":"object","properties":{"name":{"type":"string","example":"Captação de lead v2"},"categories":{"type":"array","items":{"enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"type":"string"},"example":["LEAD_GENERATION"]}}},"SchemaFlowJson":{"type":"object","properties":{"flowJson":{"type":"object","description":"O Flow JSON completo, no formato da Meta. Máximo de 10 MB."}},"required":["flowJson"]}},"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"**Optional.** Leave it empty unless your instance requires an access token — nothing changes for\ninstances that did not turn it on, and calls without this header keep working.\n\nWhen the owner turns on **\"Require access token\"** in the dashboard (instance settings → API access\ntoken), every `/{key}/...` call must also send `Authorization: Bearer <token>`. Tokens are created\nin the dashboard (valid 30/60/90/180/365 days or never; up to 5 per instance) and can be revoked.\n\nErrors (HTTP 401, `{ status, code, message }`): `token_required`, `token_invalid`,\n`token_key_mismatch`, `token_expired`, `token_revoked`. HTTP 503 `auth_unavailable` = the token\ncould not be verified right now; retry."}}}}