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

# Enable/Disable Agent

> Changes the enablement status of an agent.

## Endpoint

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

## Headers

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

### Path Parameters

You must pass the agent's id via query params

```json theme={null}
{
  "id": "Agent ID (required)"
}
```

### Request body

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

| Name    | Type    | Required | Description                         |
| ------- | ------- | -------- | ----------------------------------- |
| enabled | boolean | Yes      | Whether the agent is enabled or not |

### Example (cURL)

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

## Responses

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