Endpoint
Overview
Delete one or more tasks from your task queue. This is useful for removing tasks that are no longer needed or clearing failed tasks that you don’t want to retry.Request Body
Array of task IDs to deleteAll tasks must belong to your organization and must have status
scheduled or failedResponse
Deletion result information
Error Cases
- 400 Bad Request: Attempting to delete tasks that are not in scheduled or failed status
- 404 Not Found: Some tasks don’t exist or don’t belong to your organization
- 400 Bad Request: No task IDs provided
When to Delete Tasks
Consider deleting tasks in these scenarios:- Scheduled tasks no longer needed - Plans changed, account was removed, etc.
- Failed tasks you don’t want to retry - Task configuration was incorrect
- Cleanup after testing - Remove test tasks from your queue
- Bulk task management - Clear out old or irrelevant tasks
Best Practices
Example: Cleanup Failed Tasks
Example: Cancel Scheduled Task
Cannot Delete Running or Completed Tasks
Status restrictions:
pendingtasks (currently running) cannot be deletedcompletetasks cannot be deleted
scheduled (not yet started) and failed tasks can be deleted.Comparison with Retry
| Action | Delete | Retry |
|---|---|---|
| Purpose | Permanently remove task | Re-execute failed task |
| Allowed statuses | scheduled, failed | failed only |
| Reversible? | No | No (but task runs again) |
| Use when | Don’t need the task | Want to try again |
