简体   繁体   中英

How do I specify dynamic template's version when calling v3 api?

I assume dynamic template's version is to specify the template's id and version when sending the email. How do I specify dynamic template's version when calling v3 api? I'm using c# client library.

Just click the version and you will see it on the address bar from your browser, eg

https://mc.sendgrid.com/dynamic-templates/YOUR_TEMPLATE_ID/version/YOUR_VERSION_ID/editor

And you can activate the version following the offical document . After the verion has been activated, you will be able to send the active version of your template.

Note: You might need to swith your API key from Restricted Access to Full access.

Just to expand on Chuan's answer: you can't explicitly use a specific version from the template. Sendgrid always sends the active version.

There might be some workarounds if you use the marketing/test/send_email endpoint, but controlling the template's personalisation might be limited. More info here: https://docs.sendgrid.com/api-reference/send-test-e-mail/send-a-test-marketing-email

It is so profoundly undocumented that I would almost suspect it is intentional but you may simply use d-#{template}.#{version} for the template_id field.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM