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

> Cambia el estado de habilitación de un agente.

## Endpoint

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

## Cabeçalhos

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

### Parámetros de camino

Es necesario pasar el id del agente a través de query params

```json theme={null}
{
  "id": "ID del agente (obligatorio)"
}
```

### Request body

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

| Nombre  | Tipo    | Obligatorio | Descripción                       |
| ------- | ------- | ----------- | --------------------------------- |
| enabled | boolean | Sí          | Si el agente está o no habilitado |

### Ejemplo (cURL)

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

## Respuestas

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