---
title: "List a deployment template's versions"
url: https://docs.corefinity.com/api/reference/deployments/list-deploy-template-versions
type: endpoint
last_updated: 2026-11-13
feature: deployment-templates
related:
  - https://docs.corefinity.com/guides/sites/code-and-deployments/deployment-templates.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_template_versions_list.md
---
# List a deployment template's versions

Answers the template's kept revisions, newest first, 50 a page: who saved each, which stages it changed and
how many environments it was written to. Paged by cursor: send `next_cursor` back as `cursor`; null means the
last page.

```http
GET /api/corestack/companies/{company}/deploy-templates/{platform}/versions
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 120 a minute
- Try it in the console: on

## Path parameters

- `company` (integer, required): The id of a company you belong to or manage. Digits only.
- `platform` (string, required): The platform the template is for, such as `magento2`, `laravel` or `wordpress`. The list answers the ones your company can have.

## Query parameters

- `cursor` (integer): The `next_cursor` of the previous answer, a whole number here. Anything else is refused `422` `invalid` on `cursor`.
- `config` (string): With `stage`, only the versions that changed that stage of this configuration.
- `stage` (string): With `config`.
- `level` (string): `corefinity` answers the versions of Corefinity's default instead. Not with `config` and `stage`.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/corestack/companies/1204/deploy-templates/magento2/versions \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/corestack/companies/1204/deploy-templates/magento2/versions');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/companies/1204/deploy-templates/magento2/versions', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/corestack/companies/1204/deploy-templates/magento2/versions",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 A page of versions.

```json
{
  "next_cursor": null,
  "template_id": 12,
  "versions": [
    {
      "at": "2026-11-09T10:42:07Z",
      "by": "Maya Okafor",
      "changed": [
        {
          "config": "production",
          "stage": "post_deploy"
        }
      ],
      "reach": {
        "kept": 0,
        "production": 1,
        "uat": 0,
        "written": 1
      },
      "restored_from": null,
      "revision": 2,
      "sets": [
        {
          "config": "production",
          "stage": "post_deploy"
        }
      ],
      "source": "person",
      "version_ref": {
        "revision": 2,
        "template_id": 12
      }
    },
    {
      "at": "2026-11-02T09:15:30Z",
      "by": "Maya Okafor",
      "changed": [
        {
          "config": "production",
          "stage": "post_deploy"
        }
      ],
      "reach": {
        "kept": 0,
        "production": 1,
        "uat": 0,
        "written": 1
      },
      "restored_from": null,
      "revision": 1,
      "sets": [
        {
          "config": "production",
          "stage": "post_deploy"
        }
      ],
      "source": "person",
      "version_ref": {
        "revision": 1,
        "template_id": 12
      }
    }
  ]
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your company requires two-factor authentication and you have not set it up. For routes outside Managed Clusters.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 422 A parameter is wrong (`invalid`, with the `field`), or `config` came without `stage`, or `level` came with them (`invalid` on `level`).

```json
{
  "code": "invalid",
  "errors": {
    "level": [
      "Filter by level, or by one configuration and stage."
    ]
  },
  "field": "level",
  "message": "Filter by level, or by one configuration and stage.",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Deployment templates](https://docs.corefinity.com/guides/sites/code-and-deployments/deployment-templates.md)
- MCP tool: [`corestack_deployments_template_versions_list`](https://docs.corefinity.com/mcp/tools/corestack_deployments_template_versions_list.md)
