# Enviar mensagem de áudio

### Um pouco sobre mensagens de áudio

Neste método você poderá enviar mensagens de áudio.

<figure><img src="/files/3q8kNj6RkDTWajMbAixx" alt=""><figcaption></figcaption></figure>

### Exemplo de body a ser enviado:

O parâmetro `base64` pode ser uma base64 text ou uma url para o áudio.

```json
{
    "destination": "+55 61 9551-4650",
    "base64": "http://cld3097web.audiovideoweb.com/va90web25003/companions/Foundations%20of%20Rock/13.01.mp3"
}
```

###

## Enviar uma mensagem de áudio

<mark style="color:green;">`POST`</mark> `https://api.zapfy.me/v1/instance/{{instanceKey}}/token/{{instanceToken}}/message?type=audio`

Permite enviar uma mensagem de áudio via rest para um contato no WhatsApp, note que essa mensagem será adicionada à uma fila e no momento da requisição será devolvido um `id` de identificação dessa mensagem, essa fila irá processar o envio da mensagem e depois irá chamar o `webhook`de delivery da instância que enviou a mensagem.

Após o envio, você receberá um webhook no método post na url da sua instância, veja a página de webhooks que temos aqui na documentação para melhor entendimento do que será enviado:

[Webhooks](/webhooks/envio-recebimento-de-mensagens.md)

#### Path Parameters

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| instanceKey<mark style="color:red;">\*</mark>   | String |             |
| instanceToken<mark style="color:red;">\*</mark> | String |             |

#### Query Parameters

| Name                                   | Type   | Description                                  |
| -------------------------------------- | ------ | -------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | Para envio de botões, valor deve ser `audio` |

#### Request Body

| Name                                          | Type   | Description                                                                                                                            |
| --------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| destination<mark style="color:red;">\*</mark> | String | <p>Número de telefone do usuário ou id de um grupo.</p><p><br>Exemplo: (556195514650)</p><p></p><p>Necessário conter DD e DDI.<br></p> |
| base64<mark style="color:red;">\*</mark>      | String | Base64 do áudio ou url para o áudio                                                                                                    |

{% tabs %}
{% tab title="200: OK Message scheduled" %}

```javascript
{
    "result": {
        "id": "af38175a-7daa-4d8a-9022-f2af96d566a4"
    },
    "message": "MESSAGE_SCHEDULED",
    "isValid": true
}
```

{% endtab %}
{% endtabs %}

### Webhooks disparados após o envio

O envio dessa mensagem resultará em webhooks do tipo [Envio de audio message](/webhooks/envio-recebimento-de-mensagens/envio-de-audio-message.md) e [Alteração de status da mensagem](/webhooks/envio-recebimento-de-mensagens/alteracao-de-status-da-mensagem.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zapfy.me/integrando-com-a-api/messages/enviar-mensagem-de-audio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
