> ## 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 da Base de Conhecimento

> Cria uma nova versão para uma base de conhecimento.

## Endpoint

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

**Autenticação**\
Requer cabeçalho `authorization:  <seu_token>`.

## Parâmetros de Caminho

| Nome | Tipo   | Obrigatório | Descrição                              | Exemplo    |
| ---- | ------ | ----------- | -------------------------------------- | ---------- |
| id   | string | Sim         | Identificador da base de conhecimento. | KB\_123456 |

## Corpo da Requisição (JSON)

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

## Exemplo (cURL)

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

## Respostas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": {
    "versionId": "v1.0.2",
    "createdAt": "2024-07-20T10:00:00Z",
    "notes": "Descrição das mudanças nesta versão."
  }
}
```

### 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
}
```
