Skip to main content
POST
/
campaign-messages
/
{campaign_message_id}
/
content
Create localized content
curl --request POST \
  --url https://api.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "locale": "fr-FR",
  "name": "French",
  "subject": "Bonjour",
  "content": {
    "html": "<p>Bonjour</p>"
  }
}
'
import requests

url = "https://api.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content"

payload = {
"locale": "fr-FR",
"name": "French",
"subject": "Bonjour",
"content": { "html": "<p>Bonjour</p>" }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locale: 'fr-FR',
name: 'French',
subject: 'Bonjour',
content: {html: '<p>Bonjour</p>'}
})
};

fetch('https://api.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content', 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.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content",
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([
'locale' => 'fr-FR',
'name' => 'French',
'subject' => 'Bonjour',
'content' => [
'html' => '<p>Bonjour</p>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content"

payload := strings.NewReader("{\n \"locale\": \"fr-FR\",\n \"name\": \"French\",\n \"subject\": \"Bonjour\",\n \"content\": {\n \"html\": \"<p>Bonjour</p>\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
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.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"fr-FR\",\n \"name\": \"French\",\n \"subject\": \"Bonjour\",\n \"content\": {\n \"html\": \"<p>Bonjour</p>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.getvero.com/api/v2/campaign-messages/{campaign_message_id}/content")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"fr-FR\",\n \"name\": \"French\",\n \"subject\": \"Bonjour\",\n \"content\": {\n \"html\": \"<p>Bonjour</p>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "locale": "<string>",
  "name": "<string>",
  "is_default": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "content": {
    "mjml": "<string>",
    "html": "<string>",
    "text": "<string>",
    "payload": {}
  },
  "subject": "<string>",
  "preheader_text": "<string>"
}
{
"error": "not_found"
}
{
"errors": [
{
"message": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Accepts either a raw API key or Bearer <key>.

Headers

revision
string

Optional dated API revision for the request. Must use YYYY-MM-DD format.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-03-01"

Path Parameters

campaign_message_id
integer
required

Campaign message ID.

Body

application/json
locale
string
required

Locale for the cloned localized content, for example fr-FR.

name
string | null
subject
string | null
preheader_text
string | null
content
object

Exactly one of mjml, html, text, or payload must be present in write requests. Email messages accept mjml, html, or text. SMS accepts text. Push accepts payload.

Response

Campaign content created.

List response item; body copy is omitted — fetch a single record for content.

id
integer
required
locale
string | null
required

null for the default content variant.

name
string | null
required
is_default
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
content
object
required

Full body: exactly one of mjml, html, text, or payload is set.

subject
string | null
preheader_text
string | null