Marketing API
Assets
Make Public
this api endpoint (post) (post) makes a private image, pubic if the request succeeds, it will return an asset object docid\ lrpr7r0iozzuquwvx8xus permissions assets edit before making an image public, ensure you have sufficient storage this process involves distribution through the tamio cdn, thumbnail generation into multiple sizes, and conversion to the webp format for better performance, all of which require additional storage path parameters id the id of the asset to make public require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/assets/make public/fd2b7195 1a40 46c1 ae44 a0c100272389") 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" response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/assets/make public/fd2b7195 1a40 46c1 ae44 a0c100272389' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'post', headers myheaders }; fetch("https //api tamio com/v2/assets/make public/fd2b7195 1a40 46c1 ae44 a0c100272389", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "asset" { "filename" "awesome file webp", "filesize" 842244, "extension" "webp", "version" null, "updated at" 1708629000, "created at" 1708628995, "type" "image", "id" "fd2b7195 1a40 46c1 ae44 a0c100272389", "object" "asset", "folder" "51f0ca52 c1ac 4546 ad48 c7b19e9ab02a", "number of children" 0, "number of downloads" 0, "alt text" null, "status" "active", "width" 1024, "height" 1024, "public url" "https //pub ox31 com/1271 zfw70ctvdnj5yyxzrjyyfuxpk/ ips for successful domain name negotiations 1024x1024 webp", "parent id" "51f0ca52 c1ac 4546 ad48 c7b19e9ab02a", "thumbnails" \[ { "url" "https //pub ox31 com/1271 zfw70ctvdnj5yyxzrjyyfuxpk/ ips for successful domain name negotiations 1024x1024 webp", "width" 1024, "height" 1024, "size" 185344 }, { "url" "https //pub ox31 com/1271 zfw70ctvdnj5yyxzrjyyfuxpk/ ips for successful domain name negotiations 1024x1024 webp", "width" 1024, "height" 1024, "size" 185344 }, { "url" "https //pub ox31 com/1271 zfw70ctvdnj5yyxzrjyyfuxpk/ ips for successful domain name negotiations 800x800 webp", "width" 800, "height" 800, "size" 97008 }, { "url" "https //pub ox31 com/1271 zfw70ctvdnj5yyxzrjyyfuxpk/ ips for successful domain name negotiations 100x100 webp", "width" 100, "height" 100, "size" 3860 } ] } }