# Download a message export

`GET /v1/messages/exports/{id}/download`

Requires an API key with the `messages:read` scope. [About keys and scopes](/docs/api/authentication)

The CSV file, one row per message, newest first. Answers `409 EXPORT_UNAVAILABLE` until the export is ready and `410 EXPORT_UNAVAILABLE` once it has expired.

## Path parameters

- `id` (string, required, uuid)

## Returns

Returns `200 OK`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

## Example

```bash
curl https://api.kirora.io/v1/messages/exports/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b/download \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
"string"
```
