Including merge fields in email sent by the API

I am sending a custom created (by code) HTML email to 100’s of people via an API call. How can I include merge fields in the resulting email that get resolved when sent?

Using the normal campaign merge fields did not work., for example here.

I guess it will not matter if you are using the XML-RPC or REST versions of the Send Email function here.

The XML-RPC version of the documentation has an example below.

I am wondering if the Merge Fields are Case Sensitive here, try ~Contact.Email~ to see if it makes a difference.

Thanks Pav, Yes Merge Fields are case sensitive…I remembered that late yesterday (well was reminded of that, actually).

Appreciate your reply!

1 Like