Company Plan
The company plan resource.
Basehttps://rest.carbon.ms/companyPlan
GET
/companyPlanList company plans
Retrieve a paginated list of company plans. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows 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
/companyPlanRetrieve a company plan
Fetch a single company plan by filtering on `id`.
Query parameters
idstringMatch 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
/companyPlanCreate a company plan
Create a new company plan.
Body parameters
planIdstringrequiredReferences plan.id
tasksLimitnumberrequiredaiTokensLimitnumberrequiredusersLimitnumberrequiredsubscriptionStartDatetimestamprequiredstripeCustomerIdstringstripeSubscriptionIdstringstripeSubscriptionStatusstringrequiredtrialPeriodEndsAttimestampPOSThttps://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
/companyPlanUpdate a company plan
Update an existing company plan, matched on `id`.
Body parameters
planIdstringrequiredReferences plan.id
tasksLimitnumberrequiredaiTokensLimitnumberrequiredusersLimitnumberrequiredsubscriptionStartDatetimestamprequiredstripeCustomerIdstringstripeSubscriptionIdstringstripeSubscriptionStatusstringrequiredtrialPeriodEndsAttimestampPATCHhttps://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
/companyPlanDelete a company plan
Delete a company plan, matched on `id`. Returns 204 No Content.
Query parameters
idstringThe `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