Transactional templates can have multiple versions, each with its own subject and content. Users can have up to 300 versions across all templates.
Create a new version
Use POST /templates/{template_id}/versions to create a new version for a specific template.
Edit a version
Use PATCH /templates/{template_id}/versions/{version_id} to update an existing version.
Retrieve a version
Use GET /templates/{template_id}/versions/{version_id} to fetch details of a specific version.
Delete a version
Use DELETE /templates/{template_id}/versions/{version_id} to remove a version.
Activate a version
Use POST /templates/{template_id}/versions/{version_id}/activate to make a specific version the active one for the template.
// Example: Create a new version
string data = @"{
'active': 1,
'html_content': '<%body%>',
'name': 'example_version_name',
'plain_content': '<%body%>',
'subject': '<%subject%>'
}";
var json = JsonConvert.DeserializeObject<Object>(data);
data = json.ToString();
var template_id = "test_url_param";
var response = await client.RequestAsync(method: SendGridClient.Method.POST, urlPath: "templates/" + template_id + "/versions", requestBody: data);
// Example: Activate a version
var template_id = "test_url_param";
var version_id = "test_url_param";
var response = await client.RequestAsync(method: SendGridClient.Method.POST, urlPath: "templates/" + template_id + "/versions/" + version_id + "/activate");