更新凭证
POST/v1/vaults/{vault_id}/credentials/{credential_id}
更新凭证
Parameters
Returns
更新凭证
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});
const betaManagedAgentsCredential = await client.beta.vaults.credentials.update(
"vcrd_011CZkZEMt8gZan2iYPQfSkw",
{ vault_id: "vlt_011CZkZDLs7fYzm1hXNPeRjv" }
);
console.log(betaManagedAgentsCredential.id);Response 200
{
"id": "vcrd_011CZkZEMt8gZan2iYPQfSkw",
"archived_at": null,
"auth": {
"mcp_server_url": "https://example-server.modelcontextprotocol.io/sse",
"type": "static_bearer"
},
"created_at": "2026-03-15T10:00:00Z",
"metadata": {
"environment": "production"
},
"type": "vault_credential",
"updated_at": "2026-03-15T10:00:00Z",
"vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",
"display_name": "Example credential"
}Returns Examples
Response 200
{
"id": "vcrd_011CZkZEMt8gZan2iYPQfSkw",
"archived_at": null,
"auth": {
"mcp_server_url": "https://example-server.modelcontextprotocol.io/sse",
"type": "static_bearer"
},
"created_at": "2026-03-15T10:00:00Z",
"metadata": {
"environment": "production"
},
"type": "vault_credential",
"updated_at": "2026-03-15T10:00:00Z",
"vault_id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",
"display_name": "Example credential"
}