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

> Inicia una llamada de voz a uno o más números.



## OpenAPI

````yaml /es/voice-api/api-reference/openapi-voice.json post /v1/voice/calls
openapi: 3.0.3
info:
  title: Notifique API Voice
  description: >-
    Haga llamadas de voz y controle llamadas activas. 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:
  - ntfVoiceBearerAuth: []
  - ntfVoiceApiKeyHeader: []
tags:
  - name: 'Voz: Llamadas'
    description: Originar, listar, consultar y controlar llamadas de voz.
paths:
  /v1/voice/calls:
    post:
      tags:
        - 'Voice: Chamadas'
      summary: Iniciar llamada
      description: Inicia una llamada de voz a uno o más números.
      operationId: ntfVoice_postV1VoiceCalls
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfVoice_CreateBody'
            example:
              from: '+5511987654321'
              to:
                - '+5511999887766'
              type: speak
              payload:
                text: ¡Hola! Llamada de prueba.
                voice: female-natural
              clientState: campanha-42
      responses:
        '202':
          description: Llamada en cola.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfVoice_SingleEnvelope'
        '400':
          description: Parámetros no válidos (desde/hasta).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
        '401':
          $ref: '#/components/responses/NtfVoice_Unauthorized'
        '402':
          description: Saldo insuficiente o espacio de trabajo bloqueado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
              example:
                success: false
                error: Payment Required
                code: WORKSPACE_BLOCKED
                message: Payment Required
        '403':
          $ref: '#/components/responses/NtfVoice_Forbidden'
components:
  schemas:
    NtfVoice_CreateBody:
      type: object
      required:
        - from
        - to
        - type
        - payload
      properties:
        from:
          type: string
          description: Número de identificación en el espacio de trabajo o E.164.
        to:
          oneOf:
            - type: array
              items:
                type: string
              minItems: 1
              maxItems: 100
            - type: string
          description: >-
            Destino E.164 (+...). Preferiblemente una matriz (canónica); cadena
            aceptada por compatibilidad.
        type:
          type: string
          enum:
            - speak
            - play
            - gather
            - template
          description: >-
            Acción inicial: `speak` (TTS en `payload.text`), `play`
            (`payload.audioUrl`), `gather` (`payload.gather`), `template`
            (`payload.templateId`).
        payload:
          type: object
          description: >-
            Contenido según `type`. **speak:** `text`, opcional
            `voice`/`language`. **play:** `audioUrl`. **gather:** objeto
            `gather`. **template:** `templateId` + `variables` opcionales.
        record:
          type: boolean
        machineDetection:
          type: string
          example: detect
        clientState:
          type: string
    NtfVoice_SingleEnvelope:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/NtfVoice_VoiceCall'
    NtfVoice_ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
    NtfVoice_VoiceCall:
      type: object
      properties:
        id:
          type: string
        workspaceId:
          type: string
        phoneNumberId:
          type: string
          nullable: true
        direction:
          type: string
          enum:
            - OUTBOUND
            - INBOUND
        fromE164:
          type: string
        toE164:
          type: string
        status:
          type: string
          enum:
            - QUEUED
            - INITIATED
            - RINGING
            - ANSWERED
            - COMPLETED
            - FAILED
        callSessionId:
          type: string
          nullable: true
        callLegId:
          type: string
          nullable: true
        answeredAt:
          type: string
          format: date-time
          nullable: true
        endedAt:
          type: string
          format: date-time
          nullable: true
        durationSecs:
          type: integer
          nullable: true
        hangupCause:
          type: string
          nullable: true
        recordingAvailable:
          type: boolean
        recordingId:
          type: string
          nullable: true
        dtmfDigits:
          type: string
          nullable: true
        gatherResult:
          type: string
          nullable: true
        machineDetectionResult:
          type: string
          nullable: true
        speakText:
          type: string
          nullable: true
        playAudioUrl:
          type: string
          nullable: true
        chargedAs:
          type: string
          nullable: true
        chargeAmount:
          type: number
          nullable: true
        clientState:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  responses:
    NtfVoice_Unauthorized:
      description: Clave API faltante o no válida.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
    NtfVoice_Forbidden:
      description: Alcance insuficiente.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
          example:
            success: false
            error: Forbidden
            message: 'Missing scope: voice:call'
            code: FORBIDDEN
  securitySchemes:
    ntfVoiceBearerAuth:
      type: http
      scheme: bearer
      description: 'Clave API sin formato Portador (ej.: sk_live_...).'
    ntfVoiceApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````