Built by the creator of tx|Primitives for memory, tasks & orchestrationVisit tx docs
tx-agent-kit
API Reference

API Reference

Auto-generated API reference from the OpenAPI specification

The API reference documentation is auto-generated from the OpenAPI specification at apps/api/openapi.json. This specification is the single source of truth for all API endpoints, request/response schemas, and authentication requirements.

Regenerating the docs

When API routes change, regenerate the OpenAPI spec and API reference docs:

# Regenerate OpenAPI spec from API routes
pnpm openapi:generate

# Regenerate API reference MDX files from the spec
pnpm docs:api:generate

The openapi:generate command introspects the Effect HttpApi route definitions in apps/api and produces an updated apps/api/openapi.json. The docs:api:generate command then reads this spec and generates MDX documentation files.

Endpoint groups

The API is organized into four endpoint groups:

Auth (/v1/auth/*)

Auth routes use the custom kind marker, meaning domain-specific operations rather than standard CRUD.

MethodPathDescription
POST/v1/auth/sign-upRegister a new user and return a session
POST/v1/auth/sign-inAuthenticate and return a JWT
GET/v1/auth/meGet the current authenticated user
DELETE/v1/auth/meDelete the authenticated user

Workspaces (/v1/workspaces/*)

Workspace routes use the crud kind marker and expose the full CRUD surface.

MethodPathDescription
GET/v1/workspacesList workspaces for the current user (paginated)
GET/v1/workspaces/:idGet a single workspace by ID
POST/v1/workspaces/manyGet multiple workspaces by IDs
POST/v1/workspacesCreate a workspace
PATCH/v1/workspaces/:idUpdate a workspace
DELETE/v1/workspaces/:idRemove a workspace

Tasks (/v1/tasks/*)

Task routes also use the crud kind marker.

MethodPathDescription
GET/v1/tasksList tasks for a workspace (paginated)
GET/v1/tasks/:idGet a single task
POST/v1/tasks/manyGet multiple tasks by IDs
POST/v1/tasksCreate a task
PATCH/v1/tasks/:idUpdate a task
DELETE/v1/tasks/:idRemove a task

Invitations (/v1/invitations/*)

Invitation routes include idempotent acceptance.

MethodPathDescription
GET/v1/invitationsList invitations for the current user
GET/v1/invitations/:idGet a single invitation
POST/v1/invitationsCreate an invitation
PATCH/v1/invitations/:idUpdate an invitation
DELETE/v1/invitations/:idRemove an invitation
POST/v1/invitations/accept/:tokenAccept an invitation (idempotent)

Authentication

All endpoints except /v1/auth/sign-up, /v1/auth/sign-in, and /health require a Bearer JWT token in the Authorization header:

Authorization: Bearer <jwt-token>

Tokens are returned by the sign-up and sign-in endpoints.

Health check

GET /health

Returns { "status": "healthy" } with a 200 status code. This endpoint is used by Docker health checks and deployment smoke tests.

Paginated responses

List endpoints support cursor-based pagination with limit and cursor query parameters. Responses include a nextCursor field when more results are available:

{
  "data": [...],
  "nextCursor": "abc123"
}

OpenAPI spec location

The canonical OpenAPI spec lives at:

apps/api/openapi.json

This file is generated, not hand-written. Do not edit it directly --- changes will be overwritten by pnpm openapi:generate.

On this page