API reference

API reference · Organizations

Rename a project or set its budgets and alert thresholds

PATCH/api/orgs/{id}/projects/{projectId}Signed in session

keys.manage; budgets and thresholds also need members.budget. budgetMicros or dailyBudgetMicros null clears that ceiling. A request on one of the project's keys is refused (429 policy_exceeded) once its settled spend and holds reach either ceiling, and a hold that would pass one is never placed. At most five thresholds.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredintegerThe crew's id.
projectId (path)requiredintegerThe project's id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
namestring
budgetMicrosinteger or null
dailyBudgetMicrosinteger or null
alertPctsarray of integer or null

Example

{
  "name": "string",
  "budgetMicros": 0,
  "dailyBudgetMicros": 0,
  "alertPcts": [
    0
  ]
}

Answer 200

Changed.

Fields of the 200 answer
FieldTypeWhat it is
projectobject
project.idinteger
project.namestring
project.budgetMicrosinteger or null
project.dailyBudgetMicrosinteger or nullThe ceiling for one UTC day; null is none.
project.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.
project.createdAtinteger
project.archivedAtinteger or null
project.keyIdsarray of integer
project.spentMonthMicrosintegerThis UTC month's settled spend and holds. Billing readers only.
project.spentTodayMicrosintegerThis UTC day's settled spend and holds. Billing readers only.

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.
  • 409OpenAI 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