{
  "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/>As a Meta Business Partner (Meta-approved Tech Provider), the official layer runs on Meta's WhatsApp Cloud API; the unofficial layer is WAME's own independently developed technology, not provided or certified by Meta.",
    "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"
      },
      "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"
      },
      "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"
      },
      "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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{key}/chatwoot/enable": {
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Recebe { baseUrl, inboxIdentifier, hmacSecret }, valida a inbox e ativa o relay.",
        "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Chatwoot"
        ],
        "operationId": "chatwootWebhook"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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? }.",
        "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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{key}/message/base64/audio": {
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Send an audio file encoded as a base64 string instead of a URL.",
        "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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": "14375223417"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Action message"
        ],
        "operationId": "actionMessageForwardingMessages"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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., '5566996852025' 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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{key}/chat": {
      "get": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Returns all chats (individual and group) with their last message, unread count, and metadata.",
        "summary": "List all chats",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Chat"
        ],
        "operationId": "chatDelete"
      },
      "patch": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Update chat attributes. Supported actions: \"markRead\" (mark messages as read/unread) and \"pin\" (pin/unpin chat to top).",
        "summary": "Modify chat properties",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "required": true,
            "name": "id",
            "schema": {
              "type": "string",
              "example": "14375223417@s.whatsapp.net",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "required": true,
            "name": "action",
            "schema": {
              "type": "string",
              "enum": [
                "markRead",
                "pin"
              ],
              "example": "markRead",
              "minLength": 1
            }
          },
          {
            "in": "query",
            "required": true,
            "name": "value",
            "schema": {
              "type": "boolean",
              "enum": [
                false,
                true
              ],
              "example": true
            }
          }
        ],
        "tags": [
          "Chat"
        ],
        "operationId": "chatModifyChat"
      },
      "delete": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Permanently deletes a chat and its local message history. The chat ID must be in JID format (e.g., 5511999999999@s.whatsapp.net).",
        "summary": "Delete a chat",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "chatId",
            "required": false,
            "schema": {
              "type": "string",
              "example": "14375223417@s.whatsapp.net"
            }
          }
        ],
        "tags": [
          "Chat"
        ],
        "operationId": "chatDeleteChat"
      }
    },
    "/{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": "14375223417@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"
      }
    },
    "/{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"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Chat"
        ],
        "operationId": "chatPresenceSubscribe"
      }
    },
    "/{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"
                  },
                  "expiration": {
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Chat"
        ],
        "operationId": "chatToggleDisappearing"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Creates a custom label for organizing chats. Optionally specify a label ID for updating an existing label.",
        "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"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Labels"
        ],
        "operationId": "labelsCreateLabel"
      }
    },
    "/{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"
      },
      "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": "14375223417"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "tags": [
          "Labels"
        ],
        "operationId": "labelsAddChatLabel"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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.",
        "summary": "Get contact profile",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Contacts"
        ],
        "operationId": "contactsProfile"
      },
      "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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{key}/groups/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Returns detailed information about a specific group including subject, description, participants, and settings. The ID must be in group JID format (e.g., 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"
      },
      "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"
      },
      "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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      },
      "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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      }
    },
    "/{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, all contacts will see.",
        "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"
      }
    },
    "/{key}/status/image": {
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Publish an image status. Supports URL to any image format (jpg, png, webp, etc).",
        "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"
      }
    },
    "/{key}/status/video": {
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Publish a video status. Max 30 seconds recommended. Supports mp4 format.",
        "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"
      }
    },
    "/{key}/status/audio": {
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Publish an audio status as a voice note (PTT).",
        "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "post": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Submits a new WhatsApp message template to Meta for review. Body: { name, language, category, components }. Available only for official (Cloud API) instances.",
        "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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{key}/analytics/usage": {
      "get": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Business-initiated conversations in the last 24h vs the number messaging_limit_tier. 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"
      }
    },
    "/{key}/analytics/conversations": {
      "get": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Conversation counts and cost by category/type. 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"
      }
    },
    "/{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"
      }
    },
    "/{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).",
        "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"
      }
    },
    "/{key}/analytics/pricing": {
      "get": {
        "responses": {
          "200": {
            "description": "Success"
          }
        },
        "description": "Cost and conversation counts by category in the period. Query: start, end (unix seconds).",
        "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"
      }
    },
    "/{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"
      },
      "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"
      }
    },
    "/{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"
      }
    },
    "/{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"
      },
      "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"
      }
    }
  },
  "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": "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": ""
          },
          "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": "14375223417",
            "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": "👍",
            "minLength": 1
          }
        },
        "required": [
          "message_id",
          "emoji"
        ]
      },
      "SchemaSendingPresence": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "example": "14375223417",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "unavailable",
              "available",
              "composing",
              "recording",
              "paused"
            ],
            "example": "composing",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "status"
        ]
      },
      "SchemaMarkRead": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "example": "wamid.HBgL...",
            "minLength": 1
          },
          "typing": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "messageId"
        ]
      },
      "SchemaSendingText": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "example": "14375223417",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "example": "Hey !",
            "minLength": 1
          },
          "ia": {
            "type": "boolean",
            "example": false
          },
          "provider": {
            "type": "string",
            "example": "whatsapp",
            "enum": [
              "whatsapp",
              "instagram",
              "messenger"
            ]
          }
        },
        "required": [
          "to",
          "text"
        ]
      },
      "SchemaSendingTemplate": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "example": "14375223417",
            "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"
            ]
          }
        },
        "required": [
          "to",
          "name"
        ]
      },
      "SchemaButtonMessageReply": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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"
              }
            ]
          }
        },
        "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": "+14375223417"
          }
        }
      },
      "SchemaButtonMessage": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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": "+14375223417",
                "text": "Call us"
              }
            ]
          },
          "provider": {
            "type": "string",
            "example": "whatsapp",
            "enum": [
              "whatsapp",
              "instagram",
              "messenger"
            ]
          }
        },
        "required": [
          "to",
          "header",
          "text"
        ]
      },
      "SchemaSendingPix": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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": "14375223417"
          },
          "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"
                  }
                ]
              }
            ]
          }
        },
        "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": "14375223417"
          },
          "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": "14375223417",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "example": "Do you like PHP?",
            "minLength": 1
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Yes",
              "No"
            ]
          }
        },
        "required": [
          "to",
          "name",
          "options"
        ]
      },
      "SchemaSendWithTitleAndFooter": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "example": "14375223417",
            "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": "14375223417"
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "example": "https://url-audio"
          },
          "provider": {
            "type": "string",
            "example": "whatsapp",
            "enum": [
              "whatsapp",
              "instagram",
              "messenger"
            ]
          }
        },
        "required": [
          "to",
          "url"
        ]
      },
      "SchemaSendingImage": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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"
            ]
          }
        },
        "required": [
          "to",
          "url"
        ]
      },
      "SchemaSendingVideo": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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"
            ]
          }
        },
        "required": [
          "to",
          "url"
        ]
      },
      "SchemaSendingDocument": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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"
            ]
          },
          "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": "14375223417",
            "minLength": 1
          },
          "contact": {
            "$ref": "#/components/schemas/SchemaContact"
          }
        },
        "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": "14375223417",
            "minLength": 1
          }
        },
        "required": [
          "fullName",
          "phoneNumber"
        ]
      },
      "SchemaSendingContacts": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "example": "14375223417",
            "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": "14375223417",
            "minLength": 1
          },
          "location": {
            "$ref": "#/components/schemas/SchemaLocation"
          }
        },
        "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": "14375223417",
            "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": "14375223417",
            "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": [
              "14375223417@s.whatsapp.net"
            ]
          }
        },
        "required": [
          "to",
          "text"
        ]
      },
      "SchemaSendingLink": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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": "👽",
            "minLength": 1
          },
          "msgId": {
            "type": "string",
            "example": "ABSHDGHRYA",
            "minLength": 1
          },
          "to": {
            "type": "string",
            "example": "5511999999999"
          }
        },
        "required": [
          "text",
          "msgId"
        ]
      },
      "SchemaSendingImageBase64": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "base64": {
            "type": "string",
            "minLength": 1
          },
          "caption": {
            "type": "string"
          }
        },
        "required": [
          "to",
          "base64"
        ]
      },
      "SchemaSendingAudioBase64": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "base64": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "base64"
        ]
      },
      "SchemaSendingDocumentBase64": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "example": "14375223417"
          },
          "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": [
              "14375223417"
            ],
            "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": [
              "14375223417"
            ],
            "items": {}
          }
        },
        "required": [
          "participants"
        ]
      },
      "GroupParticipants": {
        "type": "object",
        "properties": {
          "participants": {
            "type": "array",
            "example": [
              "14375223417"
            ],
            "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"
            ],
            "minLength": 1
          },
          "format": {
            "type": "string",
            "example": "TEXT",
            "enum": [
              "TEXT",
              "IMAGE",
              "VIDEO",
              "DOCUMENT"
            ]
          },
          "text": {
            "type": "string",
            "example": "Olá {{1}}, seu pedido {{2}} foi confirmado!"
          },
          "buttons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateButton"
            }
          },
          "example": {
            "type": "object"
          }
        },
        "required": [
          "type"
        ]
      },
      "TemplateButton": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "URL",
            "enum": [
              "QUICK_REPLY",
              "URL",
              "PHONE_NUMBER",
              "COPY_CODE"
            ],
            "minLength": 1
          },
          "text": {
            "type": "string",
            "example": "Acessar site",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "example": "https://exemplo.com/{{1}}"
          },
          "phone_number": {
            "type": "string",
            "example": "5511999999999"
          },
          "example": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "promo"
            ]
          }
        },
        "required": [
          "type",
          "text"
        ]
      },
      "SchemaUpdateTemplate": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "example": "UTILITY",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ]
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateComponent"
            }
          }
        }
      }
    }
  }
}
