Skip to main content
DELETE
Delete a task

Overview

Delete a task by its ID. This is a soft delete operation - the task is marked as deleted but not permanently removed from the database. Associated interactive notes will also be deleted. Use this endpoint to remove tasks that are no longer needed, clean up completed tasks, or manage task lifecycle.

Use Cases

  • Task Cleanup: Remove old or irrelevant tasks
  • Error Correction: Delete tasks created by mistake
  • Workflow Management: Remove tasks that are no longer applicable
  • Data Management: Clean up test or duplicate tasks
  • User Requests: Allow users to delete their own tasks
  • Automated Cleanup: Periodically delete old completed tasks

Authentication

This endpoint requires authentication using an API key. Include your API key in the request header:

Path Parameters

Response Structure

Returns a success status object:

Example Request

Example Response

Common Use Cases

1. Delete a Single Task

2. Delete with Confirmation

3. Bulk Delete Tasks

4. Delete Old Completed Tasks

5. Delete with UI Update

6. Delete with Undo Capability

7. Conditional Delete

Validation Rules

Task ID

  • Required: Yes (in URL path)
  • Format: Valid UUID
  • Note: Task must exist and belong to your organization

Error Responses

Common Error Examples

Important Notes

Soft Delete

  • Tasks are soft deleted, not permanently removed from the database
  • The task is marked as deleted but data is retained for audit purposes
  • Soft deleted tasks will not appear in normal queries
  • Database administrators may be able to recover soft deleted tasks

Associated Data

  • Interactive Notes: Any interactive notes associated with the task will also be deleted
  • Task Responsibles: Responsible user associations are removed
  • Contact/Customer Links: The task-to-contact/customer associations are removed
  • Audit Trail: Deletion is logged for compliance and auditing

Permissions

  • Users may need appropriate permissions to delete tasks
  • Some organizations may restrict deletion to task creators or administrators
  • Deleted tasks may trigger notifications to assigned users

Best Practices

  1. User Confirmation: Always ask for confirmation before deleting
  2. Permission Checks: Verify user has permission to delete the task
  3. Status Check: Consider only allowing deletion of completed or cancelled tasks
  4. Audit Logging: Log all deletions for compliance and troubleshooting
  5. UI Feedback: Provide clear feedback on successful/failed deletion
  6. Undo Capability: Consider implementing an undo feature
  7. Batch Operations: Use bulk delete for multiple tasks to reduce API calls
  8. Error Handling: Handle cases where task is already deleted or doesn’t exist

Performance Tips

  • Batch Deletion: Group multiple deletions to reduce API overhead
  • Optimistic UI: Remove from UI immediately, rollback on error
  • Background Processing: For bulk operations, consider background processing
  • Rate Limiting: Be mindful of rate limits when deleting many tasks

Alternatives to Deletion

Before deleting a task, consider these alternatives:
  • Archive Status: Move task to an “archived” or “cancelled” status instead
  • Hide from View: Filter out old tasks in the UI without deleting
  • Mark as Inactive: Use a custom status to indicate the task is no longer active
  • Export First: Export task data before deletion for records

Webhook Events

Deleting a task may trigger webhook events such as:
  • task.deleted - When a task is deleted
  • task.archived - If your system treats deletion as archival
Configure webhooks to receive real-time notifications of task deletions.

Recovery

Since this is a soft delete:
  • Contact support or your database administrator if you need to recover a deleted task
  • Implement your own recovery API if needed
  • Consider implementing a “trash” or “recently deleted” feature for user-initiated recovery

Path Parameters

id
string<uuid>
required

The UUID of the task to delete

Response

Task deleted successfully

status
string
Example:

"success"