Skip to main content

API Endpoints

Auto-generated

This reference is auto-generated from the OpenAPI 3.0 specification. Last generated: 2026-05-02. Run npm run generate-api to regenerate.

Base URL: https://api.orkosi.com/api (production) or http://localhost:3001/api (local)

For interactive testing, use the Swagger UI.


Endpoint summary

MethodPathAuthDescription
GET/versionNoGet application version and uptime
GET/healthNoAPI health check (DB connectivity, version, uptime)
GET/readyNoReadiness probe (200 when DB is connected)
GET/activity-logYesList recent activities with filtering
POST/activity-logYesCreate a new activity record
GET/activity-log/statsYesActivity summary statistics
GET/organizations/{orgId}/api-keysYesList API keys for organization (masked)
POST/organizations/{orgId}/api-keysYesCreate API key (returns raw key once)
GET/organizations/{orgId}/api-keys/{keyId}YesGet API key detail (masked)
PATCH/organizations/{orgId}/api-keys/{keyId}YesUpdate API key name, description, scopes, or active status
DELETE/organizations/{orgId}/api-keys/{keyId}YesSoft-delete API key
POST/organizations/{orgId}/api-keys/{keyId}/revokeYesRevoke API key instantly
POST/organizations/{orgId}/api-keys/{keyId}/rotateYesRotate API key (old key valid for 24h grace period)
POST/organizations/{orgId}/api-keys/{keyId}/rollYesRoll (regenerate) API key (no grace period)
GET/organizations/{orgId}/api-keys/{keyId}/usageYesPer-key usage log
POST/auth/registerNoRegister a new user account
POST/auth/loginNoAuthenticate with email and password
POST/auth/logoutYesRevoke current session token (or all tokens for the user)
GET/auth/meYesGet current authenticated user
POST/auth/forgot-passwordNoRequest a password reset email
GET/automationsYesList automations (run scripts and LaunchAgents)
POST/automationsYesCreate automation record
GET/automations/{id}YesGet single automation
PATCH/automations/{id}YesUpdate automation
DELETE/automations/{id}YesDelete automation
GET/backupsYesList backup files (newest first)
GET/backups/statsYesAggregate backup stats (count, size, last backup)
GET/backups/logsYesTail of offsite_backup.log (last 100 lines)
GET/backups/github-statusYesLatest backup in GitHub db-backups repo and sync check
GET/backups/{filename}/downloadYesDownload a backup file
DELETE/backups/{filename}YesDelete a backup file from disk
POST/backups/triggerYesTrigger a manual pg_dump backup
GET/billing/overviewYesOS billing dashboard (MRR, infra spend, AI costs)
GET/billing/subscriptionYesGet current user subscription
POST/billing/checkoutYesCreate Stripe checkout session for plan purchase
POST/billing/portalYesCreate Stripe customer portal session
POST/billing/create-payment-intentYesCreate payment intent for one-time token purchase
POST/billing/webhookNoStripe webhook handler
GET/billing/usageYesGet current usage stats and limits
GET/billing/tiersNoList available subscription tiers
GET/billing/pricingNoPublic pricing strategy (tiers, token packages, economics)
POST/billing/change-planYesUpgrade or downgrade subscription plan
GET/billing/plan-summaryYesFull plan limits and current usage summary
POST/billing/validate-downgradeYesCheck if downgrade to target tier is possible
GET/billing/auto-topupYesGet auto top-up configuration
POST/billing/auto-topupYesConfigure auto top-up (initial setup)
PUT/billing/auto-topupYesUpdate auto top-up configuration
GET/billing/credit-auto-topupYesGet credit auto top-up configuration
POST/billing/credit-auto-topupYesConfigure credit auto top-up (initial setup)
PUT/billing/credit-auto-topupYesUpdate credit auto top-up configuration
POST/bull-queue/submitYesSubmit a job to a BullMQ queue
POST/bull-queue/submit-scheduledYesSubmit a scheduled or recurring job
GET/bull-queue/statsYesGet BullMQ queue statistics
GET/bull-queue/{queue}/jobsYesList jobs from a BullMQ queue
GET/changelogYesList changelog entries from completed tasks
GET/changelog/summaryYesAggregated changelog grouped by date and area
GET/changelog/feedYesRSS 2.0 feed of changelog entries
GET/credentialsYesList all credential keys (values hidden)
POST/credentialsYesCreate or update a credential (admin only)
GET/credentials/{key}YesGet a single credential (decrypted value)
DELETE/credentials/{key}YesDelete a credential (admin only)
GET/dashboardNoDashboard root — overview stats and available sub-endpoints
GET/dashboard/agent-efficiencyYesPer-agent efficiency KPIs (tokens, cost, tasks per 1k tokens)
GET/dashboard/agent-queue-healthYesPer-agent queued task count and wait times
GET/dashboard/statsYesDashboard overview stats (agents, tasks, products, pending)
GET/dashboard/overviewYesAggregated overview (token balance, recent runs, protocols, 7d usage)
GET/discovery-enginesYesList all discovery engines with stats
POST/discovery-enginesYesCreate new discovery engine with cron job
GET/discovery-engines/efficiencyYesPer-engine efficiency and waste stats
GET/discovery-engines/{slug}YesGet single discovery engine with recent runs
PATCH/discovery-engines/{slug}YesUpdate discovery engine and sync cron job
DELETE/discovery-engines/{slug}YesDelete discovery engine and associated cron job
POST/discovery-engines/{slug}/runYesTrigger immediate discovery engine run
GET/factory-workersYesList all factory workers with state and metrics
GET/factory-workers/statsYesFactory summary stats
PATCH/factory-workers/configYesUpdate factory worker count and concurrency config
GET/factory-workers/health-summaryYesFactory health summary with launchctl status
GET/filesYesList files with pagination
POST/filesYesCreate or upsert a file record
GET/files/{id}YesGet a single file with content
GET/files/searchYesSearch files by name or content
GET/arch-healthNoArchitecture health overview (DB, memory, git, tunnel, rate limits)
GET/integrationsYesList all integrations with status
GET/integrations/{id}/statusYesCheck if an integration is configured
POST/integrations/{id}/configureYesSave integration credentials
GET/logsYesList merged log lines (file + DB)
POST/logsYesStore an agent log entry
GET/logs/filesYesList available log files
GET/notificationsYesList notifications
POST/notificationsYesCreate a notification
GET/notifications/unread-countYesGet unread notification count
PATCH/notifications/read-allYesMark all notifications as read
GET/organizationsYesList organizations for the current user
POST/organizationsYesCreate organization within user's tenant
GET/organizations/{id}YesGet organization detail with member count
PATCH/organizations/{id}YesUpdate organization name, slug, or avatar
DELETE/organizations/{id}YesSoft-delete organization (owner only)
GET/organizations/{id}/membersYesList organization members
POST/organizations/{id}/membersYesAdd a member to organization (admin+)
PATCH/organizations/{id}/members/{userId}YesUpdate member role in organization
DELETE/organizations/{id}/members/{userId}YesRemove member from organization (admin+)
GET/organizations/{id}/invitesYesList pending organization invites
POST/organizations/{id}/invitesYesInvite user by email to organization
POST/organizations/invites/{token}/acceptYesAccept an organization invite
GET/v1/public/healthNoPublic API health check
GET/v1/public/tasksYesList tasks
POST/v1/public/tasksYesCreate a task
GET/v1/public/tasks/{id}YesGet a task by ID
PATCH/v1/public/tasks/{id}YesUpdate a task
DELETE/v1/public/tasks/{id}YesArchive a task (sets status to cancelled)
GET/v1/public/agentsYesList agents
POST/v1/public/agentsYesCreate an agent
GET/v1/public/agents/{id}YesGet an agent by ID
PATCH/v1/public/agents/{id}YesUpdate an agent
DELETE/v1/public/agents/{id}YesDeactivate an agent (sets status to offline)
GET/v1/public/templatesYesList agent templates
POST/v1/public/templatesYesCreate an agent template
GET/v1/public/templates/{id}YesGet a template by ID
PATCH/v1/public/templates/{id}YesUpdate a template
DELETE/v1/public/templates/{id}YesArchive a template (soft delete)
GET/rulesYesList architectural rules (filterable by scope, agent, category)
POST/rulesYesCreate a new rule
PATCH/rules/{id}YesUpdate a rule
DELETE/rules/{id}YesDelete a rule (non-permanent only)
GET/searchYesGlobal search across tasks, products, and agents
GET/system/healthYesArchitecture health dashboard (compliance score, per-section breakdowns)
POST/task-queue/submitYesSubmit a new job to the task queue
POST/task-queue/claimYesClaim next job(s) from queue (SKIP LOCKED)
GET/teamsYesList all teams with member counts
POST/teamsYesCreate a new team
GET/teams/{id}YesGet team with members
PATCH/teams/{id}YesUpdate team name or description
DELETE/teams/{id}YesDelete team (admin+ only)
GET/teams/{id}/membersYesList team members
POST/teams/{id}/membersYesAdd member to team
GET/teams/{id}/invitesYesList team invites
POST/teams/{id}/invitesYesInvite user to team by email
GET/tokens/balanceYesGet current user's token balance
GET/tokens/transactionsYesGet token transaction history
POST/tokens/consumeYesConsume tokens for an action
GET/usersYesList all users
GET/users/{id}YesGet a user by ID
PATCH/users/{id}YesUpdate a user
DELETE/users/{id}YesDelete a user
DELETE/users/meYesDelete own account (GDPR right to be forgotten)
POST/agentsYesCreate a new agent
GET/agentsYesList all agents
POST/agents/{name}/stopYesStop an agent
POST/agents/{name}/startYesStart an agent
POST/agents/{name}/restartYesRestart an agent
GET/agent-runs/idle-checkNoIdle-skip preflight check
GET/tasksYesList tasks
POST/tasksYesCreate a task
GET/tasks/{id}YesGet a single task
DELETE/tasks/{id}YesDelete a task
GET/productsYesList products
POST/productsYesCreate a product
GET/products/{slug}YesGet a product by slug
PATCH/products/{slug}YesUpdate a product

