> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkeia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Revert Squad Version

> Reverts a squad to a specific version snapshot.

## Endpoint

`POST https://gateway.orkeia.ai/squads/{id}/version-control`

**Authentication**\
Requires header `authorization:  <your_token>`.

## Path Parameters

| Name | Type   | Required | Description                     | Example     |
| ---- | ------ | -------- | ------------------------------- | ----------- |
| id   | string | Yes      | Unique identifier of the squad. | SQUAD\_1234 |

## Request Body (JSON)

> **Note:** this endpoint **does not create** a new version. It **reverts** the squad to an existing version, identified by `versionControl`.

```json theme={null}
{
  "versionControl": "v1.0.2"
}
```

## Example (cURL)

```bash theme={null}
curl -X POST "https://gateway.orkeia.ai/squads/SQUAD_1234/version-control"   -H "authorization:  <your_token>"   -H "Content-Type: application/json"   -d '{ "versionControl": "v1.0.2" }'
```

## Responses

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": true
}
```

### 500 — Server Error

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```

## Notes

* Versions are automatically generated when the squad is **created** or **updated**.
* Use this endpoint to **revert** to a previous snapshot. To view the content of a specific version, use `GET /squads/{id}/version-control/{versionId}` (if available in your API).
