Skip to main content
PATCH
Update a Vault credential

Headers

kimi-api-version
enum<string>

API version for this request, in YYYY-MM-DD form. Send 2026-09-01-beta for the version documented here. Required outside /v1/files*: a missing header there is rejected with 400 invalid_request_error; on /v1/files* its absence selects the compatibility behavior. An unknown value is rejected with 400 invalid_request_error on every endpoint. API versions served by the platform. New dated versions are added as they ship; a version is removed after its announced Sunset date.

Available options:
2026-09-01-beta

Path Parameters

id
string
required

Vault ID.

credential_id
string
required

Vault credential ID.

Body

application/json

Credential fields to update: its display name, authentication settings, or both.

Values to change when renaming or rotating a credential. Fields merge by field: a provided value replaces the stored one, while an Omitted, null, and empty values keep the stored value. Updates cannot clear a secret by setting it to an empty value. For environment_variable credentials, networking is replaced as a whole and injection_location is merged by field. For mcp_oauth credentials, refresh is merged by field, with one exception: mcp_oauth.egress_environment_id clears the binding when sent as an empty string. The credential type and its identifying fields (secret_name, mcp_server_url, token_endpoint, client_id) cannot be changed.

display_name
string

New human-readable credential name.

Required string length: 1 - 256
Example:

"Updated MCP access"

auth
MCP OAuth credential · object

OAuth 2.0 credentials for an MCP server, with optional token refresh.

Example:

Response

The credential after the update, with secret values omitted.

A credential stored in a Vault. Active credentials in the same Vault must have distinct keys. The key is the normalized mcp_server_url for mcp_oauth and static_bearer, or secret_name for environment_variable.

id
string
required

Vault credential ID.

Example:

"vcrd_01h455vb4pex5vsknk084sn02q"

vault_id
string
required

ID of the Vault that contains this credential.

Example:

"vlt_01h455vb4pex5vsknk084sn02q"

display_name
string
required

Human-readable credential name.

Example:

"MCP access"

auth
MCP OAuth credential · object
required

OAuth 2.0 credentials for an MCP server, with optional token refresh.

Example:
created_at
string<date-time>
required

Time when the credential was created.

Example:

"2026-01-01T00:00:00Z"

updated_at
string<date-time>
required

Time when the credential was last updated.

Example:

"2026-01-01T00:00:00Z"

archived_at
string<date-time>

Time when the credential was archived. This field is omitted for active credentials.

Example:

"2026-01-03T00:00:00Z"