Auth

Authentication, registration, password reset, and token refresh

GET /organizations/{orgId}/api-keys

List API keys for organization (masked)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes

Responses:

  • 200: API keys list (values masked)

POST /organizations/{orgId}/api-keys

Create API key (returns raw key once)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
descriptionstringNo
scopesstring[]No
expires_atstringNo

Responses:

  • 201: Key created (raw key in response, only shown once)

GET /organizations/{orgId}/api-keys/{keyId}

Get API key detail (masked)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: Key detail

PATCH /organizations/{orgId}/api-keys/{keyId}

Update API key name, description, scopes, or active status

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: Key updated

DELETE /organizations/{orgId}/api-keys/{keyId}

Soft-delete API key

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: Key deleted

POST /organizations/{orgId}/api-keys/{keyId}/revoke

Revoke API key instantly

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: Key revoked (immediately unusable)

POST /organizations/{orgId}/api-keys/{keyId}/rotate

Rotate API key (old key valid for 24h grace period)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
grace_hoursintegerNo

Responses:

  • 200: New raw key returned (old key valid during grace period)

POST /organizations/{orgId}/api-keys/{keyId}/roll

Roll (regenerate) API key (no grace period)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: New raw key returned (old key invalidated)

GET /organizations/{orgId}/api-keys/{keyId}/usage

