v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Create Credential

post/v1/vaults/{vault_id}/credentials?beta=true

Path parameters

vault_idstring required

Path parameter vault_id

Headers

anthropic-versionstring
anthropic-betastring

Request body

display_namestring nullable

Human-readable name for the credential. Up to 255 characters.

metadataobject

Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

Example request

{
  "auth": {
    "type": "static_bearer",
    "token": "bearer_exampletoken",
    "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse"
  },
  "display_name": "Example credential",
  "metadata": {
    "environment": "production"
  }
}

Response

Successful response (OK)

type'vault_credential' required
idstring required

Unique identifier for the credential.

vault_idstring required

Identifier of the vault this credential belongs to.

display_namestring nullable

Human-readable name for the credential.

metadataobject required

Arbitrary key-value metadata attached to the credential.

created_atstring date-time required

A timestamp in RFC 3339 format

updated_atstring date-time required

A timestamp in RFC 3339 format

archived_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "type": "vault_credential",
  "id": "vcrd_011CZkZEMt8gZan2iYOQfSkw",
  "vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",
  "display_name": "Example credential",
  "metadata": {
    "environment": "production"
  },
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z",
  "archived_at": null,
  "auth": {
    "type": "static_bearer",
    "mcp_server_url": "https://example-server.modelcontextprotocol.io/sse"
  }
}