Claude Platform Docs

Credentials

Create a Credential
BetaManagedAgentsCredential Beta.Vaults.Credentials.Create(parameters, cancellationToken = default)
POST/v1/vaults/{vault_id}/credentials
List Credentials
CredentialListPage Beta.Vaults.Credentials.List(parameters, cancellationToken = default)
GET/v1/vaults/{vault_id}/credentials
Retrieve a Credential
BetaManagedAgentsCredential Beta.Vaults.Credentials.Retrieve(parameters, cancellationToken = default)
GET/v1/vaults/{vault_id}/credentials/{credential_id}
Update a Credential
BetaManagedAgentsCredential Beta.Vaults.Credentials.Update(parameters, cancellationToken = default)
POST/v1/vaults/{vault_id}/credentials/{credential_id}
Delete a Credential
BetaManagedAgentsDeletedCredential Beta.Vaults.Credentials.Delete(parameters, cancellationToken = default)
DELETE/v1/vaults/{vault_id}/credentials/{credential_id}
Archive a Credential
BetaManagedAgentsCredential Beta.Vaults.Credentials.Archive(parameters, cancellationToken = default)
POST/v1/vaults/{vault_id}/credentials/{credential_id}/archive
Validate an MCP OAuth Credential
BetaManagedAgentsCredentialValidation Beta.Vaults.Credentials.McpOAuthValidate(parameters, cancellationToken = default)
POST/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate
Models
class BetaManagedAgentsCredential { Type = "vault_credential"; ID; ArchivedAt; /* 6 more */ }

A credential stored in a vault. Sensitive fields are never returned in responses.

class BetaManagedAgentsCredentialNetworkingParams: union
class BetaManagedAgentsUnrestrictedCredentialNetworkingParams { Type = "unrestricted"; }

Substitute the secret on any host the session's Environment network policy permits egress to. The Environment's network policy is the only boundary on where the secret can reach.

JsonElement Type = "unrestricted"
class BetaManagedAgentsLimitedCredentialNetworkingParams { Type = "limited"; AllowedHosts; }

Substitute the secret only on requests to the listed hosts.

JsonElement Type = "limited"
required IReadOnlyList<string> AllowedHosts

The destination hosts of the outbound requests that the credential's secret is substituted into.

Each entry is a bare hostname (api.example.com), an IPv4 address (192.0.2.1), or a *. wildcard (*.example.com). URLs, ports, paths, and IPv6 addresses aren't accepted. The list can have up to 16 entries.

class BetaManagedAgentsCredentialValidation { Type = "vault_credential_validation"; CredentialID; HasRefreshToken; /* 5 more */ }

Result of live-probing a credential against its configured MCP server.

enum BetaManagedAgentsCredentialValidationStatus

Overall verdict of a credential validation probe.

Valid("valid")

The credential successfully authenticated against its MCP server.

Invalid("invalid")

The probe reached the MCP server and the server rejected the credential, or no access token is stored. A refresh, if one was tried, didn't recover it. Usually the end user needs to authorize again.

Unknown("unknown")

The probe couldn't tell whether the credential works, for example because of a network error or because a refresh succeeded but the new access token wasn't tested. Validate the credential again to find out.

class BetaManagedAgentsDeletedCredential { Type = "vault_credential_deleted"; ID; }

Confirmation of a deleted credential.

JsonElement Type = "vault_credential_deleted"
required string ID

The unique ID of the deleted credential (vcrd_...).

class BetaManagedAgentsEnvironmentVariableAuthResponse { Type = "environment_variable"; InjectionLocation; Networking; SecretName; }

Environment variable credential details. The secret value is never returned.

class BetaManagedAgentsEnvironmentVariableCreateParams { Type = "environment_variable"; Networking; SecretName; /* 2 more */ }

Parameters for creating an environment variable credential.

class BetaManagedAgentsEnvironmentVariableUpdateParams { Type = "environment_variable"; InjectionLocation; Networking; SecretValue; }

Parameters for updating an environment variable credential. secret_name is immutable.

class BetaManagedAgentsInjectionLocationParams { Body; Header; }

Where in the outbound request the secret value may be substituted.

bool Body

Substitute when the placeholder appears in the request body.

bool Header

Substitute when the placeholder appears in a request header value.

class BetaManagedAgentsInjectionLocationResponse { Body; Header; }

Where in the outbound request the secret value is substituted.

required bool Body

Whether the placeholder is substituted in the request body.

required bool Header

Whether the placeholder is substituted in request header values.

class BetaManagedAgentsInjectionLocationUpdateParams { Body; Header; }

Changes which parts of an outbound request the secret is substituted into. A location you leave out keeps its current setting.

After the change, at least one location must be enabled.

See Authenticate with vaults to learn more about injection locations.

bool Body

Substitute when the placeholder appears in the request body.

bool Header

Substitute when the placeholder appears in a request header value.

class BetaManagedAgentsLimitedCredentialNetworkingParams { Type = "limited"; AllowedHosts; }

Substitute the secret only on requests to the listed hosts.

JsonElement Type = "limited"
required IReadOnlyList<string> AllowedHosts

The destination hosts of the outbound requests that the credential's secret is substituted into.

Each entry is a bare hostname (api.example.com), an IPv4 address (192.0.2.1), or a *. wildcard (*.example.com). URLs, ports, paths, and IPv6 addresses aren't accepted. The list can have up to 16 entries.

class BetaManagedAgentsLimitedCredentialNetworkingResponse { Type = "limited"; AllowedHosts; }

The secret is substituted only on requests to the listed hosts.

JsonElement Type = "limited"
required IReadOnlyList<string> AllowedHosts

The destination hosts of the outbound requests that the credential's secret is substituted into.

An entry matches the request host exactly. An entry such as *.example.com matches any subdomain of example.com but not example.com itself.

class BetaManagedAgentsMcpOAuthAuthResponse { Type = "mcp_oauth"; McpServerUrl; ExpiresAt; Refresh; }

OAuth credential details for an MCP server.

JsonElement Type = "mcp_oauth"
required string McpServerUrl

URL of the MCP server this credential authenticates against.

DateTimeOffset? ExpiresAt

When the credential's access token expires, in RFC 3339. Absent if the expiry isn't known.

formatdate-time

Refresh token configuration, if the credential supports token refresh.

class BetaManagedAgentsMcpOAuthCreateParams { Type = "mcp_oauth"; AccessToken; McpServerUrl; /* 2 more */ }

Parameters for creating an MCP OAuth credential.

JsonElement Type = "mcp_oauth"
required string AccessToken

The OAuth access token to send to the MCP server.

minLength1
maxLength8192
required string McpServerUrl

URL of the MCP server this credential authenticates against.

minLength1
maxLength2047
DateTimeOffset? ExpiresAt

When access_token expires, in RFC 3339.

Must be in the future.

formatdate-time

Refresh token configuration, if the credential supports token refresh.

class BetaManagedAgentsMcpOAuthRefreshParams { ClientID; RefreshToken; TokenEndpoint; /* 3 more */ }

OAuth refresh token parameters for creating a credential with refresh support.

class BetaManagedAgentsMcpOAuthRefreshResponse { ClientID; TokenEndpoint; TokenEndpointAuth; /* 2 more */ }

OAuth refresh token configuration returned in credential responses.

class BetaManagedAgentsMcpOAuthRefreshUpdateParams { RefreshToken; Scope; TokenEndpointAuth; }

Parameters for updating OAuth refresh token configuration.

class BetaManagedAgentsMcpOAuthUpdateParams { Type = "mcp_oauth"; AccessToken; ExpiresAt; Refresh; }

Parameters for updating an MCP OAuth credential. The mcp_server_url is immutable.

class BetaManagedAgentsMcpProbe { HttpResponse; Method; }

The failing step of an MCP validation probe.

required BetaManagedAgentsRefreshHttpResponse? HttpResponse

The HTTP error response from the MCP server, or null if the MCP server didn't return one for the failing step, for example after a timeout or a DNS or TLS failure.

required string Body

Response body. May be truncated and has sensitive values scrubbed.

required bool BodyTruncated

Whether body was truncated.

required string ContentType

Value of the Content-Type response header.

required int StatusCode

HTTP status code.

formatint32
required string Method

The MCP method that failed (for example initialize or tools/list).

class BetaManagedAgentsRefreshHttpResponse { Body; BodyTruncated; ContentType; StatusCode; }

An HTTP response captured during a credential validation probe.

required string Body

Response body. May be truncated and has sensitive values scrubbed.

required bool BodyTruncated

Whether body was truncated.

required string ContentType

Value of the Content-Type response header.

required int StatusCode

HTTP status code.

formatint32
class BetaManagedAgentsRefreshObject { HttpResponse; Status; }

Outcome of a refresh-token exchange attempted during credential validation.

required BetaManagedAgentsRefreshHttpResponse? HttpResponse

