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
/companiesCreates 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.
namestringrequireddescriptionstringconfigobjectgovernance (governance mode, such as human_in_loop or autonomous), budget_limit_daily (daily budget limit), and timezone (IANA timezone, for example America/New_York).agentsarrayrequiredrole, an adapter, and instructions for the agent.{
"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."
}
]
}idstringco_.statusstringprovisioning and transitions to running once all agents are initialized. See Company Statuses.configobjectagent_countintegercreated_at / updated_atstring{
"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
/companiesReturns a paginated list of all companies associated with your API key. Supports cursor-based pagination and optional status filtering.
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by status: running, paused, provisioning, stopped |
| limit | integer | Results per page (default 25, max 100) |
| cursor | string | Pagination cursor from a previous response |
curl "https://api.capx.ai/v1/companies?status=running&limit=10" \ -H "Authorization: Bearer capx_sk_live_abc123"
{
"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
/companies/:idReturns the full details of a specific company including its configuration, agent count, current status, and cumulative cost data (total_cost).
curl https://api.capx.ai/v1/companies/co_r3s34rch \ -H "Authorization: Bearer capx_sk_live_abc123"
{
"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
/companies/:idUpdates the specified fields of a company. Only the fields included in the request body are modified.
namestringdescriptionstringconfigobjectgovernance, budget_limit_daily, and timezone.{
"name": "Research Division v2",
"config": {
"budget_limit_daily": 75.00,
"governance": "autonomous"
}
}{
"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
/companies/:idPermanently 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.
curl -X DELETE https://api.capx.ai/v1/companies/co_r3s34rch \ -H "Authorization: Bearer capx_sk_live_abc123"
{
"success": true,
"data": {
"id": "co_r3s34rch",
"deleted": true
},
"meta": {
"credits_used": 1,
"credits_remaining": 9990
}
}Pause a Company
/companies/:id/pausePauses 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.
curl -X POST https://api.capx.ai/v1/companies/co_r3s34rch/pause \ -H "Authorization: Bearer capx_sk_live_abc123"
{
"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
/companies/:id/resumeResumes 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.
curl -X POST https://api.capx.ai/v1/companies/co_r3s34rch/resume \ -H "Authorization: Bearer capx_sk_live_abc123"
{
"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.
| Status | Description |
|---|---|
| provisioning | Company is being set up and agents are initializing |
| running | All agents are active and executing their cycles |
| paused | Operations are suspended; agents are idle |
| stopped | Company has been permanently stopped |
