# List a template's versions

`GET /v1/templates/{id}/versions`

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

Published versions, newest first, without their content. The newest is the one sends use.

## Path parameters

- `id` (string, required, uuid)

## Query parameters

- `limit` (integer, optional, min > 0, max 100, default `20`)
- `cursor` (string, optional, 1–2048 characters)

## Returns

Returns `200 OK` with a list of `TemplateVersionListItem` 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.

- `version` (integer, required, min > 0, max 9007199254740991) — The version number, from 1.
- `publishedByUserId` (string | null, required, uuid) — Who published it; `null` when published through an API key, or by a member since removed.
- `publishedAt` (string, required, date-time) — When this version was published.

## Example

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

Response `200`:

```json
{
  "data": [
    {
      "version": 1,
      "publishedByUserId": "018f2a4e-6b1c-7d3e-9f40-7ca90cf65a6b",
      "publishedAt": "2030-03-14T09:30:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "limit": 1,
      "nextCursor": "nextCursor_example"
    }
  }
}
```
