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

# Voice memos

> Send an uploaded audio Attachment as a voice memo.

Upload the audio first, as any [Attachment](/messages/attachments), giving `duration_ms` in the allocation so the app can show the length. Then call `POST /v1/chats/{chatId}/voicememo` ([reference](/api-reference/messages/send-a-voice-memo-to-a-chat)) with the completed `attachment_id`. The SDK method is `relay.chats.sendVoicememo`.

Relay refuses anything that is not `audio/*` on this route. Instead of an upload, `voice_memo_url` accepts a public HTTPS audio URL up to 10 MiB (10,485,760 bytes), checked the same way as [other URL media](/messages/import-media#apply-the-url-safety-checks). Send one of the two fields, not both.

## Send the voice memo

Send the body to the voice memo route:

```json theme={null}
{
  "attachment_id": "01993d50-d263-7d6b-87ce-90aba89b7815"
}
```

Relay returns `202` with the message and a `voice_memo` object holding the Attachment ID, a download URL, and the file's metadata. The person hears it as a voice memo on their phone rather than as a file.

## When it fails

| Status | Code                               | Cause                                                                   | Next action                         |
| ------ | ---------------------------------- | ----------------------------------------------------------------------- | ----------------------------------- |
| `400`  | [1005](/api-reference/errors#1005) | Both fields or neither were sent.                                       | Send one.                           |
| `404`  | [2001](/api-reference/errors#2001) | No chat has that ID, or the Attachment is unknown.                      | Check both IDs.                     |
| `413`  | [2006](/api-reference/errors#2006) | The audio at `voice_memo_url` is over 10 MiB.                           | Upload it as an Attachment.         |
| `422`  | [2006](/api-reference/errors#2006) | The Attachment is not complete or not audio, or the URL failed a check. | Confirm the upload, or fix the URL. |

## Next steps

* [Upload attachments](/messages/attachments)
* [Import media from a URL](/messages/import-media)
* [Build message parts](/messages/parts)
