curl --request POST \
--url https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Activate an earlier email template version
Makes an earlier version the template’s active version. AI Presentations writes the version’s subject, preview text, body, CTA label, and sender name to the template’s saved email copy and marks the version active in one step. The next email uses this version under the same ID, so its counts continue.
A version that used the default subject or preview text saves that field empty. Activating the version that’s already active returns 204 with no change.
Returns 400 when the version’s copy is longer than the template’s email copy limits, with an error such as "Subject line must be 255 characters or fewer". Returns 404 when email template performance isn’t enabled for your organization, the template belongs to another organization, or the version isn’t on the template’s list, including a removed version.
curl --request POST \
--url https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/delivery/template-performance/{versionId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
A Demand IQ API key or service token, passed in the Authorization: Bearer header.
Path Parameters
The template version ID.
Query Parameters
The template to activate the version on.
Response
The version is the template's active version