Per-key usage log

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
orgIdpathstringYes
keyIdpathstringYes

Responses:

  • 200: Usage log entries

POST /auth/register

Register a new user account

Authentication: None

Request body (application/json):

FieldTypeRequiredDescription
usernamestringYes
emailstringYes
passwordstringYes
invite_codestringNo
terms_acceptedbooleanYes
privacy_acceptedbooleanYes

Responses:

  • 201: User created successfully
  • 400: Validation error — Error
  • 409: User already exists

POST /auth/login

Authenticate with email and password

Authentication: None

Request body (application/json):

FieldTypeRequiredDescription
emailstringYes
passwordstringYes

Responses:

  • 200: Login successful
  • 400: Missing or invalid credentials
  • 401: Invalid email or password

POST /auth/logout

Revoke current session token (or all tokens for the user)

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
all_devicesbooleanNoExample: undefined

Responses:


GET /auth/me

Get current authenticated user

Authentication: Bearer token / API key

Responses:

  • 200: Current user info
  • 401: Not authenticated

POST /auth/forgot-password

Request a password reset email

Authentication: None

Request body (application/json):

FieldTypeRequiredDescription
emailstringYes

Responses:

  • 200: Reset email sent (always returns success to prevent enumeration) — SuccessResponse

Users

User management and profiles

GET /users

List all users

Returns all users (id, username, email, role, timestamps). Requires authentication.

Authentication: Bearer token / API key

Responses:


GET /users/{id}

Get a user by ID

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:


PATCH /users/{id}

Update a user

Admin-only. Updatable fields are username, email, and role.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
usernamestringNo
emailstringNo
roleadmin | editor | viewer | builder | agent | demoNo

Responses:


DELETE /users/{id}

Delete a user

Admin-only. Cannot delete your own account.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: User deleted — DeletedResponse
  • 403: Cannot delete your own account
  • 404: User not found

DELETE /users/me

Delete own account (GDPR right to be forgotten)

Self-service account erasure. Admin accounts cannot self-delete.

Authentication: Bearer token / API key

Responses:

  • 200: Account deleted — DeletedResponse
  • 403: Admin accounts cannot be self-deleted

Health

Health checks, readiness, and liveness probes

GET /version

Get application version and uptime

Authentication: None

Responses:

  • 200: Version info

GET /health

API health check (DB connectivity, version, uptime)

Authentication: None

Responses:

  • 200: Healthy
  • 503: Database unavailable

GET /ready

Readiness probe (200 when DB is connected)

Authentication: None

Responses:

  • 200: Ready
  • 503: Not ready (DB unavailable)

GET /arch-health

Architecture health overview (DB, memory, git, tunnel, rate limits)

Authentication: None

Responses:

  • 200: Detailed system health status
  • 503: System degraded

Agents

Agent lifecycle, state, and monitoring

POST /agents

Create a new agent

10-step bootstrap protocol: DB registration, workspace creation, SOUL.md, run script, automations, LaunchAgent plist, load agent, update heartbeat, and log.

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYesExample: felix
display_namestringNoExample: Felix
modelstringNoExample: claude-haiku-4-5
interval_secintegerNoExample: 3600
emojistringNoExample: 📦
colorstringNoExample: #3b82f6

Responses:

  • 200: Agent created with bootstrap step results — SuccessResponse
  • 409: Agent already exists

GET /agents

List all agents

Returns agents with registry info, state, automations, completion rates, and file-based state merged.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNoMax items to return
offsetqueryintegerNoNumber of items to skip
statusquerystringNoFilter by agent status (comma-separated)

Responses:

  • 200: Paginated agent list — ListResponse
  • 503: Database unavailable

POST /agents/{name}/stop

Stop an agent

Sets the agent status to stopped in both file state and DB, creates a /tmp flag, and logs the event.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
namepathstringYesAgent name

Request body (application/json):

FieldTypeRequiredDescription
notestringNoExample: undefined

Responses:


POST /agents/{name}/start

Start an agent

Removes the stop flag, updates DB and file state, loads the LaunchAgent, and logs the event.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
namepathstringYes

Request body (application/json):

FieldTypeRequiredDescription
notestringNo

Responses:


POST /agents/{name}/restart

Restart an agent

Unloads the LaunchAgent, waits briefly, reloads it, and logs the event.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
namepathstringYes

Request body (application/json):

FieldTypeRequiredDescription
notestringNo

Responses:


Agent Runs

Agent run tracking and analytics

GET /agent-runs/idle-check

Idle-skip preflight check

Lightweight check (~100ms) called by shell scripts before starting a full agent run. Returns whether the agent should skip this cycle.

Authentication: None

Parameters:

