# Media

Media is a file in a message. Upload files to send, and download the file of any message that has one.

## Endpoints

- [Upload a file](https://docs.soosh.io/reference/api/media/upload-media/): `POST /v1/media`
- [Download a message's file](https://docs.soosh.io/reference/api/media/get-message-media/): `GET /v1/messages/{id}/media`

## The Media object

- `id` (string, uuid)
- `mime_type` (string): The type Soosh found by reading the file.
- `size` (integer): The size in bytes.
- `filename` (string): The file's name, without any directory.
- `expires_at` (string, date-time): When the upload is deleted, 30 days after it was made. A message, or a scheduled or running broadcast, that uses it keeps it longer.

```json
{
  "id": "5a9c3e7b-2d4f-4b61-8c0e-7f1a3d5b9e24",
  "mime_type": "image/jpeg",
  "size": 186472,
  "filename": "parcel.jpg",
  "expires_at": "2026-11-13T09:28:41.207Z"
}
```