Re: Update alt text of an image in email using the API

Joseph_Wood
Level 2

Update alt text of an image in email using the API

Hi Marketo Nation,

 

I am using the following endpoint to update alt text of an image within the email content: https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Emails/update...

 

POST /rest/asset/v1/email/1234/content/MastheadImage.json
with

body: altText(String).

 

Issue:

The alt text gets updated succesfully but the image gets lost and I can only see the placeholder image with source as followed:

<img alt="यह एक ऑल्ट टेक्स्ट है" style="-ms-interpolation-mode: bicubic; outline: none; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; text-decoration: none; border-top-width: 0; display: block; max-width: 100%; line-height: 100%; height: auto; width: 600px;" width="0" src="/index.php/lpTemplate/proxyAsset?idx=eyJpIjoibDVlcUhXSU82SGJaeklLUiIsInQiOiJQbi9rZ01EZ0VYWGhGd3JhV09ScWZBPT0ifQ%3D%3D" height="0">

Screen Shot 2021-06-28 at 10.41.43 AM.png

Question:

How do I only alter the alt text without messing up other attributes?

 

Thank you!

Tags (4)
1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Update alt text of an image in email using the API

What's the actual JSON body? That's not valid JSON that you're showing.