NameInTypeRequiredDescription
agent_namequerystringYesAgent name to check
run_modequerystringNoRun mode (task, discovery, etc.)

Responses:

  • 200: Idle check result
  • 400: Missing agent_name parameter

Tasks

Task CRUD, verification, and workflow

GET /tasks

List tasks

Paginated task list with filters for status, search, assignee, product, priority, and more.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo
statusquerystringNoComma-separated status filter (todo, in_progress, review, done, blocked, archived)
qquerystringNoFull-text search in title and description
assigneequerystringNoFilter by assignee name (use "me" with auth token)
nextquerytrue | falseNoReturn highest-priority todo task for the given assignee

Responses:

  • 200: Paginated task list — ListResponse
  • 503: Database unavailable

POST /tasks

Create a task

Creates a new task with validation, dedup, and post-create hooks (agent task derivation, cascade changes).

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
titlestringYesExample: Fix login bug
descriptionstringNo
statustodo | in_progress | review | done | blocked | archivedNo
priorityP0 | P1 | P2 | P3No
assigneestringNo
product_slugstringNo

Responses:

  • 201: Task created — ItemResponse
  • 400: Validation error
  • 429: Rate limit exceeded

GET /tasks/{id}

Get a single task

Returns a task by ID with embedded blocking/dependency info.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYesTask ID

Responses:


DELETE /tasks/{id}

Delete a task

Permanently deletes a task. Requires admin role.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Task deleted — DeletedResponse
  • 400: Invalid task ID
  • 404: Task not found

Products

Product catalog, features, and assets

GET /products

List products

Returns all products with optional status and search filters. Merges DB rows with file-based brand metadata.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
statusquerystringNoComma-separated status filter (active, building, archived)
qquerystringNoSearch query
slugquerystringNoFilter by exact slug

Responses:

  • 200: Product list with summary stats — ListResponse
  • 401: Authentication required

POST /products

Create a product

Creates a new product with slug generation, brand directory scaffolding, and guideline sync.

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYesExample: My Product
slugstringNoExample: my-product
taglinestringNo
descriptionstringNo
statusactive | building | archivedNo

Responses:

  • 201: Product created — ItemResponse
  • 400: Validation error
  • 409: Product slug already exists

GET /products/{slug}

Get a product by slug

Returns a single product merged with file-based brand metadata.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYesProduct slug (e.g. "unosend")

Responses:

  • 200: Product details — ItemResponse
  • 401: Authentication required
  • 404: Product not found

PATCH /products/{slug}

Update a product

Upserts product fields. Triggers guideline sync, cascade tasks, and status-change side effects.

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
namestringNo
taglinestringNo
descriptionstringNo
statusactive | building | archived | live | placeholderNo
brand_colorstringNo
accent_colorstringNo

Responses:

  • 200: Product updated — ItemResponse
  • 404: Product not found

Credentials

Encrypted credential storage (AES-256-GCM)

GET /credentials

List all credential keys (values hidden)

Authentication: Bearer token / API key

Responses:


POST /credentials

Create or update a credential (admin only)

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
keystringYes
valuestringYes
descriptionstringNo

Responses:

  • 201: Credential saved — ItemResponse
  • 400: Validation error
  • 403: Admin required

GET /credentials/{key}

Get a single credential (decrypted value)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
keypathstringYes

Responses:

  • 200: Credential with decrypted value — ItemResponse
  • 404: Credential not found
  • 500: Decryption failed

DELETE /credentials/{key}

Delete a credential (admin only)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
keypathstringYes

Responses:

  • 200: Credential deleted — DeletedResponse
  • 403: Admin required
  • 404: Not found

Tokens

Token-based usage and billing

GET /tokens/balance

Get current user's token balance

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
company_idqueryintegerNoScope to a specific company

Responses:

  • 200: Token balance

GET /tokens/transactions

Get token transaction history

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
company_idqueryintegerNo
typequeryconsume | purchase | bonus | signup_bonus | admin_grant | refundNo
limitqueryintegerNo
offsetqueryintegerNo

Responses:


POST /tokens/consume

Consume tokens for an action

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
amountintegerYes
actionstringYes
company_idintegerNo
reference_idstringNo
metadataobjectNo

Responses:

  • 200: Tokens consumed
  • 400: Invalid amount or missing action
  • 402: Insufficient balance

Discovery

Discovery engines and automated audits

GET /discovery-engines

List all discovery engines with stats

Authentication: Bearer token / API key

Responses:

  • 200: All engines with run stats, linked task counts

POST /discovery-engines

Create new discovery engine with cron job

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
descriptionstringNo
layerstringYes
schedule_interval_msintegerNo
modelstringNo
enabledbooleanNo

Responses:

  • 201: Engine created

GET /discovery-engines/efficiency

Per-engine efficiency and waste stats

Authentication: Bearer token / API key

Responses:

  • 200: Efficiency metrics per engine (cost, waste, compute minutes)

GET /discovery-engines/{slug}

Get single discovery engine with recent runs

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYes

Responses:

  • 200: Engine details with recent run history
  • 404: Engine not found

PATCH /discovery-engines/{slug}

Update discovery engine and sync cron job

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYes

Responses:

  • 200: Engine updated
  • 404: Engine not found

DELETE /discovery-engines/{slug}

Delete discovery engine and associated cron job

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYes

Responses:

  • 200: Engine deleted
  • 404: Engine not found

