Marketing API
Assets
Update Alt Text
this api endpoint (post) (post) updates the alt text of an image asset if the request succeeds, it will return an asset object docid\ lrpr7r0iozzuquwvx8xus permissions assets edit path parameters id the id of the asset to update body parameters alt text string the new alt text special characters are not supported require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/assets/alt text/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" data = { alt text "this is an image of a horse " } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/assets/alt text/fd2b7195 1a40 46c1 ae44 a0c100272389' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "alt text" "this is an image of a horse " }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { alt text "this is an image of a horse " }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/assets/alt text/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" "new filename png", "filesize" 26496, "extension" "png", "version" null, "updated at" 1669253854, "alt text" "this is an image of a horse ", "created at" 1668380210, "type" "image", "status" "active", "thumbnails" \[], "id" "fd2b7195 1a40 46c1 ae44 a0c100272389", "object" "asset", "folder" "618c5e17 4b22 4a1b 989b 9fd47112deee", "number of children" 0, "number of downloads" 0 } }