Partially update a project
const url = 'https://example.com/v1/projects/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example","description":"example","orgId":"example","sortEndUserCorrections":true,"everyoneCanRun":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/projects/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example", "description": "example", "orgId": "example", "sortEndUserCorrections": true, "everyoneCanRun": true }'A new slug, or a move to another org (orgId, or null for none), answers 409 slug-conflict when the slug is taken where the project ends up. A new slug also answers it when another project of the workspace had that slug before it was renamed, in any org (details.heldAs: 'old-slug'). The slug a rename leaves stays this project’s, in formerSlugs: no other project can take it, and this one can take it back, unless another project also had it before a rename.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ProjectId — opaque branded string.
Header Parameters
Section titled “Header Parameters”Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the workspace is their own request (from 0.1.5). Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1). A retry sent while the first request still runs is answered 409 idempotency-key-in-flight with Retry-After, on a runtime whose store holds keys (from 0.1.5); retry after it, and you get the first request’s answer. An answer that carries a secret (a new API key or public run token, a session token, a generated signing secret) isn’t kept: a retry gets 409 idempotency-key-replay-withheld, with the first request’s status and when it succeeded (from 0.1.5). A request whose key store can’t be read before it runs is answered 503 idempotency-store-unavailable with Retry-After: nothing ran, so retry with the same key (from 0.3.0).
Request Bodyrequired
Section titled “Request Bodyrequired”object
null explicitly re-assigns the project out of any org (cross-org). Naming it, even the current org, needs a tenant admin, as making a project in an org does.
Whether end users’ corrections are sorted like the others and count toward a schedule (the project’s sortEndUserCorrections). Admin on the project.
Whether everyone in the project’s workspace can run its agents and flows (the project’s everyoneCanRun). Existing projects and workspaces keep it false until a project admin turns it on. Admin on the project. A runtime enforcing authorization that can’t change the grant with it answers 501 authz-membership-unsupported, and nothing changes.
Examplegenerated
{ "name": "example", "slug": "example", "description": "example", "orgId": "example", "sortEndUserCorrections": true, "everyoneCanRun": true}Responses
Section titled “Responses”Updated. No body.
Malformed request body.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No admin on the project; or the body names orgId (even the current one) and the caller is not a tenant admin, as making a project in an org needs (permission-denied). Without an authorization store, key-project-mismatch (details.keyProjectId): the API key or session is limited to a project, and this writes above it, to the workspace, an org or a team (with a store, that is permission-denied).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Project-not-found: no project with that id under this workspace; or org-not-found: orgId names no org of the workspace (it never existed, or it was deleted).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}A reused Idempotency-Key with a different body; slug-conflict when the slug is taken where the project ends up, or another project of the workspace had it before it was renamed (details.heldAs: 'old-slug'); or project-in-environment-order — the project is a member of an environment order, so it can’t be moved to another parent (clear it from the order first).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Server error (unmapped domain code or framework crash).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}With authorization enforced, a runtime whose tenant-hierarchy binding can’t change everyoneCanRun together with its grant refuses with authz-membership-unsupported; nothing is changed.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The Idempotency-Key store couldn’t be read before the request ran (idempotency-store-unavailable), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}See also
GET /v1/projects/{projectId}: Fetch a project by idDELETE /v1/projects/{projectId}: Delete a project (idempotent)GET /v1/projects/{projectId}/queue-rules: List a project's queue rulesPOST /v1/projects/{projectId}/queue-rules: Create a queue rule- Projects, packs and values
- Kindgi 0.4.0
- Kindgi 0.6.0
- Error code
authz-membership-unsupported - Error code
idempotency-store-unavailable - Error code
key-project-mismatch - Error code
permission-denied - Error code
project-in-environment-order - Error code
request-too-large - Error code
slug-conflict - Every error code