API
REST Endpoints
Complete REST API reference for all Nenjo resources organized by category.
All REST endpoints are served under /api/v1/ and require Clerk JWT authentication unless noted otherwise. Request and response bodies use JSON.
| Method | Path | Auth | Description |
|---|
| GET/POST | /api/v1/auth/verify | None | Verify a Clerk session token |
| GET | /api/v1/auth/me | Clerk | Get current authenticated user |
| Method | Path | Description |
|---|
| GET | /api/v1/agents | List agents (optional ?project_id=) |
| POST | /api/v1/agents | Create an agent |
| GET | /api/v1/agents/bootstrap | Bootstrap agent data |
| GET | /api/v1/agents/tags | List all unique agent tags |
| GET | /api/v1/agents/:id | Get an agent by ID |
| PATCH | /api/v1/agents/:id | Update an agent |
| DELETE | /api/v1/agents/:id | Delete an agent |
| Method | Path | Description |
|---|
| GET | /api/v1/match-agents?tags=rust,backend | Match agents by tags |
| Method | Path | Description |
|---|
| GET | /api/v1/agent-roles | List roles visible to user |
| POST | /api/v1/agent-roles | Create a custom role |
| GET | /api/v1/agent-roles/:id | Get a role |
| PATCH | /api/v1/agent-roles/:id | Update a custom role |
| DELETE | /api/v1/agent-roles/:id | Delete a custom role |
| GET | /api/v1/agent-roles/:id/prompt | Get prompt config for a role |
| PATCH | /api/v1/agent-roles/:id/prompt | Update prompt config |
| POST | /api/v1/agent-roles/:id/preview | Preview prompt with context |
| POST | /api/v1/agent-roles/:id/reset | Reset role to system default |
| GET | /api/v1/agent-roles/:id/platform-scopes | Get platform scopes |
| PATCH | /api/v1/agent-roles/:id/platform-scopes | Update platform scopes |
| Method | Path | Description |
|---|
| GET | /api/v1/agent-role-assignments | List all role assignments |
| GET | /api/v1/agent-role-assignments/mine | List current user's assignments |
| POST | /api/v1/agent-role-assignments | Create a role assignment |
| GET | /api/v1/agent-role-assignments/:id | Get a role assignment |
| DELETE | /api/v1/agent-role-assignments/:id | Delete a role assignment |
| Method | Path | Description |
|---|
| GET | /api/v1/agent-roles/:id/skills | List skills assigned to a role |
| POST | /api/v1/agent-roles/:id/skills/:skill_id | Assign a skill to a role |
| DELETE | /api/v1/agent-roles/:id/skills/:skill_id | Remove a skill from a role |
| PATCH | /api/v1/agent-roles/:id/skills/:skill_id | Toggle/update a skill assignment |
| Method | Path | Description |
|---|
| GET | /api/v1/agent-roles/:id/modes | List modes assigned to a role |
| POST | /api/v1/agent-roles/:id/modes/:mode_id | Assign a mode to a role |
| DELETE | /api/v1/agent-roles/:id/modes/:mode_id | Remove a mode from a role |
| PATCH | /api/v1/agent-roles/:id/modes/:mode_id | Toggle/update a mode assignment |
| Method | Path | Description |
|---|
| GET | /api/v1/agent-roles/:id/mcp | List MCP servers for a role |
| POST | /api/v1/agent-roles/:id/mcp/:mcp_id | Assign an MCP server to a role |
| DELETE | /api/v1/agent-roles/:id/mcp/:mcp_id | Remove an MCP server from a role |
| Method | Path | Description |
|---|
| GET | /api/v1/skills | List all skills |
| POST | /api/v1/skills | Create a skill |
| POST | /api/v1/skills/upload | Upload a skill from file |
| GET | /api/v1/skills/:id | Get a skill |
| PATCH | /api/v1/skills/:id | Update a skill |
| DELETE | /api/v1/skills/:id | Delete a skill |
| PUT | /api/v1/skills/:id/credentials | Store encrypted credentials |
| DELETE | /api/v1/skills/:id/credentials | Revoke credentials |
| GET | /api/v1/skills/:id/credentials/status | Check credential status |
| Method | Path | Description |
|---|
| GET | /api/v1/modes | List all modes |
| POST | /api/v1/modes | Create a mode |
| POST | /api/v1/modes/upload | Upload a mode from file |
| GET | /api/v1/modes/:id | Get a mode |
| PATCH | /api/v1/modes/:id | Update a mode |
| DELETE | /api/v1/modes/:id | Delete a mode |
| POST | /api/v1/modes/:id/reset | Reset mode to system default |
| Method | Path | Description |
|---|
| POST | /api/v1/modes/:id/sessions | Create a mode session |
| GET | /api/v1/modes/sessions/active | Get active session for project + role |
| GET | /api/v1/modes/sessions/:sid | Get a session |
| PATCH | /api/v1/modes/sessions/:sid | Update session draft |
| POST | /api/v1/modes/sessions/:sid/complete | Complete a session |
| POST | /api/v1/modes/sessions/:sid/cancel | Cancel a session |
| Method | Path | Description |
|---|
| GET | /api/v1/projects | List all projects |
| POST | /api/v1/projects | Create a project |
| GET | /api/v1/projects/system | Get the system project |
| GET | /api/v1/projects/:id | Get a project by ID |
| PATCH | /api/v1/projects/:id | Update a project |
| DELETE | /api/v1/projects/:id | Delete a project |
| POST | /api/v1/projects/:id/sync-repo | Sync project repository |
| POST | /api/v1/projects/:id/disconnect-repo | Disconnect project repository |
| DELETE | /api/v1/projects/:id/tickets | Delete all tickets in a project |
| GET | /api/v1/projects/:id/settings | Get aggregated project settings |
| Method | Path | Description |
|---|
| GET | /api/v1/projects/:pid/documents | List documents in a project |
| POST | /api/v1/projects/:pid/documents | Upload a document (multipart) |
| GET | /api/v1/projects/:pid/documents/:doc_id | Download a document |
| DELETE | /api/v1/projects/:pid/documents/:doc_id | Delete a document |
| GET | /api/v1/projects/:pid/documents/:doc_id/content | Get document content as text |
| PUT | /api/v1/projects/:pid/documents/:doc_id/content | Update document content |
| Method | Path | Description |
|---|
| GET | /api/v1/projects/:pid/dependency-graph | Get full dependency graph (D3.js-ready) |
| GET | /api/v1/projects/:pid/execution-order | Get topologically sorted execution order |
| Method | Path | Description |
|---|
| GET | /api/v1/projects/:pid/pipeline-assignments | List all assignments for a project |
| POST | /api/v1/projects/:pid/pipeline-assignments | Create a pipeline assignment |
| GET | /api/v1/projects/:pid/pipeline-assignments/:id | Get an assignment |
| PATCH | /api/v1/projects/:pid/pipeline-assignments/:id | Update an assignment |
| DELETE | /api/v1/projects/:pid/pipeline-assignments/:id | Delete an assignment |
| POST | /api/v1/projects/:pid/pipeline-assignments/:id/trigger | Manually trigger a cron assignment |
| Method | Path | Description |
|---|
| GET | /api/v1/projects/:pid/mode-artifacts | List mode artifacts for a project |
| Method | Path | Description |
|---|
| GET | /api/v1/tickets | List tickets (query params for filtering) |
| POST | /api/v1/tickets | Create a ticket |
| POST | /api/v1/tickets/bulk | Bulk create tickets |
| GET | /api/v1/tickets/:id | Get a ticket by ID |
| PATCH | /api/v1/tickets/:id | Update a ticket |
| DELETE | /api/v1/tickets/:id | Delete a ticket |
| Method | Path | Description |
|---|
| POST | /api/v1/tickets/:ticket_id/dependencies | Add a dependency |
| DELETE | /api/v1/tickets/:ticket_id/dependencies/:dep_id | Remove a dependency |
| Method | Path | Description |
|---|
| GET | /api/v1/pipelines | List all pipelines for the user |
| POST | /api/v1/pipelines | Create a pipeline |
| GET | /api/v1/pipelines/:id | Get a pipeline with steps and edges |
| PATCH | /api/v1/pipelines/:id | Update a pipeline |
| DELETE | /api/v1/pipelines/:id | Delete a pipeline |
| POST | /api/v1/pipelines/:id/set-default | Set as the default pipeline |
| POST | /api/v1/pipelines/:id/trigger | Manually trigger a pipeline |
| Method | Path | Description |
|---|
| POST | /api/v1/pipelines/:pid/steps | Add a step to a pipeline |
| PATCH | /api/v1/pipelines/:pid/steps/:step_id | Update a step |
| DELETE | /api/v1/pipelines/:pid/steps/:step_id | Remove a step |
| Method | Path | Description |
|---|
| POST | /api/v1/pipelines/:pid/edges | Add a directed edge |
| DELETE | /api/v1/pipelines/:pid/edges/:edge_id | Remove an edge |
| Method | Path | Description |
|---|
| GET | /api/v1/executions | List execution runs |
| POST | /api/v1/executions | Create an execution run |
| GET | /api/v1/executions/:id | Get execution details |
| POST | /api/v1/executions/:id/command | Send a lifecycle command |
| GET | /api/v1/executions/:id/tickets | Get tickets for an execution |
| GET | /api/v1/executions/:id/events | Get events for an execution |
| Method | Path | Description |
|---|
| GET | /api/v1/councils | List councils for the user |
| POST | /api/v1/councils | Create a council with leader and members |
| GET | /api/v1/councils/:id | Get council with member details |
| PATCH | /api/v1/councils/:id | Update council metadata |
| DELETE | /api/v1/councils/:id | Delete a council |
| POST | /api/v1/councils/:id/members | Add a member to a council |
| PATCH | /api/v1/councils/:id/members/:mid | Update a council member |
| DELETE | /api/v1/councils/:id/members/:mid | Remove a council member |
| Method | Path | Description |
|---|
| GET | /api/v1/lambdas | List lambdas |
| POST | /api/v1/lambdas | Create a lambda |
| GET | /api/v1/lambdas/:id | Get a lambda |
| PATCH | /api/v1/lambdas/:id | Update a lambda |
| DELETE | /api/v1/lambdas/:id | Delete a lambda |
External MCP server configurations that can be assigned to agent roles.
| Method | Path | Description |
|---|
| GET | /api/v1/mcp-servers | List MCP server configs |
| POST | /api/v1/mcp-servers | Create an MCP server config |
| GET | /api/v1/mcp-servers/registry/search | Search the MCP server registry |
| GET | /api/v1/mcp-servers/registry/:name/latest | Get latest version from registry |
| GET | /api/v1/mcp-servers/:id | Get an MCP server config |
| PATCH | /api/v1/mcp-servers/:id | Update an MCP server config |
| DELETE | /api/v1/mcp-servers/:id | Delete an MCP server config |
| Method | Path | Description |
|---|
| GET | /api/v1/chat-messages | List messages (paginated) |
| POST | /api/v1/chat-messages | Create a message |
| DELETE | /api/v1/chat-messages | Delete all messages for a role |
| DELETE | /api/v1/chat-messages/:id | Delete a single message |
| Method | Path | Description |
|---|
| GET | /api/v1/chat-sessions | List chat sessions |
| POST | /api/v1/chat-sessions | Create a session |
| PATCH | /api/v1/chat-sessions/:id | Rename a session |
| DELETE | /api/v1/chat-sessions/:id | Hard delete a session |
| POST | /api/v1/chat-sessions/:id/archive | Archive a session |
| Method | Path | Description |
|---|
| GET | /api/v1/prompt-context-variables | List all variables grouped by category |
See API Keys for full details.
| Method | Path | Description |
|---|
| GET | /api/v1/api-keys | List API keys for the user |
| POST | /api/v1/api-keys | Create a new API key |
| DELETE | /api/v1/api-keys/:id | Revoke an API key |
| Method | Path | Description |
|---|
| GET | /api/v1/workers | Check worker status (via Redis) |
These endpoints are stubs (not yet implemented).
| Method | Path | Auth | Description |
|---|
| GET | /api/v1/webhooks | None | List webhooks |
| POST | /api/v1/webhooks | None | Create a webhook |
| GET | /api/v1/webhooks/:id | None | Get a webhook |
| GET | /api/v1/webhooks/:id/logs | None | Get webhook logs |
| POST | /api/v1/webhooks/:id/test | None | Test a webhook |
| Method | Path | Auth | Description |
|---|
| GET | /api/v1/version | None | Get API version info |