POST /discovery-engines/{slug}/run

Trigger immediate discovery engine run

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
slugpathstringYes

Responses:

  • 200: Run queued
  • 404: Engine not found

Monitoring

System health, metrics, and dashboards

GET /activity-log

List recent activities with filtering

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
actor_typequeryagent | system | userNo
actor_idquerystringNo
actionquerystringNo
limitqueryintegerNo
offsetqueryintegerNo

Responses:


POST /activity-log

Create a new activity record

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
actor_typeagent | system | userYes
actor_idstringYes
actionstringYes
entity_typestringNo
entity_idstringNo
metadataobjectNo

Responses:


GET /activity-log/stats

Activity summary statistics

Authentication: Bearer token / API key

Responses:


GET /dashboard

Dashboard root — overview stats and available sub-endpoints

Authentication: None

Responses:

  • 200: Overview counts and endpoint list

GET /dashboard/agent-efficiency

Per-agent efficiency KPIs (tokens, cost, tasks per 1k tokens)

Authentication: Bearer token / API key

Responses:

  • 200: Agents sorted by tasks per 1k tokens

GET /dashboard/agent-queue-health

Per-agent queued task count and wait times

Authentication: Bearer token / API key

Responses:

  • 200: Queue health per agent

GET /dashboard/stats

Dashboard overview stats (agents, tasks, products, pending)

Authentication: Bearer token / API key

Responses:

  • 200: Aggregate counts

GET /dashboard/overview

Aggregated overview (token balance, recent runs, protocols, 7d usage)

Authentication: Bearer token / API key

Responses:

  • 200: Full dashboard overview

GET /logs

List merged log lines (file + DB)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
sourcequeryfile | db | allNo
agentquerystringNo
levelqueryerror | warn | infoNo
qquerystringNo

Responses:

  • 200: Log entries

POST /logs

Store an agent log entry

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
agentstringYes
messagestringYes
levelstringNo
metaobjectNo

Responses:

  • 201: Log entry created

GET /logs/files

List available log files

Authentication: Bearer token / API key

Responses:

  • 200: Available log files

GET /system/health

Architecture health dashboard (compliance score, per-section breakdowns)

Authentication: Bearer token / API key

Responses:

  • 200: Overall compliance score with agent, task, product, and file health sections

Operations

Automations, pipelines, and deployments

GET /automations

List automations (run scripts and LaunchAgents)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
agent_namequerystringNoFilter by agent name
typequerystringNoFilter by type (e.g. launchagent, script)
statusqueryactive | inactive | disabledNo
qquerystringNoFull-text search (max 100 chars)

Responses:

  • 200: List of automations with live filesystem status — ListResponse

POST /automations

Create automation record

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
agent_namestringYes
typestringYes
pathstringYes
labelstringNo
statusactive | inactive | disabledNo

Responses:

  • 201: Automation created

GET /automations/{id}

Get single automation

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Automation detail with live status
  • 404: Not found

PATCH /automations/{id}

Update automation

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Automation updated

DELETE /automations/{id}

Delete automation

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Automation deleted

GET /backups

List backup files (newest first)

Authentication: Bearer token / API key

Responses:

  • 200: Backup file list with sizes and timestamps

GET /backups/stats

Aggregate backup stats (count, size, last backup)

Authentication: Bearer token / API key

Responses:

  • 200: Backup statistics

GET /backups/logs

Tail of offsite_backup.log (last 100 lines)

Authentication: Bearer token / API key

Responses:

  • 200: Log lines

GET /backups/github-status

Latest backup in GitHub db-backups repo and sync check

Authentication: Bearer token / API key

Responses:

  • 200: GitHub backup status

GET /backups/{filename}/download

Download a backup file

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
filenamepathstringYes

Responses:

  • 200: Backup file stream
  • 400: Invalid filename

DELETE /backups/{filename}

Delete a backup file from disk

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
filenamepathstringYes

Responses:

  • 200: File deleted

POST /backups/trigger

Trigger a manual pg_dump backup

Authentication: Bearer token / API key

Responses:

  • 200: Backup triggered

GET /changelog

List changelog entries from completed tasks

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo
agentquerystringNoFilter by agent name
task_idqueryintegerNoFilter by source task ID

Responses:


GET /changelog/summary

Aggregated changelog grouped by date and area

Authentication: Bearer token / API key

Responses:

  • 200: Human-readable summaries per date

GET /changelog/feed

RSS 2.0 feed of changelog entries

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
agentquerystringNo
productquerystringNo

Responses:

  • 200: RSS 2.0 XML feed

GET /files

List files with pagination

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
categoryquerystringNo
pagequeryintegerNo
limitqueryintegerNo

Responses:

  • 200: Paginated file list

POST /files

Create or upsert a file record

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
pathstringYes
file_typestringNo
categorystringNo
contentstringNo

Responses:

  • 201: File record created

GET /files/{id}

Get a single file with content

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:


GET /files/search

Search files by name or content

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
qquerystringNo
workspacequerystringNo
categoryquerystringNo
extquerystringNo

Responses:


GET /integrations

List all integrations with status

Authentication: Bearer token / API key

Responses:

  • 200: Integration catalogue with connection status

GET /integrations/{id}/status

Check if an integration is configured

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Responses:

  • 200: Integration configuration status
  • 404: Unknown integration

POST /integrations/{id}/configure

Save integration credentials

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
fieldsobjectNo

Responses:


GET /organizations

