Skip to content

Company Plan

The company plan resource.

Base/companyPlan
GET/companyPlan

List company plans

Retrieve a paginated list of company plans. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/companyPlan
curl --request GET \
  --url '<your-host>/companyPlan?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "planId": "xyz789",
    "tasksLimit": 0,
    "aiTokensLimit": 0,
    "usersLimit": 0,
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-01T00:00:00Z"
  }
]
GET/companyPlan

Retrieve a company plan

Fetch a single company plan by filtering on `id`.

Query parameters

idstring

Match on the company plan's `id`, e.g. `eq.{id}`.

GET/companyPlan
curl --request GET \
  --url '<your-host>/companyPlan?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "planId": "xyz789",
  "tasksLimit": 0,
  "aiTokensLimit": 0,
  "usersLimit": 0,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
POST/companyPlan

Create a company plan

Create a new company plan.

Body parameters

planIdstringrequired

References plan.id

tasksLimitnumberrequired
aiTokensLimitnumberrequired
usersLimitnumberrequired
POST/companyPlan
curl --request POST \
  --url <your-host>/companyPlan \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"planId":"xyz789","tasksLimit":0,"aiTokensLimit":0,"usersLimit":0}'
Response
{
  "id": "abc123def456",
  "planId": "xyz789",
  "tasksLimit": 0,
  "aiTokensLimit": 0,
  "usersLimit": 0,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
PATCH/companyPlan

Update a company plan

Update an existing company plan, matched on `id`.

Body parameters

planIdstringrequired

References plan.id

tasksLimitnumberrequired
aiTokensLimitnumberrequired
usersLimitnumberrequired
PATCH/companyPlan
curl --request PATCH \
  --url '<your-host>/companyPlan?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"planId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "planId": "xyz789",
  "tasksLimit": 0,
  "aiTokensLimit": 0,
  "usersLimit": 0,
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z"
}
DELETE/companyPlan

Delete a company plan

Delete a company plan, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the company plan to delete, e.g. `eq.{id}`.

DELETE/companyPlan
curl --request DELETE \
  --url '<your-host>/companyPlan?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content