Skip to main content
Vaults

Vault Schemas

Vault object

Returned by create, get, list, and archive endpoints.
FieldTypeDescription
idstringVault ID with the vault_ prefix
typestringAlways "vault"
display_namestringVault display name, at most 255 characters
metadataobjectMetadata object
credentialsarray of Vault credentialReturned only when creating a Vault and always empty; manage credentials through the separate credential endpoints
archived_atstring | nullArchive time, or null when active
created_atstringCreation time
updated_atstringLast update time

Vault credential

Returned by the create credential, list credentials, and archive credential endpoints.
FieldTypeDescription
idstringCredential ID with the vcred_ prefix
typestringAlways "vault_credential"
vault_idstringOwning Vault ID
authCredential auth objectSanitized auth details; secrets are never returned
display_namenullCurrently always null
metadataobjectCustom metadata object stored with the credential; defaults to {}
archived_atstring | nullArchive time, or null when active
created_atstringCreation time
updated_atstringLast update time
Credential secrets, including token, access_token, refresh_token, and client_secret, are accepted on create requests but are never returned.

Create credential request

FieldTypeRequiredDescription
authobjectYesCredential authentication details
display_namestringNoAccepted for compatibility; currently returned as null and not persisted
metadataobjectNoCustom metadata stored with the credential; defaults to {}

Credential auth object

static_bearer

FieldTypeRequiredDescription
typestringYesstatic_bearer
mcp_server_urlstringYesMCP server URL, at most 2048 characters
tokenstringYesBearer token stored securely in the Vault; never returned
Response auth omits token.

mcp_oauth

Use this object with Create a credential when you already have OAuth tokens. To obtain tokens through a browser authorization flow instead, use Start MCP OAuth; CAS creates this Credential after the callback succeeds.
FieldTypeRequiredDescription
typestringYesmcp_oauth
mcp_server_urlstringYesMCP server URL, at most 2048 characters
access_tokenstringYesOAuth access token; never returned
expires_atstringNoAccess token expiration time in RFC 3339 format
refreshMCP OAuth refresh objectNoRefresh configuration. Returned without refresh_token or client_secret
Response auth omits access_token. When refresh is present, it also omits refresh_token and token_endpoint_auth.client_secret.

environment_variable

FieldTypeRequiredDescription
typestringYesenvironment_variable
secret_namestringYesEnvironment variable name. Must match [A-Za-z_][A-Za-z0-9_]*
secret_valuestringYesSecret value; never returned

MCP OAuth refresh object

FieldTypeRequiredDescription
client_idstringYesOAuth client ID
refresh_tokenstringYesOAuth refresh token; never returned
token_endpointstringYesOAuth token endpoint URL
token_endpoint_authobjectYesAuthentication used at the token endpoint; see below
resourcestringNoOAuth protected-resource identifier sent during refresh
scopestringNoSpace-separated OAuth scopes sent during refresh

Token endpoint auth object

FieldTypeRequiredDescription
typestringYesnone, client_secret_basic, or client_secret_post
client_secretstringFor client_secret_basic or client_secret_postOAuth client secret; never returned
CAS refreshes a near-expiry mcp_oauth credential before MCP discovery or execution. If the provider rotates the refresh token, CAS stores the replacement atomically.

Start OAuth request

Used by POST /api/v1/cloud/oauth/start. See Start MCP OAuth for the complete flow.
FieldTypeRequiredDescription
vault_idstringYesVault that will own the resulting Credential
mcp_server_urlstringYesMCP URL used for discovery and credential matching
client_idstringNoPre-registered OAuth client ID
client_secretstringNoSecret for the supplied client ID

Start OAuth response

FieldTypeDescription
authorization_urlstringProvider authorization URL to open in a browser
statestringOpaque, short-lived OAuth state
callback_originstringExpected origin of the browser callback message