List organizations for the current user

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo

Responses:

  • 200: Paginated list of organizations with member counts — ListResponse

POST /organizations

Create organization within user's tenant

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
slugstringNo

Responses:

  • 201: Organization created (creator becomes owner)
  • 409: Slug already exists in tenant

GET /organizations/{id}

Get organization detail with member count

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Responses:

  • 200: Organization detail
  • 404: Not found

PATCH /organizations/{id}

Update organization name, slug, or avatar

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
namestringNo
slugstringNo
avatar_urlstringNo

Responses:

  • 200: Organization updated
  • 409: Slug already in use

DELETE /organizations/{id}

Soft-delete organization (owner only)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Responses:


GET /organizations/{id}/members

List organization members

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Responses:

  • 200: List of members with roles

POST /organizations/{id}/members

Add a member to organization (admin+)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
user_idstringYes
roleowner | admin | member | viewerNo

Responses:

  • 201: Member added
  • 409: User already a member

PATCH /organizations/{id}/members/{userId}

Update member role in organization

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes
userIdpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
roleowner | admin | member | viewerYes

Responses:

  • 200: Role updated

DELETE /organizations/{id}/members/{userId}

Remove member from organization (admin+)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes
userIdpathstringYes

Responses:

  • 200: Member removed

GET /organizations/{id}/invites

List pending organization invites

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Responses:

  • 200: Pending invite list

POST /organizations/{id}/invites

Invite user by email to organization

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathstringYes

Request body (application/json):

FieldTypeRequiredDescription
emailstringYes
roleadmin | member | viewerNo

Responses:

  • 201: Invite sent
  • 409: Active invite already exists

POST /organizations/invites/{token}/accept

Accept an organization invite

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
tokenpathstringYes

Responses:

  • 200: Invite accepted, user added as member
  • 404: Invalid or expired invite

GET /rules

List architectural rules (filterable by scope, agent, category)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
scopequerystringNoFilter by scope (e.g. 'all' for universal rules)
agentquerystringNoAgent name — returns agent-scoped + universal rules
categoryquerystringNoFilter by category (e.g. arch-stack, workflow, security)
permanentquery0 | 1No

Responses:


POST /rules

Create a new rule

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
rulestringYes
scopestringNo
categorystringNo
permanentbooleanNo

Responses:

  • 201: Rule created

PATCH /rules/{id}

Update a rule

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Rule updated

DELETE /rules/{id}

Delete a rule (non-permanent only)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Rule deleted
  • 403: Cannot delete permanent rules

Global search across tasks, products, and agents

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
qquerystringYesSearch query (searches titles, names, slugs, IDs)

Responses:

  • 200: Search results grouped by entity type
  • 400: Query too long

POST /task-queue/submit

Submit a new job to the task queue

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
task_typestringYes
payloadobjectNo
queue_namestringNo
priorityintegerNo
tenant_idintegerNo
max_attemptsintegerNo
timeout_secondsintegerNo
idempotency_keystringNo

Responses:

  • 201: Job submitted — ItemResponse
  • 400: Missing task_type
  • 503: Queue table not available

POST /task-queue/claim

Claim next job(s) from queue (SKIP LOCKED)

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
worker_idstringYes
queue_namestringNo
task_typestringNo
tenant_idintegerNo
batch_sizeintegerNo

Responses:

  • 200: Claimed job(s) or null if queue empty
  • 400: Missing worker_id

GET /teams

List all teams with member counts

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
namequerystringNoFilter by team name (ILIKE)
limitqueryintegerNo
offsetqueryintegerNo

Responses:


POST /teams

Create a new team

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
descriptionstringNo

Responses:

  • 201: Team created (creator becomes owner)

GET /teams/{id}

Get team with members

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Team details with member list
  • 404: Team not found

PATCH /teams/{id}

Update team name or description

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Team updated

DELETE /teams/{id}

Delete team (admin+ only)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Team deleted

GET /teams/{id}/members

List team members

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Member list with roles

POST /teams/{id}/members

Add member to team

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
user_idintegerYes
roleowner | admin | memberNo

Responses:

  • 201: Member added

GET /teams/{id}/invites

List team invites

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Pending invites

POST /teams/{id}/invites

Invite user to team by email

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
emailstringYes
roleowner | admin | memberNo

Responses:

  • 201: Invite sent

Factory

Factory workers and task pipeline

GET /factory-workers

List all factory workers with state and metrics

Authentication: Bearer token / API key

Responses:

  • 200: Worker states, task counts, CC slots, and throughput

GET /factory-workers/stats

Factory summary stats

Authentication: Bearer token / API key

Responses:

  • 200: Factory summary statistics

PATCH /factory-workers/config

Update factory worker count and concurrency config

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
worker_countintegerNo
max_concurrentintegerNo

Responses:

  • 200: Config updated

GET /factory-workers/health-summary

Factory health summary with launchctl status

Authentication: Bearer token / API key

Responses:

  • 200: Health status with worker PIDs and alerts

Billing

Billing, costs, invoices, and Stripe integration

GET /billing/overview

OS billing dashboard (MRR, infra spend, AI costs)

Authentication: Bearer token / API key

Responses:

  • 200: Billing overview with MRR by product, infrastructure and AI spend

GET /billing/subscription

Get current user subscription

Authentication: Bearer token / API key

Responses:

  • 200: Current subscription details
  • 404: No subscription found

POST /billing/checkout

