Renames a provider, changes its endpoint and/or rotates its credential in place.
PATCH
/v1/m/sessions/providers/{ref}
const url = 'https://example.com/v1/m/sessions/providers/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api_key":"example","base_url":"example","default_model":"example","display_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/m/sessions/providers/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "api_key": "example", "base_url": "example", "default_model": "example", "display_name": "example" }'Renames a provider, changes its endpoint and/or rotates its credential in place.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” ref
required
string
Path parameter ref.
Header Parameters
Section titled “ Header Parameters ” X-Olivares-Tenant
string format: uuid
Target tenant id; required when the principal can act in more than one tenant.
Request Body required
Section titled “ Request Body required ” Media type application/json
object
api_key
Any of:
Rotates the credential in place: it reseals under the SAME reference, so every profile bound to this provider keeps working and the NEXT launch uses the new value — a session already running keeps the one it started with. The previous connection test is cleared, because a verdict measured on a credential that no longer exists is not evidence about the one replacing it.
string
null
base_url
default_model
Example generated
{ "api_key": "example", "base_url": "example", "default_model": "example", "display_name": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}Bad request
Media type application/json
object
Example generated
{}Unauthenticated
Media type application/json
object
Example generated
{}Forbidden
Media type application/json
object
Example generated
{}Not found
Media type application/json
object
Example generated
{}Conflict / setup required
Media type application/json
object
Example generated
{}Rate limited
Media type application/json
object
Example generated
{}