aiAgentsUpdate
AiFolderWrapper aiAgentsUpdate(id, AiAgentsUpdateRequest)
PUT /api/2.0/ai/agents/{id}
Update an agent
Changes an AI agent room - its title, tags or standing instruction - and optionally rebinds its model. The ID has to be the room's integer identifier. profileId is not part of the room contract: it is taken out of the forwarded body and applied afterwards as the agent's assignment, and it has to be a UUID naming an existing chat-capable profile. An instruction sent as chatSettings.prompt has its markup stripped, as on create; note that when chatSettings is present the upstream service still requires the rest of that object to be valid, so send it whole.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | String | The agent identifier. | [required] [example: 1234] |
| AiAgentsUpdateRequest | body | AiAgentsUpdateRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The updated agent room. | AiFolderWrapper | - |
| 400 | The agent ID is not a positive integer, or profileId is not a UUID, names no existing profile, or names one that does not support chat. | AiErrorResponse | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API. | AiErrorResponse | - |
| 413 | The request body is larger than 100 KB, the JSON parser's limit on this route. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json