{"id":4214,"date":"2020-12-15T06:50:04","date_gmt":"2020-12-15T06:50:04","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/api\/?page_id=4214"},"modified":"2021-11-15T10:34:08","modified_gmt":"2021-11-15T10:34:08","slug":"change-device-ownership","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/actions\/change-device-ownership\/","title":{"rendered":"Change Device Ownership"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h2>Change Device Ownership<\/h2>\n<p>Change ownership of your device from the MDM console.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_61516733\" class=\"table table-bordered\" style=\"height: 333px;\" width=\"912\">\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>\n<div>devices<\/div>\n<\/td>\n<td>Array<\/td>\n<td>Required. IDs of the devices<\/td>\n<\/tr>\n<tr>\n<td>devicegroups<\/td>\n<td>Array<\/td>\n<td>Required. IDs of the devicegroups<\/td>\n<\/tr>\n<tr>\n<td>ownership<\/td>\n<td>Integer<\/td>\n<td>\n<div>Required.<\/div>\n<div>Specify the ownership of the devices. Choose\u00a0<b>1 for Personal<\/b>\u00a0and\u00a0<b>2 for Corporate<\/b>.<\/div>\n<\/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\/actions\/change_ownership\/\r\nAuthorization: <api key>\r\nContent-Type: application\/json\r\nSample Post Data:-\r\n[{\r\n\"ownership\":1,\r\n\"devices\":[5,6],\r\n\"devicegroups\":[12],\r\n}]\r\n<\/pre>\n<p>Shell Command:<\/p>\n<pre class=\"lang:default decode:true\"> curl -H \"Authorization: &lt;your API key&gt; \" -H \"Content-Type: application\/json\" -d '\r\n{\"ownership\" : 1 , \r\n\"device\" : [1,2],\"devicegroups:[1]\"\r\n}\r\n' https:\/\/<portal>.hexnodemdm.com\/api\/v1\/actions\/change_ownership\/\r\n\r\n\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\"Device ownership changed successfully!\"\r\n]\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Change Device Ownership Change ownership of your device from the MDM console. Argument Type Description devices Array Required. IDs of the devices devicegroups Array Required. IDs of the devicegroups ownership Integer Required. Specify the ownership of the devices. Choose\u00a01 for Personal\u00a0and\u00a02 for Corporate. curl HTTP Request: POST https:\/\/.hexnodemdm.com\/api\/v1\/actions\/change_ownership\/ Authorization: Content-Type: application\/json Sample Post Data:- [{ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":3698,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-4214","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4214","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/comments?post=4214"}],"version-history":[{"count":8,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4214\/revisions"}],"predecessor-version":[{"id":4641,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4214\/revisions\/4641"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3698"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=4214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}