DevelopersHow to connect an assistantKeys
Reference/Projects/Read

Preview a project's deletion

GEThttps://api.getwerk.ai/api/v1/projects/{projectId}/delete

What deleting the project would remove, and whether the key's person may delete it.

Only the owner may delete a project, and never My Werk. It refuses nobody: a person who may not delete reads canDelete false.

Authorization

AuthorizationheaderRequired

Authorization: Bearer <key> Authentication

Path parameters

projectIdstring, uuidRequired

The project's id.

Response

200 The preview.

canDeleteboolean

True when the key's person may delete the project now.

projectobject

The project.

Show properties of projectHide properties of project
projectIdstring, uuid

The project's id.

conversationIdstring, uuid or null

The id Werk's apps use for the key's person's view of the project.

namestring

The project's name.

memberCountinteger

How many people the project has.

At least 0
cardCountinteger

How many cards the project holds, which are deleted with it.

At least 0
graceDaysinteger

How many days a deleted project waits before it is gone for good; until then its owner can restore it.

At least 1
configVersioninteger

The project's settings version, which the delete request sends as expectedConfigVersion.

At least 1

Errors

400invalid_queryThe query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
401session_revokedThe request carries no session the server holds, or its session has ended.
401session_expiredThe session has expired.
404conversation_not_foundThe project the request names, or its chat, is not one the signed-in person is in.
404project_not_foundThe project the request names is not one the signed-in person can reach.
409session_changedThe session changed while the request was in flight.
rate_limitedMore requests of this kind were sent than Werk takes within the time it counts them over.
500server_errorThe server could not complete the request, and it is not known whether a write it holds was made.
curl
curl "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/delete" \
  -H "Authorization: Bearer wk_key_..."
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/delete", {
  headers: {
    Authorization: "Bearer wk_key_...",
  },
});
const answer = await res.json();
200JSON
{
  "canDelete": true,
  "project": {
    "projectId": "2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73",
    "conversationId": "9e3b1c75-4f2a-4d86-b0c9-5a7e2d1f8c36",
    "name": "Harbor Street kitchen",
    "memberCount": 3
  },
  "cardCount": 7,
  "graceDays": 30,
  "configVersion": 6
}