Latest version

Remove task

delete
https://api.box.com/2.0
/tasks/:task_id

Removes a task from a file.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The ID of the task.

Response

none

Returns an empty response when the task was successfully deleted.

application/jsonClient error

Returns an error when the task could not be found or the user does not have access to the file the task is assigned to.

application/jsonClient error

An unexpected client error.

delete
Remove task
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

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));
Swift Gen (Beta)
try await client.tasks.deleteTaskById(taskId: 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
	});