Skip to content
Developers

REST API Reference.

Automate agents, tasks and workflows from your own systems. Every endpoint is scoped to your organization and checked against the key's role.

Authentication

Create an API key in Settings → API keys and send it as Authorization: Bearer ax_live_…. Keys act with the role you assign (never Owner). Browser sessions also work; cookie-authenticated writes must come from the same origin.

curl -X POST https://app.ainexusops.com/api/v1/tasks \
  -H "Authorization: Bearer $AINEXUSOPS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"<agent-uuid>","title":"Weekly expense review","instructions":"Flag unusual spend in the attached export","documentIds":["<doc-uuid>"]}'

Errors return { "error": { "code", "message", "recovery", "reference" } } with an HTTP status (401, 402 credits/plan, 403, 404, 409, 422, 429, 5xx). Rate limit: 600 requests/minute per key.

Authentication

POST/api/v1/auth/register—Create an account and organization (sets a session cookie).
POST/api/v1/auth/login—Sign in with email and password (sets a session cookie).
POST/api/v1/auth/logoutsessionRevoke the current session.

Agents

GET/api/v1/agentspublicMarketplace catalog and categories.
GET/api/v1/agents/:idpublicAgent details by id or slug.
POST/api/v1/agents/:id/subscribeagents.subscribeSubscribe ({interval}); returns checkoutUrl for paid agents.
POST/api/v1/agents/:id/activateagents.configureOptionally save configuration steps, then activate.
GET/api/v1/my-agentsagents.viewYour organization's agents and lifecycle status.

Conversations

GET/api/v1/conversationsagents.viewList conversations (?agentId, ?q).
POST/api/v1/conversationsagents.useStart a conversation {agentId, title?}.
GET/api/v1/conversations/:idagents.viewConversation with messages and artifacts.
POST/api/v1/conversations/:id/messagesagents.useSend {content, documentIds?}; returns the structured reply.
GET/api/v1/conversations/:id/export?format=md|jsonagents.viewExport a conversation.

Tasks & approvals

GET/api/v1/taskstasks.viewList tasks (?status, ?agentId).
POST/api/v1/taskstasks.createCreate {agentId, title, instructions, documentIds?, priority?} — runs asynchronously (202).
GET/api/v1/tasks/:idtasks.viewTask with steps, logs, artifacts and approvals.
DELETE/api/v1/tasks/:idtasks.viewCancel a task.
GET/api/v1/approvalstasks.viewList approvals (?status).
POST/api/v1/approvals/:id/decisionapprovals.decide{decision: approve|reject, note?, editedArgs?}.

Workflows

GET/api/v1/workflowsworkflows.viewList workflows.
POST/api/v1/workflowsworkflows.editCreate {name, trigger, nodes, edges}.
GET/api/v1/workflows/:id/runsworkflows.viewRecent runs with traces.
POST/api/v1/workflows/:id/runsworkflows.runStart a run {input?}.
POST/api/v1/hooks/workflows/:id?token=webhook tokenWebhook trigger (JSON body becomes {{input}}).

Documents, integrations, usage

GET/api/v1/documentsdocuments.viewList documents (?q, ?tag).
POST/api/v1/documentsdocuments.uploadUpload multipart field “file” (+ tags, folderId, agentAccess).
GET/api/v1/documents/:id/downloaddocuments.viewDownload the original file.
GET/api/v1/integrationsintegrations.viewIntegrations and connection status.
GET/api/v1/usage?days=30usage.viewCredits, tokens and executions.
GET/api/v1/billingbilling.viewPlan, credits, invoices.
GET/api/v1/notificationsany memberNotifications (?unread=1).
GET/api/v1/reports/exportreports.exportCSV or PDF export (?format, ?kind, ?days).