{"id":5170,"date":"2026-06-18T10:42:02","date_gmt":"2026-06-18T10:42:02","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/?page_id=5170"},"modified":"2026-06-19T05:02:04","modified_gmt":"2026-06-19T05:02:04","slug":"initiate-automation-via-api","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/automations\/initiate-automation-via-api\/","title":{"rendered":"Initiate Automation"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h1>Initiate Automation<\/h1>\n<h2>Overview<\/h2>\n<p>This API executes an <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/help\/automate-device-management-tasks\/\" target=\"_blank\" rel=\"noopener noreferrer\">Automation<\/a> created in the Hexnode UEM console based on the provided automation profiles and target parameters.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_18293741\" 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>automationList<\/td>\n<td>Array<\/td>\n<td>A list of identifiers for the automation profiles you wish to run (e.g., [1, 2, 3, 4]). These IDs determine which specific configurations or policies will be applied.<\/td>\n<\/tr>\n<tr>\n<td>applyFilter<\/td>\n<td>Boolean<\/td>\n<td>A boolean value (true or false) that determines whether the system should cross-check and filter the provided device list against the target criteria before execution. Default value: false<\/td>\n<\/tr>\n<tr>\n<td>targets<\/td>\n<td>Dictionary<\/td>\n<td>Defines the scope of the deployment. See the target parameters below.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Note: Finding Automation Identifiers <\/strong><br \/>\nAutomation IDs can be retrieved using either of the following methods based on your preference: <\/p>\n<ul>\n<li><strong>Via the Console URL<\/strong>: Open the specific automation in the Hexnode Console. The identifier is the numeric value embedded in the browser URL (for example, the ID is 178 in https:\/\/<portal-name>.hexnodemdm.com\/deployments\/#\/178\/info\/). <\/li>\n<li><strong>Via the API<\/strong>: Execute a <a href=\"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/api-to-list-automations\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>List all Automations<\/strong><\/a> API call to retrieve all currently created automations in the Hexnode UEM console. The API response will include the IDs for each automation.<\/li>\n<\/ul>\n<h2>Target Parameters <\/h2>\n<p>The targets dictionary defines the scope of the deployment. You must provide a valid entry for at least one target type (devices, deviceGroups, users, userGroups, domains, or ou) within this dictionary to proceed.<\/p>\n<table id=\"table_18293742\" 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>devices<\/td>\n<td>Array<\/td>\n<td>A list of unique IDs for individual devices (e.g., [1, 2, 3, 4]).<\/td>\n<\/tr>\n<tr>\n<td>deviceGroups<\/td>\n<td>Array<\/td>\n<td>A list of IDs for specific device groups (e.g., [1, 2, 3, 4]).<\/td>\n<\/tr>\n<tr>\n<td>users<\/td>\n<td>Array<\/td>\n<td>A list of unique IDs for individual users (e.g., [1, 2, 3, 4]).<\/td>\n<\/tr>\n<tr>\n<td>userGroups<\/td>\n<td>Array<\/td>\n<td>A list of IDs for specific user groups (e.g., [1, 2, 3, 4]).<\/td>\n<\/tr>\n<tr>\n<td>domains<\/td>\n<td>Array<\/td>\n<td>A list of IDs for managed network domains (e.g., [1, 2, 3, 4]).<\/td>\n<\/tr>\n<tr>\n<td>ou<\/td>\n<td>Array<\/td>\n<td>A list of IDs for Organizational Units (OUs) (e.g., [1, 2, 3, 4]).<\/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\/automations\/run-now\/\r\nheaders:-\r\nAuthorization: <api key>\r\nContent-Type: application\/json\r\nSample Post Data:-\r\n{   \r\n  \"automationList\": [1],    \r\n  \"applyFilter\": true,    \r\n  \"targets\": {   \r\n    \"devices\": [1, 2],    \r\n    \"deviceGroups\": [],    \r\n    \"users\": [],    \r\n    \"userGroups\": [],    \r\n    \"domains\": [],    \r\n    \"ou\": []   \r\n  }   \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 '{\"automationList\": [1,2,3,4,5], \"applyFilter\": false, \"targets\": {\"devices\": [], \"deviceGroups\": [], \"users\": [], \"userGroups\": [], \"domains\": [], \"ou\": []}}' https:\/\/<portal>.hexnodemdm.com\/api\/v1\/automations\/run-now\/\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\": \"Automation execution initiated\",    \r\n  \"profiles\": [1]   \r\n}\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Initiate Automation Overview This API executes an Automation created in the Hexnode UEM console based on the provided automation profiles and target parameters. Argument Type Description automationList Array A list of identifiers for the automation profiles you wish to run (e.g., [1, 2, 3, 4]). These IDs determine which specific configurations or policies will be [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":5185,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-5170","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5170","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=5170"}],"version-history":[{"count":4,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5170\/revisions"}],"predecessor-version":[{"id":5184,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5170\/revisions\/5184"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/5185"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=5170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}