Push
Translate a Push Campaign
Translate a push campaign into your other languages with AI
POST
/
api
/
v1
/
push
/
campaigns
/
{campaignId}
/
translate
Translate a Push Campaign
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"locales": [
"<string>"
],
"overwrite": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate"
payload = {
"locales": ["<string>"],
"overwrite": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({locales: ['<string>'], overwrite: true})
};
fetch('https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate', 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://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'locales' => [
'<string>'
],
'overwrite' => true
]),
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.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate"
payload := strings.NewReader("{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"campaign": {
"id": "cmp_abc123",
"name": "Flash sale",
"type": "push",
"status": "draft",
"content": {
"title": "24h sale, {{FIRST_NAME|friend}}",
"body": "30% off everything",
"url": "https://shop.example.com/sale",
"imageUrl": null,
"iconUrl": null,
"localizations": [
{
"locale": "de",
"title": "24-Stunden-Sale, {{FIRST_NAME|Freund}}",
"body": "30 % Rabatt auf alles",
"url": null,
"imageUrl": null,
"sourceHash": "5f1c2a90",
"origin": "ai"
}
]
},
"targetLists": { "type": "all" },
"scheduledAt": null,
"sentAt": null,
"estimatedRecipientCount": null,
"labelIds": [],
"createdAt": "2026-11-08T12:00:00.000Z",
"updatedAt": "2026-11-08T12:00:05.000Z"
},
"translated": ["de"],
"skipped": [{ "locale": "fr", "reason": "edited" }],
"failed": [],
"message": "Translated into de. Kept fr (written by a person; pass overwrite to replace it)."
}
{
"error": "Add ja in Settings > Localization before translating into it."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: campaigns:write"
}
{
"error": "Campaign not found."
}
{
"error": "The campaign changed while it was being translated. Translate again."
}
Translates a draft or scheduled push campaign’s title and message with AI into
the languages in Settings > Localization and saves them as the campaign’s
localizations. Merge tags are kept
exactly, and their fallback text ({{FIRST_NAME|there}}) is translated.
By default it translates languages with no version yet, and AI versions whose
main title or message changed since. Versions a person wrote are kept unless you
pass overwrite: true. The translation runs while the request waits, usually a
few seconds. If the campaign changes while it is being translated, nothing is
saved and you get a 409; translate again. Requires the campaigns:write
scope.
Each contact gets the version for their language attribute, else their
device’s language as reported by the Sequenzy SDK, else your fallback language.
See Push notifications.
Request
string
required
The push campaign ID.
string[]
Languages to translate into. Omit for every language except the main one.
Languages that are not in your language list are rejected.
boolean
default:"false"
Retranslate every requested language, replacing versions a person wrote.
curl -X POST "https://api.sequenzy.com/api/v1/push/campaigns/cmp_abc123/translate" \
--header "Authorization: Bearer $SEQUENZY_API_KEY" \
--header "Content-Type: application/json" \
--data '{"locales":["de","fr"]}'
Response fields
object
The campaign, with the new versions in
content.localizations.string[]
Languages translated and saved by this request.
object[]
Languages left as they were:
{ locale, reason }, where reason is
up_to_date or edited (written by a person).object[]
Languages that could not be translated:
{ locale, error }. The other
languages are still saved; retry these.string
A one-line summary.
Responses
{
"success": true,
"campaign": {
"id": "cmp_abc123",
"name": "Flash sale",
"type": "push",
"status": "draft",
"content": {
"title": "24h sale, {{FIRST_NAME|friend}}",
"body": "30% off everything",
"url": "https://shop.example.com/sale",
"imageUrl": null,
"iconUrl": null,
"localizations": [
{
"locale": "de",
"title": "24-Stunden-Sale, {{FIRST_NAME|Freund}}",
"body": "30 % Rabatt auf alles",
"url": null,
"imageUrl": null,
"sourceHash": "5f1c2a90",
"origin": "ai"
}
]
},
"targetLists": { "type": "all" },
"scheduledAt": null,
"sentAt": null,
"estimatedRecipientCount": null,
"labelIds": [],
"createdAt": "2026-11-08T12:00:00.000Z",
"updatedAt": "2026-11-08T12:00:05.000Z"
},
"translated": ["de"],
"skipped": [{ "locale": "fr", "reason": "edited" }],
"failed": [],
"message": "Translated into de. Kept fr (written by a person; pass overwrite to replace it)."
}
{
"error": "Add ja in Settings > Localization before translating into it."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: campaigns:write"
}
{
"error": "Campaign not found."
}
{
"error": "The campaign changed while it was being translated. Translate again."
}
⌘I
Translate a Push Campaign
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"locales": [
"<string>"
],
"overwrite": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate"
payload = {
"locales": ["<string>"],
"overwrite": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({locales: ['<string>'], overwrite: true})
};
fetch('https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate', 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://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'locales' => [
'<string>'
],
'overwrite' => true
]),
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.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate"
payload := strings.NewReader("{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/campaigns/{campaignId}/translate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locales\": [\n \"<string>\"\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"campaign": {
"id": "cmp_abc123",
"name": "Flash sale",
"type": "push",
"status": "draft",
"content": {
"title": "24h sale, {{FIRST_NAME|friend}}",
"body": "30% off everything",
"url": "https://shop.example.com/sale",
"imageUrl": null,
"iconUrl": null,
"localizations": [
{
"locale": "de",
"title": "24-Stunden-Sale, {{FIRST_NAME|Freund}}",
"body": "30 % Rabatt auf alles",
"url": null,
"imageUrl": null,
"sourceHash": "5f1c2a90",
"origin": "ai"
}
]
},
"targetLists": { "type": "all" },
"scheduledAt": null,
"sentAt": null,
"estimatedRecipientCount": null,
"labelIds": [],
"createdAt": "2026-11-08T12:00:00.000Z",
"updatedAt": "2026-11-08T12:00:05.000Z"
},
"translated": ["de"],
"skipped": [{ "locale": "fr", "reason": "edited" }],
"failed": [],
"message": "Translated into de. Kept fr (written by a person; pass overwrite to replace it)."
}
{
"error": "Add ja in Settings > Localization before translating into it."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: campaigns:write"
}
{
"error": "Campaign not found."
}
{
"error": "The campaign changed while it was being translated. Translate again."
}