Marketing API
Assets
Move Asset
this api endpoint (post) (post) moves an asset to a new folder if the request succeeds, it will return an asset object docid\ lrpr7r0iozzuquwvx8xus permissions assets edit path parameters id the id of the asset body parameters folder id string the id of the folder that you like the asset to be moved in require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/assets/move/25213be6 a152 4120 88a8 83e17a3a3ebc") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { folder id "039d7055 2432 46e3 8367 745019302082" } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/assets/move/25213be6 a152 4120 88a8 83e17a3a3ebc' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "folder id" "039d7055 2432 46e3 8367 745019302082" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { folder id "039d7055 2432 46e3 8367 745019302082" }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/assets/move/25213be6 a152 4120 88a8 83e17a3a3ebc", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "asset" { "filename" "new folder", "filesize" null, "extension" null, "status" "active", "version" null, "updated at" 1669251084, "created at" 1669251084, "type" "folder", "thumbnails" \[], "id" "25213be6 a152 4120 88a8 83e17a3a3ebc", "object" "asset", "folder" "039d7055 2432 46e3 8367 745019302082", "number of children" 0, "number of downloads" 0 } }