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

# Send audio

> Sends an audio message to a conversation. Requires an attachment created beforehand. Can optionally quote another message from the same conversation with `quoteSourceId`, which is the id of the message ON THE CHANNEL (`wamid` on Meta, `key.id` on Evolution, `message_id` on Unipile), not Nuvia's `_id`.



## OpenAPI

````yaml /en/openapi.json post /v1/messages/send-audio
openapi: 3.0.0
info:
  title: Nuvia API - Company
  description: API documentation for companies
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensagens
  - name: contacts
    x-group: Contatos
  - name: campaigns
    x-group: Campanhas
  - name: tables
    x-group: Tabelas e Listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversas
  - name: inboxes
    x-group: Caixas de Entrada
  - name: knowledge
    x-group: Base de Conhecimento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscrições em Campanha
  - name: custom-fields
    x-group: Campos Customizados
  - name: resources
    x-group: Arquivos e Anexos
paths:
  /v1/messages/send-audio:
    post:
      tags:
        - messages
      summary: Send audio
      description: >-
        Sends an audio message to a conversation. Requires an attachment created
        beforehand. Can optionally quote another message from the same
        conversation with `quoteSourceId`, which is the id of the message ON THE
        CHANNEL (`wamid` on Meta, `key.id` on Evolution, `message_id` on
        Unipile), not Nuvia's `_id`.
      operationId: MessageController_sendAudio
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Target company identifier. Required only for global API keys
            (type=global). Ignored for company API keys and human users.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendAudioDto'
      responses:
        '201':
          description: Audio sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponseDto'
        '400':
          description: Invalid data
        '401':
          description: Invalid or expired token
        '403':
          description: You do not have permission to access this resource
      security:
        - JWT-auth: []
components:
  schemas:
    SendAudioDto:
      type: object
      properties:
        conversationId:
          type: string
          description: Conversation ID
        message:
          type: object
          properties:
            content:
              type: string
              description: Conteúdo/descrição do áudio
            contentType:
              type: string
              enum:
                - AUDIO
              description: Tipo de conteúdo
            attachment:
              description: ID do anexo do áudio
              type: string
            quoteSourceId:
              description: source_id da mensagem a ser citada (reply)
              type: string
            contentAttributes:
              description: Atributos adicionais do conteúdo (deprecated)
              type: object
              properties:
                inReplyToExternalId:
                  description: >-
                    DEPRECATED: sem efeito. Use quoteSourceId para responder
                    citando.
                  type: string
          required:
            - content
            - contentType
            - attachment
      required:
        - conversationId
        - message
    MessageResponseDto:
      type: object
      properties:
        _id:
          description: Message ID
          type: string
        content:
          type: string
          description: Message content
        additional_attributes:
          description: Additional message attributes
        content_type:
          type: string
          enum:
            - TEXT
            - CARDS
            - AUDIO
            - VIDEO
            - IMAGE
            - DOCUMENT
            - CONTACTS
            - LOCATION
            - TEMPLATE
            - STICKER
            - UNSUPPORTED
          description: 'Content type: TEXT, IMAGE, AUDIO, VIDEO, DOCUMENT, TEMPLATE, etc.'
        message_type:
          type: string
          enum:
            - INCOMING
            - OUTGOING
            - ACTIVITY
          description: 'Message type: INCOMING, OUTGOING, ACTIVITY'
        sender_type:
          description: 'Sender type: CONTACT, USER, BOT, SYSTEM'
          type: string
          enum:
            - CONTACT
            - USER
            - BOT
            - SYSTEM
        status:
          type: string
          enum:
            - SENT
            - DELIVERED
            - READ
            - FAILED
          description: 'Message status: SENT, DELIVERED, READ, FAILED'
        source_id:
          description: Message ID in the external platform
          type: string
        conversation:
          description: Conversation associated with the message
        inbox:
          description: Message's inbox
        contact:
          description: Message's contact
        user:
          description: User who sent the message
        company:
          description: Message's company
        attachments:
          description: Message attachments
          type: array
          items: {}
        errors:
          description: List of errors associated with the message
          type: array
          items:
            type: object
            properties:
              code:
                anyOf:
                  - type: string
                  - type: number
                description: Código do erro
              title:
                type: string
                description: Título do erro
              message:
                description: Mensagem de erro detalhada
                type: string
            required:
              - code
              - title
        createdAt:
          description: Message creation date
        updatedAt:
          description: Message update date
      required:
        - content
        - content_type
        - message_type
        - status
        - conversation
        - inbox
        - contact
        - company
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticação

````