Replace conversion settings
curl --request PUT \
--url https://api.instantly.ai/api/v2/email-marketing/conversion-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversions": [
{
"source": "api",
"event_name": "subscription_started",
"group_by_property": "plan",
"lookback_days": 30
}
]
}
'import requests
url = "https://api.instantly.ai/api/v2/email-marketing/conversion-settings"
payload = { "conversions": [
{
"source": "api",
"event_name": "subscription_started",
"group_by_property": "plan",
"lookback_days": 30
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversions: [
{
source: 'api',
event_name: 'subscription_started',
group_by_property: 'plan',
lookback_days: 30
}
]
})
};
fetch('https://api.instantly.ai/api/v2/email-marketing/conversion-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.instantly.ai/api/v2/email-marketing/conversion-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversions\": [\n {\n \"source\": \"api\",\n \"event_name\": \"subscription_started\",\n \"group_by_property\": \"plan\",\n \"lookback_days\": 30\n }\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/email-marketing/conversion-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'conversions' => [
[
'source' => 'api',
'event_name' => 'subscription_started',
'group_by_property' => 'plan',
'lookback_days' => 30
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instantly.ai/api/v2/email-marketing/conversion-settings"
payload := strings.NewReader("{\n \"conversions\": [\n {\n \"source\": \"api\",\n \"event_name\": \"subscription_started\",\n \"group_by_property\": \"plan\",\n \"lookback_days\": 30\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"conversions": [
{
"source": "api",
"event_name": "subscription_started",
"lookback_days": 30,
"group_by_property": "plan"
}
],
"updated_at": "2026-11-10T12:00:00.000Z"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "name: Invalid domain name format",
"code": "VALIDATION_ERROR"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "Conversion settings changed during the update; read them and retry"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Conversion
Replace conversion settings
Replaces the events counted as conversions, up to 5. Applies to events received from now on; recorded conversions keep their attribution.
Requires one of the following scopes: email_marketing_conversions:update, email_marketing_conversions:all, all:update, all:all
PUT
/
api
/
v2
/
email-marketing
/
conversion-settings
Replace conversion settings
curl --request PUT \
--url https://api.instantly.ai/api/v2/email-marketing/conversion-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversions": [
{
"source": "api",
"event_name": "subscription_started",
"group_by_property": "plan",
"lookback_days": 30
}
]
}
'import requests
url = "https://api.instantly.ai/api/v2/email-marketing/conversion-settings"
payload = { "conversions": [
{
"source": "api",
"event_name": "subscription_started",
"group_by_property": "plan",
"lookback_days": 30
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversions: [
{
source: 'api',
event_name: 'subscription_started',
group_by_property: 'plan',
lookback_days: 30
}
]
})
};
fetch('https://api.instantly.ai/api/v2/email-marketing/conversion-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.put("https://api.instantly.ai/api/v2/email-marketing/conversion-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversions\": [\n {\n \"source\": \"api\",\n \"event_name\": \"subscription_started\",\n \"group_by_property\": \"plan\",\n \"lookback_days\": 30\n }\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/email-marketing/conversion-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'conversions' => [
[
'source' => 'api',
'event_name' => 'subscription_started',
'group_by_property' => 'plan',
'lookback_days' => 30
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.instantly.ai/api/v2/email-marketing/conversion-settings"
payload := strings.NewReader("{\n \"conversions\": [\n {\n \"source\": \"api\",\n \"event_name\": \"subscription_started\",\n \"group_by_property\": \"plan\",\n \"lookback_days\": 30\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"conversions": [
{
"source": "api",
"event_name": "subscription_started",
"lookback_days": 30,
"group_by_property": "plan"
}
],
"updated_at": "2026-11-10T12:00:00.000Z"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "name: Invalid domain name format",
"code": "VALIDATION_ERROR"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "Conversion settings changed during the update; read them and retry"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Authorizations
Body
application/json