Skip to navigation

Update Credential

Update the fields you send. Send api_key to rotate the key. The vendor can’t change: delete the credential and create a new one to switch vendors.

Authentication

AuthorizationBearer

A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.

Path parameters

credential_idstringRequiredformat: "uuid"

The credential’s id.

Request

This endpoint expects an object.
api_basestring or nullOptional

A custom base URL for the vendor’s API, such as your own proxy. null or "" keeps the current value: once set, it can’t be cleared. Delete and create the credential to remove it.

api_keystring or nullOptionalformat: "password">=1 character
Replaces the vendor API key. Never returned.
configobject or nullOptional

Only the config fields sent change; none can be cleared.

fallback_to_managedboolean or nullOptional

When a request with this key fails, retry it once on Merge-managed access for the same vendor, if the organization has it.

namestring or nullOptional<=255 characters

A name for the credential, shown in the dashboard. null or "" keeps the current value: once set, it can’t be cleared. Delete and create the credential to remove it.

Response

The updated credential
api_basestring or null
A custom base URL for the vendor's API, such as your own proxy.
configobject

The non-secret vendor settings. Settings that aren’t set are null.

created_atdatetime or nullRead-only
When the credential was created.
credential_hintstring or nullRead-only

The last 4 characters of the stored API key, like a1b2, to tell keys apart. null when the credential has no API key, or the key is under 12 characters (4 would give away too much of it).

fallback_to_managedboolean

When a request with this key fails, retry it once on Merge-managed access for the same vendor, if the organization has it.

idstringRead-onlyformat: "uuid"
The credential's id.
namestring or null
A name for the credential, shown in the dashboard.
updated_atdatetime or nullRead-only
When the credential last changed.
vendorstring

The vendor’s slug, like openai. Can’t change after creation: delete the credential and create a new one to switch vendors. An organization has at most one credential per vendor.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
503
Service Unavailable Error