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
string[]
required
Array of task IDs to deleteAll tasks must belong to your organization and must have status
scheduled or failedResponse
object
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
1
Fetch tasks
Use the Get Tasks endpoint to retrieve tasks and check their status
2
Filter eligible tasks
Filter out tasks with status
scheduled or failed3
Confirm deletion
Ensure you want to permanently delete these tasks
4
Delete tasks
Call the delete endpoint with the filtered task IDs
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.