> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Iniciar chamada WhatsApp

> Liga para o número, fala um texto (ou toca um áudio) e desliga. Hoje na **conexão não oficial (QR)**. A conexão **oficial** chega em breve com a mesma simplicidade. Tipos: `speak` (TTS), `play` (URL de áudio) ou `template` (texto/voz do template).



## OpenAPI

````yaml /whatsapp-api/api-reference/openapi-whatsapp.json post /v1/whatsapp/calls
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Envie mensagens WhatsApp e gerencie conexões. Autentique com `Authorization:
    Bearer sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Mensagens
    description: Enviar, listar, editar e cancelar mensagens
  - name: Instâncias
    description: >-
      Cadastre e gerencie os números de WhatsApp conectados — cada número é uma
      **instância** (o telefone por onde entram e saem as mensagens).
  - name: Grupos
    description: Grupos (só conexão não oficial)
  - name: Chamadas
    description: Ligar e falar no WhatsApp (conexão não oficial hoje; oficial em breve)
  - name: Sending pools
    description: Balanceamento de instâncias WhatsApp
paths:
  /v1/whatsapp/calls:
    post:
      tags:
        - Chamadas
      summary: Iniciar chamada WhatsApp
      description: >-
        Liga para o número, fala um texto (ou toca um áudio) e desliga. Hoje na
        **conexão não oficial (QR)**. A conexão **oficial** chega em breve com a
        mesma simplicidade. Tipos: `speak` (TTS), `play` (URL de áudio) ou
        `template` (texto/voz do template).
      operationId: ntfWa_postV1WhatsappCalls
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: 'Idempotency key. Alternative: x-idempotency-key.'
        - name: x-idempotency-key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfWa_CreateWhatsAppCallRequest'
            examples:
              speak:
                summary: Falar texto (speak)
                description: Liga, sintetiza a fala e desliga.
                value:
                  to:
                    - '5511999999999'
                  type: speak
                  payload:
                    text: Olá! Seu código de verificação é 1 2 3 4.
                    voice: female
                  from: clxx...
              play:
                summary: Tocar áudio (play)
                description: Liga e toca um áudio público, depois desliga.
                value:
                  to:
                    - '5511999999999'
                  type: play
                  payload:
                    mediaUrl: https://example.com/aviso.mp3
                  from: clxx...
              template:
                summary: Template com voz
                description: Usa template do canal whatsapp_call (texto + voz).
                value:
                  to:
                    - '5511999999999'
                  type: template
                  payload:
                    templateId: clxx_template...
                    variables:
                      '1': '1234'
                      name: Ana
                  from: clxx...
      responses:
        '202':
          description: Chamada enfileirada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_WhatsAppCallCreateEnvelope'
              example:
                success: true
                data:
                  messageIds:
                    - clxx...
                  status: QUEUED
                  count: 1
        '400':
          description: Parâmetros inválidos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
              example:
                success: false
                error: Bad Request
                code: VALIDATION_ERROR
                message: Campo inválido ou ausente.
components:
  schemas:
    NtfWa_CreateWhatsAppCallRequest:
      type: object
      required:
        - from
        - to
        - type
        - payload
      properties:
        type:
          type: string
          enum:
            - speak
            - play
            - template
          description: 'Call content type. Default: speak.'
        payload:
          type: object
          additionalProperties: true
          properties:
            voice:
              type: string
              description: TTS voice hint (female, male, nova, onyx, …).
            mediaUrl:
              type: string
              description: Public audio URL (type=play).
            templateId:
              type: string
              description: Template id (type=template).
            variables:
              type: object
              additionalProperties:
                type: string
              description: Template variables.
              properties:
                '1':
                  type: string
                  example: '1234'
                name:
                  type: string
                  example: Ana
            text:
              type: string
              example: Olá! Seu código de verificação é 1 2 3 4.
          description: >-
            speak: `text`, opcional `voice`/`language`. play: `audioUrl`.
            gather: objeto `gather`. template: `templateId`, `variables`.
        options:
          type: object
          properties:
            maxRingSecs:
              type: number
            maxPlaySecs:
              type: number
            autoHangup:
              type: boolean
        clientState:
          type: string
        to:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 500
          description: 'Destinos E.164 sem `+` (ex.: 5511999887766).'
        from:
          type: string
          description: 'Instância WhatsApp: id, telefone E.164 ou nome (não use pool).'
      description: 'Chamada de voz: `from`, `to`, `type` e conteúdo em `payload`.'
      example:
        to:
          - '5511999999999'
        type: speak
        payload:
          voice: string
          mediaUrl: https://example.com/resource
          templateId: clxx...
          variables: {}
        options:
          maxRingSecs: 1
          maxPlaySecs: 1
          autoHangup: true
        clientState: string
        from: clxx...
    NtfWa_WhatsAppCallCreateEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            messageIds:
              type: array
              items:
                type: string
            messageId:
              type: string
            status:
              type: string
              example: QUEUED
            count:
              type: integer
      example:
        success: true
        data:
          messageIds:
            - clxx...
          status: QUEUED
          count: 1
    NtfWa_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Mensagem legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Respostas de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        note:
          type: string
      required:
        - success
        - error
        - message
        - code
      example:
        success: false
        error: string
        message: string
        code: string
        details:
          - field: string
            message: string
        note: string
  securitySchemes:
    ntfWaBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfWaApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key no header x-api-key.

````