Skip to content
campaiDeveloper
campai.com

Misc · Todo · Projects

DELETE/{organizationId}/misc/todo/projects/{projectId}

Delete todo project

Deletes a todo project identified by organizationId and projectId. By default, deletion is blocked if the project has linked todos; set force to true to delete the project and queue cleanup of its linked todos. The endpoint returns no content.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have access to the organization.
  • The caller needs the todoProject.remove permission.
  • When force is true, the caller also needs the todoItem.remove permission.

Request

Path parameters

  • organizationIdidrequired
  • projectIdidrequired

Query parameters

  • forceboolean

    default false

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request DELETE 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/todo/projects/YOUR_PROJECT_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

No response body is specified.

What else happens

  • Deletes the project from todoProjects when the checks pass.
  • Queues a misc.deleteTodoItems job on DefaultQueue after the transaction to clean up todos linked to the project.

Errors

Other errors

StatusErrorWhen
404The todo project was not foundIf the project is not found in the organization, the endpoint returns NOT_FOUND (404) with key routes.misc.todo.projects.notFound.
409This project has linked todos. Use force deletion to delete the project and its todos, or archive the project to keep them.If the project has linked todos and force is false, the endpoint returns CONFLICT (409) with key routes.misc.todo.projects.inUse.

Errors nearly every request can meet are listed under Errors.