Company Plan

The company plan resource.

Basehttps://rest.carbon.ms/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.

GEThttps://rest.carbon.ms/companyPlan
curl --request GET \
  --url 'https://rest.carbon.ms/companyPlan?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "planId": "xyz789",
    "tasksLimit": 0,
    "aiTokensLimit": 0,
    "usersLimit": 0,
    "subscriptionStartDate": "2026-01-01T00:00:00Z",
    "stripeSubscriptionStatus": "string",
    "createdAt": "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}`.

GEThttps://rest.carbon.ms/companyPlan
curl --request GET \
  --url 'https://rest.carbon.ms/companyPlan?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "planId": "xyz789",
  "tasksLimit": 0,
  "aiTokensLimit": 0,
  "usersLimit": 0,
  "subscriptionStartDate": "2026-01-01T00:00:00Z",
  "stripeSubscriptionStatus": "string",
  "createdAt": "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
subscriptionStartDatetimestamprequired
stripeCustomerIdstring
stripeSubscriptionIdstring
stripeSubscriptionStatusstringrequired
trialPeriodEndsAttimestamp
POSThttps://rest.carbon.ms/companyPlan
curl --request POST \
  --url https://rest.carbon.ms/companyPlan \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"planId":"xyz789","tasksLimit":0,"aiTokensLimit":0,"usersLimit":0,"subscriptionStartDate":"2026-01-01T00:00:00Z","stripeSubscriptionStatus":"string"}'
Response
{
  "id": "abc123def456",
  "planId": "xyz789",
  "tasksLimit": 0,
  "aiTokensLimit": 0,
  "usersLimit": 0,
  "subscriptionStartDate": "2026-01-01T00:00:00Z",
  "stripeSubscriptionStatus": "string",
  "createdAt": "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
subscriptionStartDatetimestamprequired
stripeCustomerIdstring
stripeSubscriptionIdstring
stripeSubscriptionStatusstringrequired
trialPeriodEndsAttimestamp
PATCHhttps://rest.carbon.ms/companyPlan
curl --request PATCH \
  --url 'https://rest.carbon.ms/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,
  "subscriptionStartDate": "2026-01-01T00:00:00Z",
  "stripeSubscriptionStatus": "string",
  "createdAt": "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}`.

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