Box Developer Documentation

Update a File Request

Update a File Request

To update some of the basic details for an existing file request, all you need is its unique ID.

cURL
curl -i -X PUT "https://api.box.com/2.0/file_requests/42037322" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -d '{
       "title": "Please upload required documents",
       "description": "Please upload required documents",
       "status": "active",
       "is_email_required": true,
       "is_description_required": false
     }'
TypeScript Gen
await client.fileRequests.updateFileRequestById(copiedFileRequest.id, {
  title: 'updated title',
  description: 'updated description',
} satisfies FileRequestUpdateRequest);
Python Gen
client.file_requests.update_file_request_by_id(
    copied_file_request.id, title="updated title", description="updated description"
)
.NET Gen
await client.FileRequests.UpdateFileRequestByIdAsync(fileRequestId: copiedFileRequest.Id, requestBody: new FileRequestUpdateRequest() { Title = "updated title", Description = "updated description" });
Swift Gen (Beta)
try await client.fileRequests.updateFileRequestById(fileRequestId: copiedFileRequest.id, requestBody: FileRequestUpdateRequest(title: "updated title", description: "updated description"))
Java
BoxFileRequest fileRequest = new BoxFileRequest(api, "id");
BoxFileRequest.Info fileRequestInfo = fileRequest.new Info();
fileRequestInfo.setDescription("Following documents are requested for your process");
fileRequestInfo.setIsDescriptionRequired(true);
fileRequestInfo.setStatus(BoxFileRequest.Status.ACTIVE);
fileRequestInfo = fileRequest.updateInfo(fileRequestInfo);
Python
from boxsdk.object.file_request import StatusState
update_data = {
    "description": 'Updated description', 
    "is_email_required": True,
    "status": StatusState.ACTIVE
}
file_request.update_info(data=update_data)
.NET
var updateRequest = new BoxFileRequestUpdateRequest
{
    Description = "New file request description",
    Status = BoxFileRequestStatus.inactive
};

BoxFileRequestObject fileRequest = await client.FileRequestsManager.UpdateFileRequestAsync("12345", updateRequest);
Node
client.fileRequests.update(fileRequestId, {
  title: 'Updated title'
}).then((r: FileRequest) => {
  // do something with the updated file request 
  console.log(r)
});
iOS
let updateRequest = FileRequestUpdateRequest(
    title: "Updated file request title",
    description: "Updated file request description",
    status: .inactive,
    isEmailRequired: false,
    isDescriptionRequired: true
)

client.fileRequests.update(fileRequestId: "123456", updateRequest: updateRequest) { result in
    guard case let .success(fileRequest) = result else {
        print("Error updating file request")
        return
    }
    
    print("Updated file request title: \(fileRequest.title ?? "n/a"), description: \(fileRequest.description ?? "n/a")")
}

For more details on the different fields that can be updated when creating a template, please see the reference documentation for the POST /file-requests/:id/update API.

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.