Most read endpoints accept a session or CLI token with workspace membership. Write endpoints have endpoint-specific auth: import/generate require
MANAGER+, DELETE /skills/{skillId} requires OWNER/ADMIN, and some template actions (crew-template deploy, AI crew wizard) are workspace-member scoped — see each endpoint for its exact role gate.Endpoints
Endpoint contract
Every endpoint identifies Auth, Request, Response, and Status. Read routes require a session or CLI token and workspace membership. Import, generation, bulk import, proposed-skill review, and template writes use the role gate shown beside the endpoint; crew-template deployment and the AI wizard require membership only. Requests are JSON; successful reads return200,
creates 201, and template deletion 204. Unless narrowed by an endpoint,
failures are 401, 403, 400, 404, 409, 422 for importer rejection,
502 for upstream fetch/AI/git failures, or 503 for an unavailable configured
backend. These contracts are verified against internal/api/router_crews.go,
internal/api/skills*.go, and internal/api/crew_*.go.
Auth: The endpoint’s role gate is part of the contract; no write endpoint
inherits the read permission implicitly.
Request: JSON fields marked required below must be present; import sources
are mutually exclusive and filenames are treated as basenames.
Response: Successful reads return arrays/objects as shown; create operations
return the created resource and status 201.
Status: 400 covers malformed or invalid input, 403 role denial, 404
missing/foreign resources, 409 duplicates, 422 rejected skill content,
502 upstream failure, and 503 unavailable memory/backend roots.
Skills
Skills are reusable capabilities that can be assigned to agents. They may include system prompt snippets, MCP server configurations, credential requirements, and tool definitions.List Skills
internal/api/skills.go:99)
Response:
200 OK
Skill Fields
Get Skill
200 OK
Additional fields beyond the list response:
Import Skill
OWNER, ADMIN, or MANAGER role
Request Body: Provide exactly one of url or content. (internal/api/skills.go:351)
201 Created — imported skill object.
Generate Skill
source = 'GENERATED'. The user can edit the body via the skills detail page afterwards. (internal/api/skills_generate.go:94)
Auth: OWNER, ADMIN, or MANAGER role (canRole(role, "create")).
This endpoint spends real Anthropic tokens against the workspace’s API key on every call.
ACTIVE credential with provider = ANTHROPIC and type = API_KEY (not AI_CLI_TOKEN). OAuth bearer tokens from claude CLI login won’t work against the Messages API.
Request Body:
201 Created
Bulk Import Skills
SKILL.md files and upserts each through the same v65-aware path used by Import, including SPDX license gating and the content scanner. Per-skill rejections are returned in the skipped array rather than failing the whole batch. (internal/api/skills_bulk_import.go:106)
Auth: OWNER, ADMIN, or MANAGER role (canRole(role, "create"))
Request Body:
local_path is intentionally not part of the HTTP surface (it would turn the endpoint into an arbitrary host-FS read primitive).
200 OK
truncated is true when the walker hit its per-batch cap before reaching the end of the source tree.
Delete Skill
internal/api/skills.go:519).
Auth: OWNER or ADMIN role (canRole(role, "manage"))
Response: 200 OK
Proposed Skills (memory → Skills bridge)
When the memory consolidator runs in proposal mode it stages auto-promoted SKILL.md files under.memory/{crew-slug}/topics/.proposed/skill-*.md. These endpoints are the HITL surface for reviewing those stagings. The handler is stateless against the database — disk is the source of truth, and approve/reject emit EntryMemorySkillApproved / EntryMemorySkillRejected journal entries. (internal/api/skills_proposed_handler.go)
Auth (all three): OWNER, ADMIN, or MANAGER role — same threshold as canonical skill import.
List Proposed Skills
.proposed directory exists for the crew.
Query Parameters:
Response:
200 OK
description_quality set to "parse error: <reason>" so an operator can manually reject it.
Approve Proposed Skill
/skills/proposed/approve (body-based), not a path-parameter /{id}/approve form.
Request Body:
200 OK
Reject Proposed Skill
200 with removed: false on the second call.
Request Body: Same shape as Approve (crew_id, file_name).
Response: 200 OK
Skill Sources
source is a free-form string, not a closed enum. The values the
codebase actually writes:
Skill Categories
The validatedcategory enum (uppercase; parser/internal/skills/parser.go,
must match the SkillCategory enum in prisma/schema.prisma):
CODING, AUTOMATION, DATA, DEVOPS, SUPPORT, SALES, WRITING, RESEARCH, PM, DESIGN, SECURITY, FINANCE, OPS, CUSTOM
A skill whose frontmatter category is missing or unrecognised defaults to CUSTOM.
Skill Runtimes
runtime enum: INSTRUCTIONS (default), SCRIPT, MCP, HYBRID.
Skill Maturity
maturity enum: OFFICIAL, CURATED, COMMUNITY (default), EXPERIMENTAL. The Skills list sorts OFFICIAL → CURATED → COMMUNITY → other, then by name.
Workflow Templates
Workflow templates define reusable task structures for missions. For the five workflow-template endpoints below, Auth is workspace member for reads andOWNER/ADMIN/MANAGER for writes; Request is the JSON
template object for create/update and no body for reads/delete; Response is
the template object or array; Status is 200 for reads/updates, 201 for
create, 204 for delete, plus 400, 403, 404, and 500 for invalid,
forbidden, missing, or failed operations.
List Templates
200 OK — array of template objects.
Create Template
OWNER, ADMIN, or MANAGER role
Response: 201 Created
Get Template
200 OK
Update Template
OWNER, ADMIN, or MANAGER role
Response: 200 OK
Delete Template
OWNER, ADMIN, or MANAGER role
Response: 204 No Content
Crew Templates (Blueprints)
Crew templates are pre-configured crew blueprints that can be deployed to create a fully set up crew with agents, skills, and credentials.List Crew Templates
200 OK — array of crew template objects.
Get Crew Template
200 OK — full template details including agents and configuration.
Deploy Crew Template
- A new crew with the template’s configuration
- All agents defined in the template
- Auto-assignment of credentials and skills
internal/api/crew_templates.go:364).
Request Body:
201 Created — the created crew and agents.
AI Crew Wizard
internal/api/crew_ai.go:89).
Prerequisite: Workspace must have an ACTIVE credential with
provider = ANTHROPIC and type = API_KEY (OAuth AI_CLI_TOKENs from
claude CLI login do not work against the Messages API).
Request Body:
200 OK — suggested crew configuration.
Agent Skills (Per-Agent)
See the Agents page for per-agent skill management:Remove a skill from an agent
OWNER, ADMIN, or MANAGER role.
Request: agentId and skillId are required path parameters. No request body.
Response: 200 OK with the removed skill assignment, or 204 No Content when the handler has no response body.