> ## 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.

# Criar Nova Versão do Agente

> Cria uma nova versão para um agente.

## Endpoint

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

## Cabeçalhos

```
authorization:  <seu_token>
Content-Type: application/json
```

### Parâmetros de caminho

```json theme={null}
{
  "id": "ID do agente (obrigatório)"
}
```

### Request body

| Campo          | tipo                   | Opcional | Descrição                        | Exemplo                    |
| -------------- | ---------------------- | -------- | -------------------------------- | -------------------------- |
| responsible    | string                 | Não      | Responsável pela versão          | "Orkeia-dev-team"          |
| responsibleId  | string                 | Não      | id do responsável                | "12345abc"                 |
| action         | string                 | Não      | o que foi feito                  | "Criado novo agente"       |
| type           | success/ fail/ neutral | Não      | classifica o resultado da ação   | Success                    |
| date           | Date                   | Não      | data do evento (padrão ISO 8601) | "2025-08-22T18:32:45.000Z" |
| versionControl | string                 | Sim      | nome da versão                   | 1.0.0                      |

```json theme={null}
{
  "notes": "Descrição das mudanças nesta versão."
}
```

### Exemplo (cURL)

```bash theme={null}
curl -X POST "https://gateway.orkeia.ai/agents/agent123/version-control" \
  -H "authorization:  <seu_token>" \
  -H "Content-Type: application/json" \
  -d '{ "notes": "Descrição das mudanças nesta versão."}'
```

### Resposta

```json theme={null}
{
  "version": 3,
  "timestamp": "2024-07-20T10:00:00Z"
}
```
