Skip to content
campaiDeveloper
campai.com

Misc · Todo · Topics

DELETE/{organizationId}/misc/todo/topics/{topicId}

Delete todo topic

Deletes a todo topic for an organization. It takes organizationId, topicId, and an optional force flag that defaults to false. Without force, a topic with linked todos cannot be deleted; with force, cleanup of linked todos is queued. The mutation returns no body.

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 organization access.
  • The caller needs todoTopic.remove.
  • When force is true, the caller also needs todoItem.remove.

Request

Path parameters

  • organizationIdidrequired
  • topicIdidrequired

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/topics/YOUR_TOPIC_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

No response body is specified.

What else happens

  • The topic is deleted from todoTopics.
  • After the transaction, a misc.deleteTodoItems job is queued on DefaultQueue for the topic's todos.

Errors

Other errors

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

Errors nearly every request can meet are listed under Errors.