Delete a File Request

Delete a File Request

To delete a file request, all you need is its unique ID.

cURL
curl -i -X DELETE "https://api.box.com/2.0/file_requests/42037322" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.fileRequests.deleteFileRequestById(updatedFileRequest.id);
Python Gen
client.file_requests.delete_file_request_by_id(updated_file_request.id)
.NET Gen (Beta)
await client.FileRequests.DeleteFileRequestByIdAsync(fileRequestId: updatedFileRequest.Id);
Python
file_request = client.file_request(file_request_id='123456')
file_request.delete()
.NET
bool isSuccess = await client.FileRequestsManager.DeleteFileRequestAsync("12345");
Java
BoxFileRequest fileRequest = new BoxFileRequest(api, "id");
fileRequest.delete();
Node
client.fileRequests.delete('2484517969').then(() => console.log('Removed file request'));
iOS
client.fileRequests.delete(fileRequestId: "123456") { result in
    guard case .success = result else {
        print("Error removing file request")
        return
    }

    print("File request removed")
}

The ID of a file request can be determined by visiting the Box web app and inspecting the URL. Please check our guide on setting up a file request template to learn how to determine a file request ID.