Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Agent builder/Api-reference
Reference · Agent builder

Api-reference

Part of Agent builder. Install the skill and your agent reads this page when it needs the depth.

Anthropic Managed Agents API Reference

Base URL: https://api.anthropic.com

Required Headers

For Managed Agents endpoints (agents, environments, vaults, sessions, events):

x-api-key: $ANTHROPIC_API_KEY
anthropic-version: 2023-06-01
anthropic-beta: managed-agents-2026-04-01
content-type: application/json

For Custom Skills endpoints (uploading/managing custom skills):

x-api-key: $ANTHROPIC_API_KEY
anthropic-version: 2023-06-01
anthropic-beta: skills-2025-10-02
content-type: multipart/form-data    (only on upload endpoints)

Endpoints

Agents

Operation Method Path
Create POST /v1/agents
Get GET /v1/agents/{agent_id}
List GET /v1/agents
Update POST /v1/agents/{agent_id} (include version for optimistic locking)
List versions GET /v1/agents/{agent_id}/versions
Archive POST /v1/agents/{agent_id}/archive

Returned fields on agent objects: id, type, name, description, model, system, tools, mcp_servers, skills, metadata, version, created_at, updated_at, archived_at.

Update semantics:

Environments

Operation Method Path
Create POST /v1/environments
Get GET /v1/environments/{environment_id}
List GET /v1/environments

Vaults

Operation Method Path
Create POST /v1/vaults
Get GET /v1/vaults/{vault_id}
List GET /v1/vaults
Add credential POST /v1/vaults/{vault_id}/credentials
Delete credential DELETE /v1/vaults/{vault_id}/credentials/{credential_id}

Sessions

Operation Method Path
Create POST /v1/sessions
Get GET /v1/sessions/{session_id}
List GET /v1/sessions
Send event POST /v1/sessions/{session_id}/events
Stream events GET /v1/sessions/{session_id}/events (SSE)

Custom Skills

Operation Method Path
Upload (new skill) POST /v1/skills
List GET /v1/skills (filter with ?source=custom)
Get GET /v1/skills/{skill_id}
Create new version POST /v1/skills/{skill_id}/versions
Delete version DELETE /v1/skills/{skill_id}/versions/{version}
Delete skill DELETE /v1/skills/{skill_id} (must delete all versions first)

Standard Error Shape

{ "type": "error", "error": { "type": "...", "message": "..." } }

Common types:

Session Event Types

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.