Create Stripe checkout session for plan purchase

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
tierstringYesExample: undefined

Responses:

  • 200: Checkout session created

POST /billing/portal

Create Stripe customer portal session

Authentication: Bearer token / API key

Responses:

  • 200: Portal session URL

POST /billing/create-payment-intent

Create payment intent for one-time token purchase

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
package_slugstringYes
idempotency_keystringNo

Responses:

  • 200: Payment intent created

POST /billing/webhook

Stripe webhook handler

Authentication: None

Responses:

  • 200: Webhook processed

GET /billing/usage

Get current usage stats and limits

Authentication: Bearer token / API key

Responses:

  • 200: Current period usage, subscription tier, and limits
  • 404: No subscription or usage data found

GET /billing/tiers

List available subscription tiers

Authentication: None

Responses:


GET /billing/pricing

Public pricing strategy (tiers, token packages, economics)

Authentication: None

Responses:

  • 200: Full pricing strategy

POST /billing/change-plan

Upgrade or downgrade subscription plan

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
tierstringYesExample: undefined

Responses:

  • 200: Plan changed or checkout session created
  • 422: Usage exceeds target tier limits

GET /billing/plan-summary

Full plan limits and current usage summary

Authentication: Bearer token / API key

Responses:

  • 200: Plan limits with current usage

POST /billing/validate-downgrade

Check if downgrade to target tier is possible

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
tierstringYes

Responses:

  • 200: Validation result with violations if any

GET /billing/auto-topup

Get auto top-up configuration

Authentication: Bearer token / API key

Responses:

  • 200: Auto top-up config with available packages

POST /billing/auto-topup

Configure auto top-up (initial setup)

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
threshold_tokensintegerYesExample: undefined
package_idstringYesExample: undefined
enabledbooleanNo
max_monthly_topupsintegerNo
stripe_payment_method_idstringNoExample: undefined

Responses:

  • 201: Auto top-up configured
  • 400: Missing or invalid parameters
  • 409: Auto top-up already configured for this tenant

PUT /billing/auto-topup

Update auto top-up configuration

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
enabledbooleanNo
package_slugstringNo
threshold_tokensintegerNo
max_monthly_topupsintegerNo
stripe_payment_method_idstringNo

Responses:

  • 200: Updated configuration

GET /billing/credit-auto-topup

Get credit auto top-up configuration

Authentication: Bearer token / API key

Responses:

  • 200: Credit auto top-up config with available packages

POST /billing/credit-auto-topup

Configure credit auto top-up (initial setup)

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
threshold_centsintegerYesExample: undefined
package_slugstringYesExample: undefined
enabledbooleanNo
max_monthly_topupsintegerNo
stripe_payment_method_idstringNoExample: undefined

Responses:

  • 201: Credit auto top-up configured
  • 400: Missing or invalid parameters
  • 409: Credit auto top-up already configured for this user

PUT /billing/credit-auto-topup

Update credit auto top-up configuration

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
enabledbooleanNo
package_slugstringNo
threshold_centsintegerNo
max_monthly_topupsintegerNo
stripe_payment_method_idstringNo

Responses:

  • 200: Updated configuration

Notifications

Notification delivery and templates

GET /notifications

List notifications

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
readquerytrue | falseNo
typequeryinfo | warning | error | successNo
limitqueryintegerNo
offsetqueryintegerNo

Responses:


POST /notifications

Create a notification

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
titlestringYes
messagestringYes
typeinfo | warning | error | successNo
sourcestringNo
linkstringNo

Responses:


GET /notifications/unread-count

Get unread notification count

Authentication: Bearer token / API key

Responses:

  • 200: Unread count

PATCH /notifications/read-all

Mark all notifications as read

Authentication: Bearer token / API key

Responses:


Queue

POST /bull-queue/submit

Submit a job to a BullMQ queue

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
queuestringYesExample: undefined
namestringYesExample: undefined
dataobjectYesExample: undefined
priorityintegerNoExample: undefined
attemptsintegerNoExample: undefined
backoffobjectNo
delayintegerNoExample: undefined
job_idstringNoExample: undefined

Responses:

  • 201: Job submitted
  • 400: Missing required fields
  • 503: BullMQ not available

POST /bull-queue/submit-scheduled

Submit a scheduled or recurring job

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
queuestringYes
namestringYes
dataobjectYes
delayintegerNoExample: undefined
repeatstringNoExample: undefined
everyintegerNoExample: undefined

Responses:

  • 201: Scheduled job submitted

GET /bull-queue/stats

Get BullMQ queue statistics

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
queuequerystringNoFilter by queue name (optional)

Responses:

  • 200: Queue statistics

GET /bull-queue/{queue}/jobs

List jobs from a BullMQ queue

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
queuepathstringYes
statusquerywaiting | active | completed | failed | delayed | paused | prioritizedNo
startqueryintegerNo
endqueryintegerNo

Responses:

  • 200: List of jobs

Public API

GET /v1/public/health

Public API health check

Authentication: None

Responses:

  • 200: API is healthy

GET /v1/public/tasks

List tasks

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo
statusquerystringNoFilter by status
priorityquerystringNoFilter by priority
assigned_toquerystringNoFilter by assignee
product_idqueryintegerNoFilter by product

Responses:

  • 200: Paginated task list
  • 401: Authentication required
  • 403: Insufficient scope

POST /v1/public/tasks

