# 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://{server-hostname}:8383/api/v1/mdm/docs/{doc_id}` ### Scope `MDMDeviceMgmt.UPDATE` ### Header `Authorization: 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/products/desktop-central/help/api/onpremise/content-management-create-content-list.html) or [Get Content List](https://www.manageengine.com/products/desktop-central/help/api/onpremise/content-management-get-content-list.html) response. #### Request Body `application/json` JSON Object: - **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/products/desktop-central/help/api/onpremise/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: d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{"file_id":9007199254741080,"description":"Updated document description","tags":[9007199254741088,9007199254741088]}' ``` ### Sample Request Body Update content with new tags, description, and file ```json { "file_id": 9007199254741080, "description": "Updated document description", "tags": [ 9007199254741088, 9007199254741088 ] } ``` ## Response ### Response Parameters #### HTTP Code 200 Response Body — `application/json` JSON Object: - **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. ### Possible Response Codes - **200** (`HTTP code`) ### 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 } ``` ![](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.