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

# Habilitar/Desabilitar Agente

> Altera o status de habilitação de um agente.

## Endpoint

`PUT https://gateway.orkeia.ai/agents/{id}/enable`

## Cabeçalhos

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

### Parâmetros de caminho

Necessario passar via query params o id do agente

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

### Request body

```json theme={null}
{
  "enabled": true/false
}
```

| Nome    | Tipo    | Obrigatório | Descrição                          |
| ------- | ------- | ----------- | ---------------------------------- |
| enabled | boolean | Sim         | Se o agente esta ou não habilitado |

### Exemplo (cURL)

```bash theme={null}
curl -X PUT "https://gateway.orkeia.ai/agents/agent123/enable" \
  -H "authorization:  <seu_token>" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true}'
```

## Respostas

### Response - Success

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

### 500 — Bad Request

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

### 400 — Client Error

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