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.
-
4You can't send anything except the latest version, SendGrid always uses the active version. Versions are only visible in the admin console. You need to make different templates if your application chooses which to use at runtime. – Stephen Jennings Dec 08 '21 at 01:29
-
1You should add that as the answer @StephenJennings! I'd up vote it. – philnash Dec 08 '21 at 03:36
-
Actually, as @KeithBrings states below, this CAN in fact be done. – Yossi G. Jun 27 '23 at 20:47
3 Answers
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.

- 241
- 3
- 5
-
1just what i needed. wild they dont have this literature in their docs. testing with new template versions locally is.... important – Joe Berg Mar 16 '23 at 20:22
-
Just click the version and you will see it on the address bar from your browser, e.g.
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.

- 3,103
- 1
- 19
- 23
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

- 31
- 1
- 4