---
title: "Set the organization prompt policy"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the organization prompt policy

Path: CloudRaker Workspace API › Playbooks

`PUT /agent-policy`

Replaces the organization’s prompt policy and bumps its `version`. `prepend` and `append` are each capped at 2000 characters and reach the agent framed as operator policy that adds rules on top of — never in place of — the platform rules, so text asking the agent to drop approval gating changes nothing (the gates are mechanical). Authorization: organization administrators only. Response `{ data: { prepend, append, version } }`.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `prepend` (`putAgentPolicy.prepend`; string, optional)
  - maxLength 2000
- `append` (`putAgentPolicy.append`; string, optional)
  - maxLength 2000

## Example request

```json
{
  "prepend": "string",
  "append": "string"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url https://api.cloudraker.com/agent-policy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prepend": "string",
  "append": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/agent-policy';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({prepend: 'string', append: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/agent-policy"

payload = {
    "prepend": "string",
    "append": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The updated organization prompt policy.

#### Example

```json
{
  "data": {
    "prepend": "string",
    "append": "string",
    "version": -9007199254740991
  }
}
```

- `data` (`putAgentPolicy.response.200.data`; object, required)
  - `prepend` (`putAgentPolicy.response.200.data.prepend`; string, required)
    - maxLength 2000
  - `append` (`putAgentPolicy.response.200.data.append`; string, required)
    - maxLength 2000
  - `version` (`putAgentPolicy.response.200.data.version`; integer, required)
    - min -9007199254740991; max 9007199254740991


Source: https://docs.cloudraker.com/workspace/api/playbooks/put-agent-policy/index.md