The captured HTTP error response from the token endpoint. Populated only when status is failed.

required string Body

Response body. May be truncated and has sensitive values scrubbed.

required bool BodyTruncated

Whether body was truncated.

required string ContentType

Value of the Content-Type response header.

required int StatusCode

HTTP status code.

formatint32
required Status Status

Outcome of the refresh attempt.

One of the following:
Succeeded("succeeded")

The token endpoint returned a new access token.

Failed("failed")

The token endpoint returned an error response. See http_response for detail.

ConnectError("connect_error")

The token endpoint could not be reached (DNS, TLS, or connection error).

NoRefreshToken("no_refresh_token")

No refresh token is stored for the credential, so no exchange was attempted.

class BetaManagedAgentsStaticBearerAuthResponse { Type = "static_bearer"; McpServerUrl; }

Static bearer token credential details for an MCP server.

JsonElement Type = "static_bearer"
required string McpServerUrl

URL of the MCP server this credential authenticates against.

class BetaManagedAgentsStaticBearerCreateParams { Type = "static_bearer"; Token; McpServerUrl; }

Parameters for creating a static bearer token credential.

JsonElement Type = "static_bearer"
required string Token

The static bearer token to send to the MCP server, such as an API key or personal access token.

minLength1
maxLength8192
required string McpServerUrl

URL of the MCP server this credential authenticates against.

minLength1
maxLength2047
class BetaManagedAgentsStaticBearerUpdateParams { Type = "static_bearer"; Token; }

Parameters for updating a static bearer token credential. The mcp_server_url is immutable.

JsonElement Type = "static_bearer"
string? Token

The new static bearer token to replace the stored one.

minLength1
maxLength8192
class BetaManagedAgentsTokenEndpointAuthBasicParam { Type = "client_secret_basic"; ClientSecret; }

Token endpoint uses HTTP Basic authentication with client credentials.

JsonElement Type = "client_secret_basic"
required string ClientSecret

The OAuth client secret, sent to token_endpoint with HTTP Basic authentication.

minLength1
maxLength512
class BetaManagedAgentsTokenEndpointAuthBasicResponse { Type = "client_secret_basic"; }

Token endpoint uses HTTP Basic authentication with client credentials.

JsonElement Type = "client_secret_basic"
class BetaManagedAgentsTokenEndpointAuthBasicUpdateParam { Type = "client_secret_basic"; ClientSecret; }

Updated HTTP Basic authentication parameters for the token endpoint.

JsonElement Type = "client_secret_basic"
string? ClientSecret

A new OAuth client secret to replace the stored one.

The credential must already use client_secret_basic or client_secret_post. It keeps its current token_endpoint_auth type, even if the type sent with this secret is the other one.

minLength1
maxLength512
class BetaManagedAgentsTokenEndpointAuthNoneParam { Type = "none"; }

Token endpoint requires no client authentication.

JsonElement Type = "none"
class BetaManagedAgentsTokenEndpointAuthNoneResponse { Type = "none"; }

Token endpoint requires no client authentication.

JsonElement Type = "none"
class BetaManagedAgentsTokenEndpointAuthPostParam { Type = "client_secret_post"; ClientSecret; }

Token endpoint uses POST body authentication with client credentials.

JsonElement Type = "client_secret_post"
required string ClientSecret

The OAuth client secret, sent to token_endpoint in the POST body.

minLength1
maxLength512
class BetaManagedAgentsTokenEndpointAuthPostResponse { Type = "client_secret_post"; }

Token endpoint uses POST body authentication with client credentials.

JsonElement Type = "client_secret_post"
class BetaManagedAgentsTokenEndpointAuthPostUpdateParam { Type = "client_secret_post"; ClientSecret; }

Updated POST body authentication parameters for the token endpoint.

JsonElement Type = "client_secret_post"
string? ClientSecret

A new OAuth client secret to replace the stored one.

The credential must already use client_secret_basic or client_secret_post. It keeps its current token_endpoint_auth type, even if the type sent with this secret is the other one.

minLength1
maxLength512
class BetaManagedAgentsUnrestrictedCredentialNetworkingParams { Type = "unrestricted"; }

Substitute the secret on any host the session's Environment network policy permits egress to. The Environment's network policy is the only boundary on where the secret can reach.

JsonElement Type = "unrestricted"
class BetaManagedAgentsUnrestrictedCredentialNetworkingResponse { Type = "unrestricted"; }

The secret is substituted on any host the session's Environment network policy permits egress to.

JsonElement Type = "unrestricted"