aiProfilesUpdate
AiProfileMutationResult aiProfilesUpdate(AiProfile)
PUT /api/2.0/ai/profiles/update
Update a provider profile
Replaces a stored AI provider profile and returns it, re-checking name uniqueness and probing the credentials against the live provider again. The same two inputs are refused as on create - a private-network baseUrl and providerType: external - and the whole profile is overwritten by the one supplied rather than merged. On a portal running the AI gateway this answers 403, because profiles are managed centrally there. A profile that is bound to an action or an agent keeps those bindings.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiProfile | body | AiProfile | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Whether the profile was updated, with the stored profile in profile. | AiProfileMutationResult | - |
| 400 | The provider URL is missing, malformed, or points at a private network address. | AiErrorResponse | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI profiles are read-only on this portal because they are managed by the AI gateway. | 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