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
await client.FileRequests.DeleteFileRequestByIdAsync(fileRequestId: updatedFileRequest.Id);
Swift Gen (Beta)
try await client.fileRequests.deleteFileRequestById(fileRequestId: updatedFileRequest.id)
Java
BoxFileRequest fileRequest = new BoxFileRequest(api, "id");
fileRequest.delete();
Python
file_request = client.file_request(file_request_id='123456')
file_request.delete()
.NET
bool isSuccess = await client.FileRequestsManager.DeleteFileRequestAsync("12345");
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")
}