Set an assistant’s instructions
PUT/api/v1/assistants/{id}/instructions
scope
assistants:writeReplaces the whole binding list in one call. Send every instruction you want bound; anything absent is unbound. PUT rather than PATCH because position is only meaningful across the whole set.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string (uuid) | Assistant id |
Body
application/json| Name | Type | Description |
|---|---|---|
instructionsrequired | object[] | The complete binding list |
instructions[].instruction_idrequired | string (uuid) | A library instruction on this account |
instructions[].enabledoptional | boolean | Defaults to true |
instructions[].modeoptional | string (enum) | Defaults to alwaysalwayson_demand |
instructions[].positionoptional | integer | Prompt order, 0 first |
Request
curl -X PUT "https://your-crm.example.com/api/v1/assistants/8f2c1d3e-4a5b-4c6d-9e0f-1a2b3c4d5e6f/instructions" \
-H "Authorization: Bearer $RAABTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instructions": [
{
"instruction_id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"mode": "always",
"position": 0
}
]
}'Response · 200 OK
{
"data": [
{
"instruction_id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"title": "Refund policy",
"enabled": true,
"mode": "always",
"position": 0
}
]
}Response
Wrapped in { data: … }| Name | Type | Description |
|---|---|---|
instruction_idrequired | string (uuid) | The library instruction this binding points at |
titlerequired | string | That instruction title, copied for convenience |
enabledrequired | boolean | Whether this binding is live |
moderequired | string (enum) | always puts it in every prompt; on_demand indexes the title and lets the model fetch the bodyalwayson_demand |
positionrequired | integer | Order within the assistant, 0 first |
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_request | The request could not be parsed: malformed JSON, an invalid cursor, or a query parameter of the wrong shape. |
| 400 | validation_error | The body or query failed validation. `details` lists each failing field with a `path` and a `message`. |
| 401 | unauthorized | No usable API key: the Authorization header is missing or malformed, or the key is unknown, revoked or expired. The three are deliberately indistinguishable. |
| 403 | forbidden | The key is valid but lacks the scope this endpoint requires, or the request came from an address outside the key’s IP allowlist. The message says which. |
| 403 | account_suspended | The account this key belongs to is suspended. Rotating the key will not help; contact support. |
| 404 | not_found | No such resource in this account. A resource that exists in another account also returns this. |
| 422 | unprocessable | The request was well-formed but cannot be carried out. `reason` is a stable string saying why (for example `outside_window` or `stage_not_in_pipeline`). |
| 429 | rate_limited | The per-key budget, or the per-IP budget for failed authentication, is exhausted. Honour `Retry-After` before retrying. |
| 500 | internal | Something failed on our side. Safe to retry with the same Idempotency-Key; quote `request_id` if it persists. |