Upload files to the live response library

Applies to:


Some information in this article relates to prereleased product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Want to experience Microsoft Defender for Endpoint? Sign up for a free trial.


If you are a US Government customer, please use the URIs listed in Microsoft Defender for Endpoint for US Government customers.


For better performance, you can use server closer to your geo location:

  • api-us.securitycenter.microsoft.com
  • api-eu.securitycenter.microsoft.com
  • api-uk.securitycenter.microsoft.com
  • api-au.securitycenter.microsoft.com

API description

Upload file to live response library.


  1. File max size limitation is 20MB.

  2. Rate limitations for this API are 100 calls per minute and 1500 calls per hour.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Get started.

Permission type Permission Permission display name
Application Library.Manage Manage live response library
Delegated (work or school account) Library.Manage Manage live response library

HTTP request


POST https://api.securitycenter.microsoft.com/api/libraryfiles

Request headers

Name Type Description
Authorization String Bearer<token>. Required.
Content-Type string multipart/form-data. Required.

Request body

In the request body, supply a form-data object with the following parameters:

Parameter Type Description
File File content The file to be uploaded to live response library.Required
Description String Description of the file.
ParametersDescription String (Optional) Parameters required for the script to run. Default value is an empty string.
OverrideIfExists Boolean (Optional) Whether to override the file if it already exists. Default value is an empty string.


  • If successful, this method returns 200 - OK response code and the uploaded live response library entity in the response body.

  • If not successful: this method returns 400 - Bad Request. Bad request usually indicates incorrect body.



Here is an example of the request using curl.

curl -X POST https://api.securitycenter.microsoft.com/api/libraryfiles -H
"Authorization: Bearer \$token" -F "file=\@mdatp1.png" -F
-F "HasParameters=true" -F "OverrideIfExists=true" -F "Description=test


Do you want to learn more? Engage with the Microsoft Security community in our Tech Community: Microsoft Defender for Endpoint Tech Community.