Update a project
PATCH/v1/projects/:project_id
Rename or archive a project, and/or change its content-retention settings (trace_content_retention_days, trace_content_mode), its execution ceilings (max_concurrent_runs, max_chain_generations, max_orchestration_run_depth), its priced-model gate (require_priced_model), its project-scope guardrails (guardrail_ids) and managed conversion (managed_conversion). Archiving is reversible; resources are retained.
Requires the admin role in the project (an owner has it too). These are the terms every member works under, which is why setting them sits above the role that works under them.
The ceilings and the priced-model gate are uncapped by plan: each one only ever narrows what the project may spend, so setting one takes on a restriction rather than claiming an entitlement. On the three ceilings null clears the project's own bound and omission leaves it alone — they are different instructions.
guardrail_ids is the floor under every tool call by every agent in the project, including tools added later. The list is replaced wholesale, so send the ids you want to keep; [] detaches every one. An id naming no guardrail in the project responds 400 with guardrail_not_found, whose details.missing lists the ids. It is uncapped by plan, like the ceilings: a guardrail can only tighten what runs.
The two retention controls answer different questions. The window bounds how long content stays — a daily sweep purges anything past it, leaving auditable skeletons behind. trace_content_mode: none means content is never written, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
Your plan sets the longest window you may keep content for. A wider one — null included, which keeps content indefinitely — responds 403 with plan_limit_reached, whose details carry the plan and the limit in days. Anything shorter is always allowed. Moving to a plan with a shorter window takes effect at the end of the billing cycle, and content already stored is then purged by age like everything else.
Request
Responses
- 200
- 400
- 401
- 403
- 404
Project updated.
A malformed field, or guardrail_not_found for a guardrail_ids entry naming no guardrail in the project.
Missing or invalid credentials.
The credential is scoped to a different project, or the caller's role in the project does not carry this action.
The resource does not exist (existence is not leaked).