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

# Control active call

> Run an action on the call (play audio, speak text, hang up, etc.).



## OpenAPI

````yaml /en/voice-api/api-reference/openapi-voice.json post /v1/voice/calls/{id}/actions/{action}
openapi: 3.0.3
info:
  title: Notifique API Voice
  description: >-
    Make voice calls and control active calls. Authenticate with `Authorization:
    Bearer sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfVoiceBearerAuth: []
  - ntfVoiceApiKeyHeader: []
tags:
  - name: 'Voice: Chamadas'
    description: Originar, listar, consultar e controlar chamadas de voz.
paths:
  /v1/voice/calls/{id}/actions/{action}:
    post:
      tags:
        - 'Voice: Chamadas'
      summary: Control active call
      description: Run an action on the call (play audio, speak text, hang up, etc.).
      operationId: ntfVoice_postV1VoiceCallsAction
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: action
          in: path
          required: true
          schema:
            type: string
            enum:
              - speak
              - play
              - gather
              - transfer
              - record-start
              - record-stop
              - dtmf
              - hangup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfVoice_ActionBody'
            examples:
              speak:
                value:
                  text: Pressione 1 para vendas.
                  voice: female-natural
              gather:
                value:
                  prompt: Digite seu CPF
                  maxDigits: 11
                  timeoutSecs: 10
              transfer:
                value:
                  to: '+5511999887766'
              hangup:
                value: {}
      responses:
        '200':
          description: Ação aceita.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      callId:
                        type: string
                      action:
                        type: string
        '401':
          $ref: '#/components/responses/NtfVoice_Unauthorized'
        '403':
          $ref: '#/components/responses/NtfVoice_Forbidden'
        '404':
          description: Chamada não encontrada ou inativa.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
        '502':
          description: Falha ao executar ação.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
components:
  schemas:
    NtfVoice_ActionBody:
      type: object
      description: >-
        Campos dependem da ação. speak: text, voice. play: audioUrl. gather:
        prompt, maxDigits, timeoutSecs, voice. transfer: to. dtmf: digits.
      additionalProperties: true
    NtfVoice_ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
  responses:
    NtfVoice_Unauthorized:
      description: Missing or invalid API Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NtfVoice_ErrorEnvelope'
    NtfVoice_Forbidden:
      description: Escopo 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: 'API Key no formato Bearer (ex.: sk_live_...).'
    ntfVoiceApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````