companies resource is the root of every other resource.
Teams, agents, tasks, budgets, and audit events all hang off a
company.
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /v1/companies | List companies |
POST | /v1/companies | Create a company |
GET | /v1/companies/{id} | Get one company |
PATCH | /v1/companies/{id} | Update a company |
POST | /v1/companies/{id}/archive | Archive (soft delete) |
POST | /v1/companies/{id}/restore | Restore an archived company |
DELETE | /v1/companies/{id} | Hard delete (admin only) |
The company object
slug— URL-safe identifier, unique per instancedefaultAdapter— which adapter newly hired agents default tofiscalPeriod—daily,weekly,monthly, orquarterlybudget— top-line budget for the current period, including the reserve splitteamCount/agentCount— denormalized counts, updated on every team/agent changestatus—active,archived, ordeleting
List companies
status— filter byactive(default) orarchivedcursor— pagination cursor from a previous responselimit— page size (1 to 200, default 50)
Create a company
startingTeams field is optional. If provided, the response
includes the created teams and an initial set of empty agent
slots.
Errors:
slug_in_use— another company has the same slugbudget_invalid— reserve percent out of range, or USD less than zeroadapter_not_installed— the default adapter is not on this instance
Get a company
?include=teams,agents to
embed nested objects in the response:
teams, agents, workflows, budgets.
Update a company
id, slug, createdAt, and
teamCount/agentCount. To rename a company’s slug, you have
to archive it and create a new one; slugs are permanent.
Archive and restore
Archive is a soft delete. The company is hidden from default lists, its agents stop accepting new tasks, and its runtime services are torn down. Archived companies keep their data for at least 30 days.Hard delete
admin scope. Hard delete removes the company and
all its data from the database. The workspaces directory on
disk is also cleaned up. This is irreversible.
Webhooks
Companies emit these events:| Event | When |
|---|---|
company.created | A company is created |
company.updated | Any PATCH |
company.archived | Company is archived |
company.restored | Company is restored |
company.deleted | Company is hard deleted |
company.budget.breach | Any breach on the company-level budget |
Next
- Agents — next resource after creating a company
- Goals and projects — planning layer for work inside a company
- Costs — where the company-level cost roll-ups live