{"id":5035,"date":"2026-03-31T11:08:40","date_gmt":"2026-03-31T11:08:40","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/?page_id=5035"},"modified":"2026-04-01T04:38:08","modified_gmt":"2026-04-01T04:38:08","slug":"api-to-delete-files-from-amazon-s3","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/content-management\/api-to-delete-files-from-amazon-s3\/","title":{"rendered":"Delete files from Amazon S3"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h2>Delete Files<\/h2>\n<p>This endpoint permanently removes FileManagement rows from the Amazon S3 for given file IDs. This only applies to files that have successfully gone through the upload pipeline: <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/content-management\/api-to-generate-pre-signed-upload-url\/\" target=\"_blank\" rel=\"noopener noreferrer\">Generate Presigned Upload URL<\/a> -&gt; Uploading to Amazon S3 -&gt; <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/content-management\/api-to-verify-file-upload\/\" target=\"_blank\" rel=\"noopener noreferrer\">Verify File Upload<\/a>.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_39284756\" class=\"table table-bordered\" width=\"100%\">\n<thead>\n<tr>\n<th width=\"15%\"><strong>Argument<\/strong><\/th>\n<th width=\"12%\"><strong>Type<\/strong><\/th>\n<th width=\"30%\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>file_ids<\/td>\n<td>Array<\/td>\n<td>IDs of the files to be permanently deleted from the catalog<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"method-example\">\n<div class=\"curl-text\">curl<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\n<p>HTTP Request:<\/p>\n<pre class=\"lang:default decode:true\">POST https:\/\/<portal>.hexnodemdm.com\/api\/v1\/filemanagement\/delete-files\/\r\n\r\nheaders:-\r\nAuthorization: <api key>\r\nContent-Type: application\/json\r\nSample Post Data:-\r\n{  \r\n\"file_ids\": [101, 102]  \r\n}\r\n<\/pre>\n<p>Shell Command:<\/p>\n<pre class=\"lang:default decode:true\"> curl -H \"Authorization: <api key>\" -H \"Content-Type: application\/json\" -d '{\"file_ids\":[101, 102]}' https:\/\/<portal>.hexnodemdm.com\/api\/v1\/filemanagement\/delete-files\/\r\n<\/pre>\n<\/div>\n<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\n<p>HTTP Response:<\/p>\n<pre class=\"lang:default decode:true\">{ \r\n  \"message\": \"Files are Deleted Successfully\" \r\n}\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Delete Files This endpoint permanently removes FileManagement rows from the Amazon S3 for given file IDs. This only applies to files that have successfully gone through the upload pipeline: Generate Presigned Upload URL -&gt; Uploading to Amazon S3 -&gt; Verify File Upload. Argument Type Description file_ids Array IDs of the files to be permanently deleted [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":5031,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-5035","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/comments?post=5035"}],"version-history":[{"count":4,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5035\/revisions"}],"predecessor-version":[{"id":5055,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5035\/revisions\/5055"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5031"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=5035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}