0

I was trying to retrieve the "rendered" email using APIs. Using the following call: https://www.exacttargetapis.com/guide/v1/emails/6701/dataExtension/key:6B9F561B-8324-4625-BE23-99DB74EA285A/contacts/key:0032600000afb32AAA/preview?kind=html

I get this error:

    {
    "message": "Unable to generate preview.",
    "errorcode": 10006,
    "documentation": "",
    "validationErrors": [
        {
            "message": "Email::BuildMessage(string, int)- This method can only be called with a valid Email ID.",
            "errorcode": 10004,
            "documentation": ""
        }
    ]
}

The email ID that i'm using exist.

2

I found the problem. Using this API call the "emailID" is not the one shown by the UI, instead it uses the "legacyID" of the email asset.

I found it out using %%_emailid%% inside my email, which shows the "legacyID" of the email it is used in.

This ID can also be retrieved with the GET metod to see the asset details:

{{hostEndpoint}}/asset/v1/content/assets/{ID}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.