Changes the display 'name' and/or the 'advertiserId' label of a file; 'advertiserId' 0 removes the label.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/media-library/assets/{assetId}/update.do
Changes the display 'name' and/or the 'advertiserId' label of a file; 'advertiserId' 0 removes the label. The stored file never changes; a parameter not sent keeps its value. A user with shared advertisers may change only files uploaded for one of their advertisers, and may relabel them only to another of theirs, never to none. Requires the MEDIA_LIBRARY permission and update rights on campaigns.
Path Params
assetIdintegerrequired
Media library file id
42
Form Params
namestring
New display name, up to 255 characters
Spring sale 30s v2
advertiserIdinteger
New advertiser label; 0 removes it
1001
Responses
200
{success, asset:{...}}
400
Field errors under 'errors': 'name' blank or longer than 255 characters; 'advertiserId' 0 from a user with shared advertisers
401
Authentication error
403
The role lacks MEDIA_LIBRARY or campaign update rights, or no rights on the file's advertiser
404
No such file, it is deleted, or the user cannot see it
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/media-library/assets/42/update.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["advertiserId"] = "1001", ["name"] = "Spring sale 30s v2" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());