Repository Public
1---2title: Get Credential3url: https://platform.claude.com/docs/en/api/beta/vaults/credentials/retrieve4---56# Get Credential78**GET** `/v1/vaults/{vault_id}/credentials/{credential_id}`910Get Credential1112## Path parameters1314- `vault_id: string`1516- `credential_id: string`1718## Headers1920- `"anthropic-beta": optional array of AnthropicBeta`2122 Optional header to specify the beta version(s) you want to use.2324 - `string`2526 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2728 - `"message-batches-2024-09-24"`2930 - `"prompt-caching-2024-07-31"`3132 - `"computer-use-2024-10-22"`3334 - `"computer-use-2025-01-24"`3536 - `"pdfs-2024-09-25"`3738 - `"token-counting-2024-11-01"`3940 - `"token-efficient-tools-2025-02-19"`4142 - `"output-128k-2025-02-19"`4344 - `"files-api-2025-04-14"`4546 - `"mcp-client-2025-04-04"`4748 - `"mcp-client-2025-11-20"`4950 - `"dev-full-thinking-2025-05-14"`5152 - `"interleaved-thinking-2025-05-14"`5354 - `"code-execution-2025-05-22"`5556 - `"extended-cache-ttl-2025-04-11"`5758 - `"context-1m-2025-08-07"`5960 - `"context-management-2025-06-27"`6162 - `"model-context-window-exceeded-2025-08-26"`6364 - `"skills-2025-10-02"`6566 - `"fast-mode-2026-02-01"`6768 - `"output-300k-2026-03-24"`6970 - `"user-profiles-2026-03-24"`7172 - `"user-profiles-2026-08-18"`7374 - `"user-profiles-2026-09-04"`7576 - `"advisor-tool-2026-03-01"`7778 - `"managed-agents-2026-04-01"`7980 - `"cache-diagnosis-2026-04-07"`8182 - `"dreaming-2026-04-21"`8384 - `"thinking-token-count-2026-05-13"`8586 - `"server-side-fallback-2026-06-01"`8788 - `"server-side-fallback-2026-07-01"`8990 - `"fallback-credit-2026-06-01"`9192 - `"fallback-credit-2026-07-01"`9394 - `"agent-memory-2026-07-22"`9596 - `"mid-conversation-tool-changes-2026-07-01"`9798 - `"compact-2026-01-12"`99100 - `"computer-use-2025-11-24"`101102 - `"mcp-tunnels-2026-06-22"`103104 - `"structured-outputs-2025-11-13"`105106 - `"task-budgets-2026-03-13"`107108 - `"thinking-display-updates-2026-08-18"`109110 - `"ce-user-management-2026-07-13"`111112 - `"mid-conversation-output-config-2026-07-01"`113114 - `"thinking-binding-controls-2026-08-01"`115116 - `"mid-conversation-system-clear-at-2026-08-21"`117118 - `"compact-2026-09-04"`119120- `"anthropic-workspace-id": optional string`121122## Returns123124- `BetaManagedAgentsCredential object`125126 A credential stored in a vault. Sensitive fields are never returned in responses.127128 - `type: "vault_credential"`129130 - `id: string`131132 Unique identifier for the credential.133134 - `archived_at: string or null`135136 A timestamp in RFC 3339 format137138 format: date-time139140 - `auth: BetaManagedAgentsMCPOAuthAuthResponse or BetaManagedAgentsStaticBearerAuthResponse or BetaManagedAgentsEnvironmentVariableAuthResponse`141142 Authentication details for a credential.143144 - `BetaManagedAgentsMCPOAuthAuthResponse object`145146 OAuth credential details for an MCP server.147148 - `type: "mcp_oauth"`149150 - `mcp_server_url: string`151152 URL of the MCP server this credential authenticates against.153154 - `expires_at: optional string or null`155156 A timestamp in RFC 3339 format157158 format: date-time159160 - `refresh: optional BetaManagedAgentsMCPOAuthRefreshResponse or null`161162 OAuth refresh token configuration returned in credential responses.163164 - `client_id: string`165166 OAuth client ID.167168 - `token_endpoint: string`169170 Token endpoint URL used to refresh the access token.171172 - `token_endpoint_auth: BetaManagedAgentsTokenEndpointAuthNoneResponse or BetaManagedAgentsTokenEndpointAuthBasicResponse or BetaManagedAgentsTokenEndpointAuthPostResponse`173174 - `BetaManagedAgentsTokenEndpointAuthNoneResponse object`175176 Token endpoint requires no client authentication.177178 - `type: "none"`179180 - `BetaManagedAgentsTokenEndpointAuthBasicResponse object`181182 Token endpoint uses HTTP Basic authentication with client credentials.183184 - `type: "client_secret_basic"`185186 - `BetaManagedAgentsTokenEndpointAuthPostResponse object`187188 Token endpoint uses POST body authentication with client credentials.189190 - `type: "client_secret_post"`191192 - `resource: optional string or null`193194 OAuth resource indicator.195196 - `scope: optional string or null`197198 OAuth scope for the refresh request.199200 - `BetaManagedAgentsStaticBearerAuthResponse object`201202 Static bearer token credential details for an MCP server.203204 - `type: "static_bearer"`205206 - `mcp_server_url: string`207208 URL of the MCP server this credential authenticates against.209210 - `BetaManagedAgentsEnvironmentVariableAuthResponse object`211212 Environment variable credential details. The secret value is never returned.213214 - `type: "environment_variable"`215216 - `injection_location: BetaManagedAgentsInjectionLocationResponse`217218 Where in the outbound request the secret value is substituted.219220 - `body: boolean`221222 Whether the placeholder is substituted in the request body.223224 - `header: boolean`225226 Whether the placeholder is substituted in request header values.227228 - `networking: BetaManagedAgentsUnrestrictedCredentialNetworkingResponse or BetaManagedAgentsLimitedCredentialNetworkingResponse`229230 Outbound hosts the secret value is substituted on.231232 - `BetaManagedAgentsUnrestrictedCredentialNetworkingResponse object`233234 The secret is substituted on any host the session's Environment network policy permits egress to.235236 - `type: "unrestricted"`237238 - `BetaManagedAgentsLimitedCredentialNetworkingResponse object`239240 The secret is substituted only on requests to the listed hosts.241242 - `type: "limited"`243244 - `allowed_hosts: array of string`245246 Hostnames on which the secret will be substituted. An entry matches the request host exactly; a `*.`-prefixed entry matches any subdomain of the named domain but not the domain itself.247248 - `secret_name: string`249250 Name of the environment variable.251252 - `created_at: string`253254 A timestamp in RFC 3339 format255256 format: date-time257258 - `metadata: map[string]`259260 Arbitrary key-value metadata attached to the credential.261262 - `updated_at: string`263264 A timestamp in RFC 3339 format265266 format: date-time267268 - `vault_id: string`269270 Identifier of the vault this credential belongs to.271272 - `display_name: optional string or null`273274 Human-readable name for the credential.275276## Example277278```bash279curl https://api.anthropic.com/v1/vaults/$VAULT_ID/credentials/$CREDENTIAL_ID \280 -H 'anthropic-version: 2023-06-01' \281 -H 'anthropic-beta: managed-agents-2026-04-01' \282 -H "X-Api-Key: $ANTHROPIC_API_KEY"283```284285### Response (200)286287```json288{289 "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw",290 "archived_at": null,291 "auth": {292 "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse",293 "type": "static_bearer"294 },295 "created_at": "2026-03-15T10:00:00Z",296 "metadata": {297 "environment": "production"298 },299 "type": "vault_credential",300 "updated_at": "2026-03-15T10:00:00Z",301 "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",302 "display_name": "Example credential"303}304```305