# List uploaded images

`GET /v1/assets`

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

The images uploaded to this workspace for email content, newest first; `q` matches part of the file name. Place one in a template by its `url`.

## Query parameters

- `limit` (integer, optional, min > 0, max 100, default `20`)
- `cursor` (string, optional, 1–2048 characters)
- `q` (string, optional, 1–200 characters) — Case-insensitive substring of the file name.

## Returns

Returns `200 OK` with a list of `Asset` objects in `data`, and the next page's cursor in `meta` (see [pagination](/docs/api/pagination)). Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `filename` (string, required)
- `url` (string, required, uri) — The public address to use as an image `src`.
- `mimeType` (string, required, one of `image/png`, `image/jpeg`, `image/gif`) — The image format.
- `bytes` (integer, required, min > 0, max 9007199254740991) — File size in bytes.
- `width` (integer, required, min > 0, max 9007199254740991) — Width in px.
- `height` (integer, required, min > 0, max 9007199254740991) — Height in px.
- `createdAt` (string, required, date-time)

## Example

```bash
curl https://api.kirora.io/v1/assets \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
      "filename": "filename_example",
      "url": "https://example.com",
      "mimeType": "image/png",
      "bytes": 1,
      "width": 1,
      "height": 1,
      "createdAt": "2030-03-14T09:30:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "limit": 1,
      "nextCursor": "nextCursor_example"
    }
  }
}
```
