Skip to main content
POST
Register a credential reference in a vault

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Path Parameters

vault_id
string<uuid>
required

Vault id (UUID) as returned by createVault or listVaults.

Body

application/json

Request body for adding one credential to a vault. Its shape depends on credential_type. bearer_token and env_var accept exactly one of secret_value or secret_ref; webhook_secret requires secret_value; integration accepts neither. Secret material is encrypted at rest and never returned.

credential_type
enum<string>
required

bearer_token authenticates to an MCP server and requires mcp_server_url. env_var is exposed to the sandbox for CLIs and SDKs. webhook_secret never reaches the sandbox and is used only to verify inbound webhook signatures. integration references a connected provider account and carries no secret of its own.

Available options:
bearer_token,
env_var,
webhook_secret,
integration
allowed_hosts
string[]

Hosts the credential may be sent to under limited networking. Supports wildcards such as *.example.com.

display_name
string

Operator-facing label.

injection_locations
enum<string>[]

Where a bearer or MCP credential attaches to a request. Defaults to headers, which is recommended unless the service reads the secret from the request body. Ignored for env_var, which is injected into the sandbox environment instead, and for integration.

One place a credential is applied to an outbound request. Headers alone is recommended; a secret in a request body is far easier to log by accident.

Available options:
headers,
body
integration_connection_id
string

The connected account this grant uses. Required for the integration kind.

integration_permission
string

Provider permission preset applied when minting. See the provider's list; defaults to the least-privileged one.

integration_resources
string[]

Resources within the connection this grant may reach, e.g. GitHub repository names. Empty means every resource the connection reaches, which is broader than most grants should be.

labelbox_scope
object

Labelbox product-state authorization ceiling: either exact projects or organization-wide access, optionally restricted to one exact Slack audience with an explicit internal or Slack Connect classification. Required when credential_type is bearer_token and mcp_server_url is that service; rejected for any other server.

Example:
mcp_server_url
string

The MCP server this credential unlocks. Must be http or https and must not embed credentials. Required for the MCP kinds and immutable afterwards, so it is validated here rather than at the first connection.

metadata
object

Free-form caller-owned JSON stored with the credential row and returned on reads. Not interpreted by the service; never put secret material here, since unlike secret_value it is returned verbatim. The key labelbox_scope is reserved for the typed field.

network_mode
enum<string>

Where the credential may be sent. Defaults to limited, which restricts it to allowed_hosts.

Available options:
limited,
unrestricted
secret_name
string

Environment variable or header name the secret binds to inside the sandbox. Required for env_var.

secret_ref
string

Reference to material stored outside this service, carrying a provider prefix. Not supported for webhook_secret, which this service verifies itself. Requests carrying obvious inline secret material are rejected.

secret_value
string

The credential material itself. Encrypted at rest and never returned or logged by this service. Supply this or secret_ref, not both.

Response

One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session.

One credential in a vault, described without its secret value — no field on this shape can carry secret material, which is what makes it safe to list over the API. Returned when managing a vault's contents; the value itself is opened only inside a running session.

created_at
string<date-time>
required

RFC 3339 timestamp of when this record was created. Server-assigned.

credential_id
string
required

Identifier for this credential (UUID). Server-assigned, and unique only within its vault.

credential_type
string
required

How the credential is used: bearer_token, env_var, or webhook_secret. Legacy rows may report mcp_oauth or integration, so this remains a string rather than a closed response enum.

organization_id
string
required

Organization that owns this record. Resolved from the API key; never accepted from the caller.

updated_at
string<date-time>
required

RFC 3339 timestamp of the last change to this record. Server-assigned.

vault_id
string
required

Vault this credential belongs to (UUID).

allowed_hosts
string[]

Hosts the credential may be sent to when network_mode is limited. Ignored under unrestricted.

display_name
string

Operator-facing label for the credential. Optional: a credential is identifiable by its secret_name or MCP server without one.

injection_locations
string[]

Where the credential is attached to an outbound request: headers, body, or both. Headers alone is recommended; a secret in a request body is far easier to log by accident. Meaningful only for the MCP OAuth and bearer-token kinds: env_var is injected into the sandbox environment, and integration mints its own token per session.

integration_connection_id
string

Organization integration connection this credential grants a session (UUID). Set only for the integration kind, where it replaces sealed material: the provider mints a short-lived token per session.

integration_permission
string

Permission preset applied when a token is minted for this grant; see the provider's scope table. An unknown value is rejected on write rather than at mint time.

integration_resources
string[]

Resources within the connection the grant is narrowed to — repositories, for GitHub. Empty means every resource the connection itself can reach, which is broader than most grants should be.

labelbox_scope
object

Labelbox product-state authorization ceiling: either exact projects or organization-wide access, optionally restricted to one exact Slack audience with an explicit internal or Slack Connect classification. Required for a bearer_token credential whose mcp_server_url is that service; rejected for any other server. Replaced as a whole on update and kept when omitted.

Example:
mcp_server_url
string

MCP server this credential may be sent to. Required for bearer_token and immutable afterwards, so a stored secret cannot be repointed at a different service.

metadata
object

Free-form caller-supplied key/value labels. Stored verbatim and never interpreted by the service. The key labelbox_scope is reserved for the typed field of that name.

network_mode
enum<string>

How far the credential may travel: limited confines it to allowed_hosts, unrestricted permits any host. limited is the safe default.

Available options:
limited,
unrestricted
platform_mcp_service
enum<string>

Deployment-derived identity of the exact platform MCP service this credential targets. Present as slack_tools only when mcp_server_url matches the configured Slack tools endpoint; never caller-controlled or stored.

Available options:
slack_tools
secret_name
string

Environment variable or header name the secret binds to inside the sandbox. Required for the env_var kind.

secret_ref
string

Pointer to material stored in an external secret manager, carrying a provider prefix such as kms: or vault:. Opaque to this service, and empty on the normal path where the value is sealed into the credential itself.