Create a task

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
titlestringYes
descriptionstringNo
typefeature | bug | research | ops | infra | content | otherNo
prioritylow | medium | high | criticalNo
statustodo | in_progress | review | done | blocked | cancelledNo
assigned_tostringNo
product_idintegerNo
max_duration_secondsintegerNo

Responses:

  • 201: Task created
  • 400: Validation error
  • 401: Authentication required
  • 403: Insufficient scope

GET /v1/public/tasks/{id}

Get a task by ID

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Task detail
  • 404: Task not found

PATCH /v1/public/tasks/{id}

Update a task

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
titlestringNo
descriptionstringNo
typestringNo
prioritystringNo
statusstringNo
assigned_tostringNo
product_idintegerNo
resolutionstringNo
max_duration_secondsintegerNo

Responses:

  • 200: Task updated
  • 404: Task not found

DELETE /v1/public/tasks/{id}

Archive a task (sets status to cancelled)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Task archived
  • 404: Task not found

GET /v1/public/agents

List agents

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo
statusquerystringNoFilter by status
rolequerystringNoFilter by role

Responses:

  • 200: Paginated agent list

POST /v1/public/agents

Create an agent

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
emojistringNo
rolestringYes
statusidle | working | blocked | offline | pausedNo
workspace_pathstringNo

Responses:

  • 201: Agent created
  • 400: Validation error

GET /v1/public/agents/{id}

Get an agent by ID

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Agent detail
  • 404: Agent not found

PATCH /v1/public/agents/{id}

Update an agent

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
emojistringNo
rolestringNo
statusidle | working | blocked | offline | pausedNo
current_taskstringNo
workspace_pathstringNo

Responses:

  • 200: Agent updated
  • 404: Agent not found

DELETE /v1/public/agents/{id}

Deactivate an agent (sets status to offline)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Agent deactivated
  • 404: Agent not found

GET /v1/public/templates

List agent templates

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
limitqueryintegerNo
offsetqueryintegerNo
categoryquerystringNoFilter by category
featuredquerybooleanNoOnly featured templates

Responses:

  • 200: Paginated template list

POST /v1/public/templates

Create an agent template

Authentication: Bearer token / API key

Request body (application/json):

FieldTypeRequiredDescription
namestringYes
slugstringYes
descriptionstringNo
iconstringNo
categorystringNo
modelstringNo
interval_secintegerNo
identitystringNo
toolsstring[]No
capabilitiesstring[]No
configobjectNo
is_featuredbooleanNo
sort_orderintegerNo

Responses:

  • 201: Template created
  • 400: Validation error
  • 409: Template slug already exists

GET /v1/public/templates/{id}

Get a template by ID

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Template detail
  • 404: Template not found

PATCH /v1/public/templates/{id}

Update a template

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Request body (application/json):

FieldTypeRequiredDescription
namestringNo
descriptionstringNo
iconstringNo
categorystringNo
modelstringNo
interval_secintegerNo
identitystringNo
toolsstring[]No
capabilitiesstring[]No
configobjectNo
is_featuredbooleanNo
sort_orderintegerNo

Responses:

  • 200: Template updated
  • 404: Template not found

DELETE /v1/public/templates/{id}

Archive a template (soft delete)

Authentication: Bearer token / API key

Parameters:

NameInTypeRequiredDescription
idpathintegerYes

Responses:

  • 200: Template archived
  • 404: Template not found

Schemas

Error

FieldTypeDescription
errorobject

ItemResponse

FieldTypeDescription
dataobject

ListResponse

FieldTypeDescription
dataobject[]
metaobject

SuccessResponse

FieldTypeDescription
dataobject
metaobject

DeletedResponse

FieldTypeDescription
dataobject
metaobject

Task

FieldTypeDescription
idintegerExample: 53430
titlestringExample: Implement OpenAPI docs
descriptionstring
statustodo | in_progress | review | done | blocked | cancelledExample: todo
priorityP0 | P1 | P2 | P3Example: P1
assigneestringExample: felix
productstringExample: assimetria-os
categorystring
tagsstring
estimated_minutesinteger
due_datestring
created_atstring
updated_atstring

Agent

FieldTypeDescription
idintegerExample: 1
namestringExample: felix
display_namestringExample: Felix
rolestringExample: engineer
statusactive | idle | offline | errorExample: active
modelstringExample: claude-sonnet-4-20250514
last_heartbeatstring
created_atstring

Product

FieldTypeDescription
idintegerExample: 1
namestringExample: UnoSend
slugstringExample: unosend
descriptionstring
statusidea | building | launched | archivedExample: building
domainstringExample: unosend.com
created_atstring
updated_atstring

User

FieldTypeDescription
idintegerExample: 1
usernamestringExample: rui
emailstringExample: r@assimetria.com
roleadmin | member | viewerExample: admin
avatar_urlstring
created_atstring

HealthResponse

FieldTypeDescription
statusok | errorExample: ok
versionstringExample: 1.1.5235
uptimeintegerProcess uptime in seconds Example: 86400
dbconnected | errorExample: connected
redisconnected | disconnected | not_configured | errorExample: connected

LoginRequest

FieldTypeDescription
emailstringExample: user@example.com
passwordstringExample: your-password

LoginResponse

FieldTypeDescription
successbooleanExample: true
tokenstringExample: eyJhbGciOiJIUzI1NiIs...
refresh_tokenstringExample: a1b2c3d4e5f6...
userUser