Box Developer Documentation
Latest version

Remove task

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

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

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

Learn more about Box SDK versionig strategy.


cURL
curl -i -X DELETE "https://api.box.com/2.0/tasks/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.tasks.deleteTaskById(task.id!);
Python v10
client.tasks.delete_task_by_id(task.id)
.NET v10
await client.Tasks.DeleteTaskByIdAsync(taskId: NullableUtils.Unwrap(task.Id));
Swift v10
try await client.tasks.deleteTaskById(taskId: task.id!)
Java v10
client.getTasks().deleteTaskById(task.getId())
Java v4
BoxTask task = new BoxTask(api, "id");
task.delete();
Python v3
client.client.task('12345').delete()
print('The task was successfully delete!')
.NET v5
await client.TasksManager.DeleteTaskAsync("11111");
Node v3
client.tasks.delete('11111')
	.then(() => {
		// deletion succeeded — no value returned
	});