API reference

API reference · Organizations

A crew's projects

GET/api/orgs/{id}/projectsSigned in session

Any member reads the projects and which keys are filed under each. This month's spend against each budget is in the answer only for roles with billing.view. Add ?archived=1 for archived projects too.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredintegerThe crew's id.
archived (query)string1 includes archived projects.

Answer 200

The projects.

Fields of the 200 answer
FieldTypeWhat it is
projectsarray of object
projects[].idinteger
projects[].namestring
projects[].budgetMicrosinteger or null
projects[].dailyBudgetMicrosinteger or nullThe ceiling for one UTC day; null is none.
projects[].alertPctsarray of integerWhole percents of either ceiling at which project.budget_threshold goes to the webhooks of everyone who reads the crew's money, once per month or day.
projects[].createdAtinteger
projects[].archivedAtinteger or null
projects[].keyIdsarray of integer
projects[].spentMonthMicrosintegerThis UTC month's settled spend and holds. Billing readers only.
projects[].spentTodayMicrosintegerThis UTC day's settled spend and holds. Billing readers only.
alertsarray of objectThe budget alerts sent this month; empty without billing.view.
alerts[].projectIdinteger
alerts[].periodstringm:YYYY-MM for the monthly ceiling, d:YYYY-MM-DD for the daily.
alerts[].pctinteger
alerts[].firedAtinteger
canManageboolean
canBudgetboolean
canSeeMoneyboolean

Errors

  • 401OpenAI shaped error.
  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter