How to send local images with html using API?

Is there a way to send images with html using API?
I’m creating campaign using API method (in C#):{clientid}.{xml|json}.
As parameter it takes
"HtmlUrl": "",
"TextUrl": "".
Using this method I can only include aspx or html page. But how am I to include local images (I mean situation when I have in my html: <img src=’pict.jpg’/>) ? Is this possible? Or I have to put them on some server to be available online and refer to them in html as <img src=’http://myserver.pict.jpg’>?
Is there a way to send zip file containing html and my local images using API methods? It’s definitely possible using Campaign Monitor interface, but can I do it using API? That would work for me just fine.

Thanks in advance.

Carissa Carissa, 5 years ago

Hi Patrycja! To use an image in your HTML via the API, you will need to place the image on your site, include its address in an HTML file, and then place that HTML file on your site. Local files, zipped or otherwise, won't work with the API. You can only import local files through the app, sorry!

Campaign Monitor
Patrycja, 5 years ago

Thank you very much for information.
Could you tell me where on your site I can place images and html? What about css file? Is there some kind upload mechanism, which lets me to point my html and images files and after upload it gives me http address to this files?

roshodgekiss roshodgekiss, 5 years ago

Hi Patrycja, as Carissa mentioned, you will need to host the images, html and CSS files on your own servers when creating a campaign via the API. During the campaign import process, we'll make the CSS inline.

After import, a campaign ID is returned, which you can use to access your campaign. Alternately, you can get the PreviewURL for your campaign using our drafts API method.

Thanks, Patrycja - let us know if you have any questions about this :)

Get in touch with us on Twitter:
We're also on Facebook:

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free