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

# Send Voice

> Send voice messages to WhatsApp users for more engaging and personal communication.

This specialized endpoint will allow you to send voice as if you were recording directly in the WhatsApp application.

## You can send voice messages in two ways:

## Provide a URL for the voice audio.

<Frame>
  <img src="https://mintcdn.com/hypersender/0tLzadh_wg5r0Y_6/images/docs/whatsapp/img/send-voice-url.jpeg?fit=max&auto=format&n=0tLzadh_wg5r0Y_6&q=85&s=74faee70ddacb6972fa2b04592a54d9f" alt="send-voice-url" width="1280" height="987" data-path="images/docs/whatsapp/img/send-voice-url.jpeg" />
</Frame>

<Warning>
  Please note that the URL must be publicly accessible and not require any authentication or special headers to access the file.
</Warning>

***

## Send the voice audio it self as a file upload.

<Frame>
  <img src="https://mintcdn.com/hypersender/0tLzadh_wg5r0Y_6/images/docs/whatsapp/img/send-voice-file.jpeg?fit=max&auto=format&n=0tLzadh_wg5r0Y_6&q=85&s=8cb35bea11b8915003b370050d0bf5a3" alt="send-voice-file" width="1280" height="986" data-path="images/docs/whatsapp/img/send-voice-file.jpeg" />
</Frame>

***

<Frame>
  <img src="https://mintcdn.com/hypersender/0tLzadh_wg5r0Y_6/images/docs/whatsapp/img/send-voice-preview.jpeg?fit=max&auto=format&n=0tLzadh_wg5r0Y_6&q=85&s=3f8c84c173785734ba3e92a5e06626f1" alt="send-voice-preview" width="1166" height="374" data-path="images/docs/whatsapp/img/send-voice-preview.jpeg" />
</Frame>


## OpenAPI

