# updateAgentConfig

Source: <https://telegafirst.com/docs/api-op-updateagentconfig>
Locale: ru
releaseGitSha: ea133cd4ad87fe549ef000b139be145be9bd1717
sourceContentDigest: b51cb907616d94587c8b7326f3ff55524db0a50d7620f363caf4944dc55943ae
Version: 2

# updateAgentConfig

`PATCH /api/v1/tools/agents`

Update the tenant AI agent configuration

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["agents:write"] |

## Параметры запроса

| Поле | Значение |
| - | - |
| 0.description | "Replay the same tenant, credential, route and request for 24 hours." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | false |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [AgentConfigUpdateRequest](https://telegafirst.com/docs/schema-78ed56ae1dbaef2a80241a7c15baee162c5392979ca00f8d3a1e0ba0886e9efd) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 200.content.application/json.schema | [AgentConfig](https://telegafirst.com/docs/schema-76201fa2b5919f691be21c74cb5142efaa732ada14b9b1c04198ae391263d14b) |
| 200.description | "Merged Manager/Qualifier and Coach configuration. No internal row IDs." |
| 200.headers.X-Bot-Username.schema | [200.headers.X-Bot-Username.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-Client-Slug.schema | [200.headers.X-Client-Slug.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Limit.schema | [200.headers.X-RateLimit-Limit.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Remaining.schema | [200.headers.X-RateLimit-Remaining.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |
| 200.headers.X-RateLimit-Reset.schema | [200.headers.X-RateLimit-Reset.schema](https://telegafirst.com/docs/schema-00404e686415370f1711c4d7acfa2905444d3cf23cef2e10c47d445ebe690f96) |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 400.description | "Strict request validation failed." |
| 400.x-error-codes | \["VALIDATION\_ERROR"] |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 401.description | "Missing, invalid, revoked or expired API credential. Surface-session JWTs are not accepted." |
| 401.x-error-codes | \["INVALID\_API\_KEY"] |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 403.description | "Missing effective scope, forbidden publishable key, inaccessible tenant or no active bot." |
| 403.x-error-codes | \["INSUFFICIENT\_SCOPE","PUBLISHABLE\_KEY\_NOT\_ALLOWED","FORBIDDEN","NO\_ACTIVE\_BOT"] |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 409.description | "A request with this key is still processing." |
| 409.x-error-codes | \["CONFLICT"] |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 413.description | "Per-tool payload size or item-count limit exceeded before validation." |
| 413.x-error-codes | \["PAYLOAD\_TOO\_LARGE","ITEM\_COUNT\_EXCEEDED"] |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 422.description | "Idempotency-Key reused with different inputs." |
| 422.x-error-codes | \["IDEMPOTENCY\_KEY\_MISMATCH"] |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 429.description | "Per-tool rate limit exceeded or unavailable; fail closed." |
| 429.headers.Retry-After.required | false |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-f0765dbf409c74f001806c446f2cf171d8c46b5b15779d54423dde921a4b0670) |
| 429.x-error-codes | \["RATE\_LIMIT\_EXCEEDED","RATE\_LIMIT\_UNAVAILABLE"] |
| 500.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-c4113f3de00d728702a8663612e2074cbe3e8b3bb70d2b0dee6f3503fe89bd41) |
| 500.description | "Unexpected internal failure." |
| 500.x-error-codes | \["INTERNAL\_ERROR"] |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "Tenant singleton configuration. This controls persona and prompts; it never authorizes internal Qualifier, Manager or Coach agents to mutate orders or money. Those agents advise and hand off; scoped tenant-agent money commands belong to the separate Hub money operations. No pagination, ETag or If-Match. Nested fields are optional; nullable prompt strings clear values. Empty patches are accepted. Idempotency-Key is optional; an empty header is treated as absent and executes without a receipt. Manager changes invalidate its shared config cache." |
| operationId | "updateAgentConfig" |
| summary | "Update the tenant AI agent configuration" |
| tags | \["agents"] |
| x-idempotency.mismatchStatus | 422 |
| x-idempotency.required | false |
| x-idempotency.ttlSeconds | 86400 |
| x-pagination.kind | "none" |
