Delete a project (idempotent)
const url = 'https://example.com/v1/projects/example';const options = {method: 'DELETE', 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 DELETE \ --url https://example.com/v1/projects/example \ --header 'Authorization: Bearer <token>'The project is kept, not erased: from then on it’s gone from its get, the list and its memberships, nobody can reach what’s in it, its unfinished runs are cancelled, and its triggers skip their fires and deliveries. Its slugs stay its own, and so do its keys and its own service account (runAsProject), which reach nothing while it’s deleted. A workspace admin finds it at GET /v1/projects/deleted and brings it back as it was with POST /v1/projects/{projectId}/restore. Idempotent: an unknown or already-deleted project answers 204, and deleting it again keeps the time it was first deleted. The workspace’s default project can’t be deleted. A delete that changes something is recorded in the audit log, project-deleted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Deleted (or already deleted, or absent). No body.
Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}project-in-environment-order: the project is a member of an environment order, so it can’t be deleted — clear it from the order first. project-is-default: it’s the workspace’s default project, which can’t be deleted (details.projectId). Or 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
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”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
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”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.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/projects/{projectId}: Fetch a project by idPATCH /v1/projects/{projectId}: Partially update a projectPOST /v1/projects/{projectId}/restore: Restore a deleted projectGET /v1/projects/{projectId}/queue-rules: List a project's queue rules- Error code
authz-backend-unavailable - Error code
database-busy - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
project-in-environment-order - Error code
project-is-default - Error code
rate-limit-exceeded - Every error code