> ## 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 llamada WhatsApp

> Marca el número, habla un texto (o reproduce un audio) y cuelga. Hoy en la conexión **no oficial (QR)**. La conexión **oficial** llega pronto con la misma forma. Tipos: `speak` (TTS), `play` (URL de audio) o `template` (texto/voz del template).



## OpenAPI

````yaml /es/whatsapp-api/api-reference/openapi-whatsapp.json post /v1/whatsapp/calls
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Envíe mensajes de WhatsApp y gestione conexiones. Autentíquese con
    `Authorization: Bearer sk_live_...` o `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Producción
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Mensajes
    description: Enviar, listar, editar y cancelar mensajes
  - name: Instancias
    description: >-
      Registre y gestione los números de WhatsApp conectados — cada número es
      una **instancia** (el teléfono por el que entran y salen los mensajes).
  - name: Grupos
    description: Grupos (solo conexión no oficial)
  - name: Llamadas
    description: Llamar y hablar en WhatsApp (no oficial hoy; oficial pronto)
  - name: Sending pools
    description: Balanceamento de instâncias WhatsApp
paths:
  /v1/whatsapp/calls:
    post:
      tags:
        - Llamadas
      summary: Iniciar llamada WhatsApp
      description: >-
        Marca el número, habla un texto (o reproduce un audio) y cuelga. Hoy en
        la conexión **no oficial (QR)**. La conexión **oficial** llega pronto
        con la misma forma. Tipos: `speak` (TTS), `play` (URL de audio) o
        `template` (texto/voz del 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: Hablar texto (speak)
                description: Marca, sintetiza la voz y cuelga.
                value:
                  to:
                    - '5511999999999'
                  type: speak
                  payload:
                    text: ¡Hola! Su código de verificación es 1 2 3 4.
                    voice: female
                  from: clxx...
              play:
                summary: Reproducir audio (play)
                description: Marca y reproduce un audio público, luego cuelga.
                value:
                  to:
                    - '5511999999999'
                  type: play
                  payload:
                    mediaUrl: https://example.com/aviso.mp3
                  from: clxx...
              template:
                summary: Template con voz
                description: Usa template del canal whatsapp_call (texto + voz).
                value:
                  to:
                    - '5511999999999'
                  type: template
                  payload:
                    templateId: clxx_template...
                    variables:
                      '1': '1234'
                      name: Ana
                  from: clxx...
      responses:
        '202':
          description: Llamada en cola.
          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: ¡Hola! Su código de verificación es 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: >-
            Mensaje 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 [Respuestas 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.

````