Delete a task
Delete a task
To remove a task, call the DELETE /tasks/:task_id
API
with the id
of the task.
cURL
curl -i -X DELETE "https://api.box.com/2.0/tasks/12345" \
-H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.tasks.deleteTaskById(task.id!);
Python Gen
client.tasks.delete_task_by_id(task.id)
.NET Gen
await client.Tasks.DeleteTaskByIdAsync(taskId: NullableUtils.Unwrap(task.Id));
Java
BoxTask task = new BoxTask(api, "id");
task.delete();
Python
client.client.task('12345').delete()
print('The task was successfully delete!')
.NET
await client.TasksManager.DeleteTaskAsync("11111");
Node
client.tasks.delete('11111')
.then(() => {
// deletion succeeded — no value returned
});