````yaml v1/api-reference/whatsapp/whatsapp-collection.json POST /{instance}/send-voice
openapi: 3.1.0
info:
  version: v1.0
  title: Hypersender WhatsApp API Docs
  description: >

    The Hypersender WhatsApp API is a powerful api to send and recieve messages
    using your own whatsapp number.

    Without the high costs of Meta's Whatsapp business API.


    In this Docs you'll learn how to use and integrate Hypersnder Whatsapp API
    into your existing system/service or application using simple API endpoints.


    **What you can Do?**


    - Send Text and basic Url messages.

    - Send Media through Link or uploaded file.

    - Send Audio through Link or uploaded file.

    - Send Contact Card

    - Send Location

    - Send Poll votes


    **You can also**


    - React to a message

    - Forward messages to other chats

    - Acknowledge messages (mark as read)

    - Star and unstar messages



    <hr />


    **Quick Demo**

      **Learn how to use Hypersender whatsapp API to send a message using Postman:**
      [Demo Link](https://app.hypersender.com/send-whatsapp-message-in-postman) **to easily interact with our API.**

    <hr />


    **postman collection**


    You can download our [Postman
    Collection](https://docs.hypersender.com/whatsapp-postman-collection.json)
    to easily interact with our API.


    ## Servers (Endpoints)


    - Production (activated):
    [https://app.hypersender.com/api/whatsapp/v1](https://app.hypersender.com/api/whatsapp/v1)
servers:
  - url: https://app.hypersender.com/api/whatsapp/v1
    description: Production
security:
  - Authorization: []
paths:
  /{instance}/send-voice:
    post:
      tags:
        - Send Messages
      operationId: send-link-audio
      parameters:
        - name: Accept
          in: header
          schema:
            type: string
            example: application/json
          examples:
            default:
              value: application/json
        - name: Content-Type
          in: header
          schema:
            type: string
            example: application/json
          examples:
            default:
              value: application/json
        - name: instance
          in: path
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
          examples:
            default:
              value: '{{ instance_id }}'
      requestBody:
        description: '**Require to use `multipart/form-data`**'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendVoiceRequest'
            examples:
              Example 1:
                value:
                  chatId: 1111111111111@c.us
                  url: >-
                    http://commondatastorage.googleapis.com/codeskulptor-assets/week7-brrring.m4a
                  caption: hypersender
                  reply_to: string
              Example 2:
                value:
                  chatId: 1111111111111@c.us
                  file: audio.opus
                  caption: hypersender
                  reply_to: string
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      key:
                        type: object
                        properties:
                          remoteJid:
                            type: string
                          fromMe:
                            type: boolean
                          id:
                            type: string
                      message:
                        type: object
                        properties:
                          audioMessage:
                            type: object
                            properties:
                              url:
                                type: string
                              mimetype:
                                type: string
                              fileSha256:
                                type: string
                              fileLength:
                                type: string
                              seconds:
                                type: number
                              ptt:
                                type: boolean
                              mediaKey:
                                type: string
                              fileEncSha256:
                                type: string
                              directPath:
                                type: string
                              mediaKeyTimestamp:
                                type: string
                              waveform:
                                type: string
                      messageTimestamp:
                        type: string
                      status:
                        type: string
                x-examples:
                  Example 1:
                    content:
                      url: >-
                        https://mmg.whatsapp.net/v/t62.7114-24/40934750_1123141612096506_5059779010427990564_n.enc?ccb=11-4&oh=01_Q5AaINJ58zcO7DTlO7DrMAaXKZ3pCWbLWSaQVUM0L3P8JGPa&oe=66B366E1&_nc_sid=5e03e0&mms3=true
                      mimetype: audio/ogg; codecs=opus
                      fileSha256: Y28LhNra+eEfRNKwIefqY+UU2Uf0ia4l8PrdScvlXcA=
                      fileLength: '139027'
                      seconds: 5
                      ptt: true
                      mediaKey: Chqmzo6fWYc++4A2SgwlzgNZ/3KNKjm3ceaVPSZyNVY=
                      fileEncSha256: DCsffr+JWSnJz+F1cf+uGxY/N0eXmqZxVwKvc2otd40=
                      directPath: >-
                        /v/t62.7114-24/40934750_1123141612096506_5059779010427990564_n.enc?ccb=11-4&oh=01_Q5AaINJ58zcO7DTlO7DrMAaXKZ3pCWbLWSaQVUM0L3P8JGPa&oe=66B366E1&_nc_sid=5e03e0
                      mediaKeyTimestamp: '1720449163'
              examples:
                Example 1:
                  value:
                    key:
                      remoteJid: 1111111111@s.whatsapp.net
                      fromMe: true
                      id: 3EB089F063C03E43EECE9D
                    message:
                      audioMessage:
                        url: >-
                          https://mmg.whatsapp.net/v/t62.7119-24/31809967_2958746007616712_3774955636954933761_n.enc?ccb=11-4&oh=01_Q5AaIPHnpFjuJwCULeqyHMcDO55BAj3YxolxEVLGXVvVkaKM&oe=67F2DD3D&_nc_sid=5e03e0&mms3=true
                        mimetype: audio/ogg
                        fileSha256: ubfaNZ4rY7T7/ghhWnBh1cVf1d00JSHENKunZuHs+yc=
                        fileLength: 18886
                        seconds: 10
                        ptt: true
                        mediaKey: ARUCxn91XDCjmCvFecREY4Fpg9RSOYa8O5D7TxGWGkE=
                        fileEncSha256: ER9FB+GEzrKmooWDbNpqenokG1mAtvbIU+Ceo7JeNwQ=
                        directPath: >-
                          /v/t62.7119-24/31809967_2958746007616712_3774955636954933761_n.enc?ccb=11-4&oh=01_Q5AaIPHnpFjuJwCULeqyHMcDO55BAj3YxolxEVLGXVvVkaKM&oe=67F2DD3D&_nc_sid=5e03e0
                        mediaKeyTimestamp: 1741390160
                        waveform: >-
                          AAIIAQ0nKCcdX2NTSkUqHQ4KAgICBAUGAwEAAAAAAAAAAAQFARAmMlFQVT4PHkggAgEHGVldZFpGMBYKAwQEBg==
                    messageTimestamp: 1741390160
                    status: PENDING
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      security:
        - Authorization: []
components:
  schemas:
    SendVoiceRequest:
      type: object
      properties:
        chatId:
          type: string
          description: Contact number - see chatId docs
          example: 111111111111@c.us
        url:
          type: string
          description: url to send (required without file)
        file:
          type: string
          description: file to send (required without url)
        caption:
          type: string
          description: caption for the file
        reply_to:
          type: string
          description: reply to message id
      required:
        - chatId
    ValidationError:
      type: object
      title: ValidationError
      properties:
        message:
          type: string
        errors:
          type: object
          description: Invalid or missing feilds will be shown here
        statusCode:
          type: number
      example:
        message: The given data was invalid.
        errors: {}
        statusCode: 422
      required:
        - errors
        - statusCode
      x-examples:
        Multiple fields Error:
          message: The given data was invalid.
          errors:
            messages:
              - The number you want to send the message to is not on whatsapp.
            jid: 20121323124131@s.whatsapp.net
            exists: false
          statusCode: 422
        'Single Field error ':
          message: The given data was invalid.
          errors:
            messages:
              - textMessage.text should not be empty
          statusCode: 422
      x-stoplight:
        id: 90x3wfxw7gqcb
    ServerError:
      type: object
      title: ServerError
      properties:
        message:
          type: string
      example:
        message: Internal Server Error
      x-stoplight:
        id: 2fhq2gihsfreh
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````