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
| Field | Type | What it is |
|---|---|---|
| id (path)required | integer | The crew's id. |
| projectId (path)required | integer | The project's id. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| name | string | |
| budgetMicros | integer or null | |
| dailyBudgetMicros | integer or null | |
| alertPcts | array of integer or null |
Example
{
"name": "string",
"budgetMicros": 0,
"dailyBudgetMicros": 0,
"alertPcts": [
0
]
}Answer 200
Changed.
| Field | Type | What it is |
|---|---|---|
| project | object | |
| project. | integer | |
| project. | string | |
| project. | integer or null | |
| project. | integer or null | The ceiling for one UTC day; null is none. |
| project. | array of integer | Whole 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. | integer | |
| project. | integer or null | |
| project. | array of integer | |
| project. | integer | This UTC month's settled spend and holds. Billing readers only. |
| project. | integer | This 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.