# Update an existing document or media file on the MDM server To Modify documents ## Endpoint `PUT /api/v1/mdm/docs/{doc_id}` ## Request ### Request URL `https://{serverurl}/api/v1/mdm/docs/{doc_id}` Server URL: [{serverurl}](https://www.manageengine.com/mobile-device-management/help/api/cloud/oauth-authentication-endpoint-domain.html) ### Scope `MDMOnDemand.MDMDeviceMgmt.UPDATE` ### Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ### Request Parameters #### Request Headers - **Content-Type** `string` — **Mandatory** — `application/json` - **Accept** `string` — **Mandatory** — `application/json` #### Path Parameters - **doc_id** `string` — **Mandatory** Unique identifier of the document. Obtain from the [Upload Content](https://www.manageengine.com/mobile-device-management/help/api/cloud/content-management-create-content-list.html) or [Get Content List](https://www.manageengine.com/mobile-device-management/help/api/cloud/content-management-get-content-list.html) response. #### Request Body `application/json` - `tags` `array` — Optional Array of tag IDs to classify the content. - `description` `string` — Optional Updated content description for the document or media file. - `file_id` `long` — **Mandatory** File ID of the replacement document or media file. Upload the file using [Upload File](https://www.manageengine.com/mobile-device-management/help/api/cloud/files-upload-file-ems.html) with MDM_CONTENT_MGMT module. ### Sample Request ```curl curl --request PUT \ --url https://appdomain/api/v1/mdm/docs/{doc_id} \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"file_id":9007199254741080}' ``` ### Sample Request Body Update content with new tags, description, and file ```json { "file_id": 9007199254741080, "description": "Updated document description", "tags": [ 9007199254741088, 9007199254741088 ] } ``` ## Response ### HTTP Code 200 Response Body — `application/json` - `doc_id` `long` A unique identifier for the document or media. - `doc_name` `string` Name of the document or media. - `added_time` `long` Epoch timestamp (milliseconds) when the document or media was added to the MDM server. - `updated_time` `long` Epoch timestamp (milliseconds) when the document or media was last modified. - `last_modified_by_name` `string` Name of the user who last modified the document or media. - `last_modified_by` `long` User ID of the user who last modified the document or media. - `created_by_name` `string` Name of the user who created the document or media. - `created_by` `long` User ID of the user who created the document or media. - `size` `long` Document or media size in bytes. - `doc_type` `integer` Content type identifier. - `repository_type` `integer` Repository from where the media or document is added. - `description` `string` Content description. ### Sample Response: HTTP 200 Content successfully updated on the MDM server ```json { "updated_time": 1714717200000, "added_time": 1714630800000, "size": 6855, "doc_name": "Zylker MDM", "description": "Updated document description", "last_modified_by": 9007199254741036, "doc_type": 4, "created_by_name": "admin", "doc_id": 9007199254741080, "last_modified_by_name": "admin", "created_by": 9007199254741036, "repository_type": 1 } ``` ### Possible Response Codes - `200` — HTTP code ## Rate Limits ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.