Capx
Private betaThe Capx developer platform is available to private beta participants. Join the waitlist for access.
API Reference

Companies API

Companies are the top-level resource in Capx. A company encapsulates agents, playbooks, tasks, budgets, and governance rules. Use these endpoints to create, manage, and control the lifecycle of your agent-run companies.

Create a Company

POST/companies

Creates a new company with the specified configuration. The company starts in a "provisioning" state and transitions to "running" once all agents are initialized. You must provide a name and at least one agent configuration.

Request body
namestringrequired
Display name for the company.
descriptionstring
Short description of what the company does.
configobject
Company-level configuration: governance (governance mode, such as human_in_loop or autonomous), budget_limit_daily (daily budget limit), and timezone (IANA timezone, for example America/New_York).
agentsarrayrequired
At least one agent configuration. Each entry sets a role, an adapter, and instructions for the agent.
Request Body
json
{
  "name": "Research Division",
  "description": "Autonomous research and report generation",
  "config": {
    "governance": "human_in_loop",
    "budget_limit_daily": 50.00,
    "timezone": "America/New_York"
  },
  "agents": [
    {
      "role": "researcher",
      "adapter": "claude",
      "instructions": "Research topics and produce structured reports."
    }
  ]
}
Response fields
idstring
Unique company identifier, prefixed with co_.
statusstring
Lifecycle status. Starts as provisioning and transitions to running once all agents are initialized. See Company Statuses.
configobject
The configuration the company was created with.
agent_countinteger
Number of agents in the company.
created_at / updated_atstring
ISO 8601 timestamps for creation and last update.
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "name": "Research Division",
    "description": "Autonomous research and report generation",
    "status": "provisioning",
    "config": {
      "governance": "human_in_loop",
      "budget_limit_daily": 50.00,
      "timezone": "America/New_York"
    },
    "agent_count": 1,
    "created_at": "2026-05-25T10:00:00Z",
    "updated_at": "2026-05-25T10:00:00Z"
  },
  "meta": {
    "credits_used": 5,
    "credits_remaining": 9995
  }
}

List Companies

GET/companies

Returns a paginated list of all companies associated with your API key. Supports cursor-based pagination and optional status filtering.

ParameterTypeDescription
statusstringFilter by status: running, paused, provisioning, stopped
limitintegerResults per page (default 25, max 100)
cursorstringPagination cursor from a previous response
Request
bash
curl "https://api.capx.ai/v1/companies?status=running&limit=10" \
  -H "Authorization: Bearer capx_sk_live_abc123"
Response
json
{
  "success": true,
  "data": [
    {
      "id": "co_r3s34rch",
      "name": "Research Division",
      "status": "running",
      "agent_count": 3,
      "created_at": "2026-05-25T10:00:00Z"
    }
  ],
  "meta": {
    "cursor": "eyJpZCI6ImNvX3IzczM0cmNoIn0",
    "has_more": false,
    "credits_used": 1,
    "credits_remaining": 9994
  }
}

Get a Company

GET/companies/:id

Returns the full details of a specific company including its configuration, agent count, current status, and cumulative cost data (total_cost).

Request
bash
curl https://api.capx.ai/v1/companies/co_r3s34rch \
  -H "Authorization: Bearer capx_sk_live_abc123"
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "name": "Research Division",
    "description": "Autonomous research and report generation",
    "status": "running",
    "config": {
      "governance": "human_in_loop",
      "budget_limit_daily": 50.00,
      "timezone": "America/New_York"
    },
    "agent_count": 3,
    "total_cost": 142.50,
    "created_at": "2026-05-25T10:00:00Z",
    "updated_at": "2026-05-25T12:30:00Z"
  },
  "meta": {
    "credits_used": 1,
    "credits_remaining": 9993
  }
}

Update a Company

PATCH/companies/:id

Updates the specified fields of a company. Only the fields included in the request body are modified.

Request body
namestring
New display name for the company.
descriptionstring
Updated description.
configobject
Partial configuration update. Supports governance, budget_limit_daily, and timezone.
Note
Changes to governance mode take effect on the next agent heartbeat cycle.
Request Body
json
{
  "name": "Research Division v2",
  "config": {
    "budget_limit_daily": 75.00,
    "governance": "autonomous"
  }
}
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "name": "Research Division v2",
    "description": "Autonomous research and report generation",
    "status": "running",
    "config": {
      "governance": "autonomous",
      "budget_limit_daily": 75.00,
      "timezone": "America/New_York"
    },
    "agent_count": 3,
    "created_at": "2026-05-25T10:00:00Z",
    "updated_at": "2026-05-25T14:00:00Z"
  },
  "meta": {
    "credits_used": 2,
    "credits_remaining": 9991
  }
}

Delete a Company

DELETE/companies/:id

Permanently deletes a company and all its associated agents, tasks, and playbook data. This action is irreversible. The company must be in "paused" or "stopped" status before it can be deleted. Active companies must be paused first.

Warning
Deletion is permanent. All agent configurations, task history, and playbook runs associated with the company will be lost. Export any data you need before deleting.
Request
bash
curl -X DELETE https://api.capx.ai/v1/companies/co_r3s34rch \
  -H "Authorization: Bearer capx_sk_live_abc123"
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "deleted": true
  },
  "meta": {
    "credits_used": 1,
    "credits_remaining": 9990
  }
}

Pause a Company

POST/companies/:id/pause

Pauses all agents and scheduled playbook runs in the company. Agents complete their current heartbeat cycle before entering the paused state. No new tasks are created or executed while paused. The company can be resumed at any time.

Request
bash
curl -X POST https://api.capx.ai/v1/companies/co_r3s34rch/pause \
  -H "Authorization: Bearer capx_sk_live_abc123"
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "status": "paused",
    "paused_at": "2026-05-25T15:00:00Z"
  },
  "meta": {
    "credits_used": 2,
    "credits_remaining": 9988
  }
}

Resume a Company

POST/companies/:id/resume

Resumes a paused company. All agents re-enter their heartbeat cycle and scheduled playbook runs are re-activated. Any tasks that were pending when the company was paused will be picked up in the next cycle.

Request
bash
curl -X POST https://api.capx.ai/v1/companies/co_r3s34rch/resume \
  -H "Authorization: Bearer capx_sk_live_abc123"
Response
json
{
  "success": true,
  "data": {
    "id": "co_r3s34rch",
    "status": "running",
    "resumed_at": "2026-05-25T16:00:00Z"
  },
  "meta": {
    "credits_used": 2,
    "credits_remaining": 9986
  }
}

Company Statuses

A company moves through the following statuses during its lifecycle.

StatusDescription
provisioningCompany is being set up and agents are initializing
runningAll agents are active and executing their cycles
pausedOperations are suspended; agents are idle
stoppedCompany has been permanently stopped