Restore a deleted project
const url = 'https://example.com/v1/projects/example/restore';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/projects/example/restore \ --header 'Authorization: Bearer <token>'Brings a deleted project back as it was: its members, team grants, keys, own service account and slugs, and its triggers’ next fires run. Fires and deliveries that came due while it was deleted were skipped, and runs cancelled at the delete stay cancelled. Its updatedAt moves to the restore. A live project answers 200, unchanged. A deleted project doesn’t count against the workspace’s limit on projects in production, so restoring one that’s in production counts it again: at the limit, the restore is refused (403 production-limit-reached) and the project stays deleted. Needs admin on the workspace: roles on a deleted project reach nothing, its own admins’ included. Restoring a deleted project is recorded in the audit log, project-restored.
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).
Responses
Section titled “Responses”The project, live again.
object
ProjectId — opaque branded string.
When the project was put in production; absent while it isn’t. A run in a project in production is a production run, and a run anywhere else is staging.
The slugs this project had before it was renamed, newest first, and empty when it never was. No other project of the workspace can take them, in any org, while this project exists, deleted or not. Absent from a runtime that doesn’t keep them.
true: end users’ corrections (an app’s, with a participantId, and not an expert’s) are sorted like the others when they’re saved, and a schedule counting everyone’s corrections counts them. false (the default): they’re listed and become test cases, but stay open and unsorted, and never start Improve.
true: everyone in the project’s workspace can run this project’s agents and flows without a role of their own; service accounts aren’t included. That reads nothing more than running takes: the project, its agents and flows with their versions (an agent’s owner by id alone), and each person’s own runs, conversations and schedules. false: only people given a role. A new project has it unless its creator turns it off; existing projects and workspaces keep it false until a project admin turns it on. Absent from an older server.
The company-wide GitHub connection the project opens its block changes’ pull requests through; absent while none is set. A connection removed since reads as none.
Examplegenerated
{ "id": "example", "tenantId": "example", "orgId": "example", "name": "example", "slug": "example", "isDefault": true, "description": "example", "productionSince": "2026-04-15T12:00:00Z", "formerSlugs": [ "example" ], "sortEndUserCorrections": true, "everyoneCanRun": true, "repoConnectionId": "example", "createdAt": "example", "updatedAt": "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 workspace (permission-denied); or the project is in production and the workspace’s projects in production are at its limit (production-limit-reached, details.limit projects-in-production, details.projectsInProduction the limit, details.inProduction the count, details.projectId): it stays deleted until one is taken out of production. 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, live or deleted, with that id under this workspace.
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" }}idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
project-restore-unsupported: this runtime’s project binding can’t restore a deleted project.
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 (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was 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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
See also
GET /v1/projects/{projectId}: Fetch a project by idPATCH /v1/projects/{projectId}: Partially update a projectDELETE /v1/projects/{projectId}: Delete a project (idempotent)GET /v1/projects/{projectId}/queue-rules: List a project's queue rules- Organize work by org and project
- Kindgi 0.7.0
- Error code
authz-backend-unavailable - Error code
database-busy - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
key-project-mismatch - Error code
permission-denied - Error code
production-limit-reached - Error code
project-not-found - Error code
project-restore-unsupported - Error code
rate-limit-exceeded - Error code
tenant-state-unavailable - Every error code