Create a Campaign
Create a Campaign
If you pass multiple messages of the same channel, then the ab_test field is required. You can add up to 4 messages of the same channel, and they will be distributed evenly when in testing phase.
Features like multichannel are available to premium users only. If you find these features interesting, contact us to upgrade your plan!
Please be aware that adding integration_id is mandatory for sms and email messages.
If you want to have your campaign manually executed, on your command, don’t set any execution options (run_immediately, recurrence or scheduled_time). The campaign will be marked as manual.
If you don’t want to lose progress on a campaign, you can save it as a draft, by adding the ‘is_draft’ field and setting it’s value to true.
Don’t worry about sending long links through via SMS, the Ocamba system will recognize the link on camaign execution and shorten it automatically when campaign is being sent.
If you pass the run_immediately field as true, the campaign will execute automatically upon it’s creation.
Please be careful when trying the examples, some of them may contain worlspace specific ID’s, which won’t be usable on your workspace.
An example where this may occur is the integration_id field.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Request schema
bodyResponse schemas
curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Campaign",
"run_immediately": true,
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Campaign",
"run_immediately": true,
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Campaign",
"run_immediately" => true,
"messages" => [
[
"name" => "Test Message",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Hood Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Campaign",
"scheduled_time": "2026-03-22 10:00:00",
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"callbacks": {
"push": {
"on_click": [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-click"
],
"on_wokenup": [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-wokenup"
]
}
}
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Campaign",
"scheduled_time": "2026-03-22 10:00:00",
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"callbacks": {
"push": {
"on_click": [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-click"
],
"on_wokenup": [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-wokenup"
]
}
}
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Campaign",
"scheduled_time" => "2026-03-22 10:00:00",
"messages" => [
[
"name" => "Test Message",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Hood Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
],
"callbacks" => [
"push" => [
"on_click" => [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-click"
],
"on_wokenup" => [
"https://your-domain.com/where-you-want-callbacks/to-arrive/on-wokenup"
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Campaign",
"run_immediately": true,
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"targeting": {
"countries": {
"items": [
"FR",
"DE",
"CH",
"AU"
],
"op": "in"
},
"languages": {
"items": [
"de",
"en",
"fr"
],
"op": "in"
},
"profile_age": {
"from": 0,
"to": 10
},
"custom_properties": {
"plan": {
"items": [
"pro",
"enterprise"
],
"op": "in"
},
"favorite_category": {
"items": [
"electronics",
"books"
],
"op": "in"
}
}
}
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Campaign",
"run_immediately": true,
"messages": [
{
"name": "Test Message",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"targeting": {
"countries": {
"items": [
"FR",
"DE",
"CH",
"AU"
],
"op": "in"
},
"languages": {
"items": [
"de",
"en",
"fr"
],
"op": "in"
},
"profile_age": {
"from": 0,
"to": 10
},
"custom_properties": {
"plan": {
"items": [
"pro",
"enterprise"
],
"op": "in"
},
"favorite_category": {
"items": [
"electronics",
"books"
],
"op": "in"
}
}
}
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Campaign",
"run_immediately" => true,
"messages" => [
[
"name" => "Test Message",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Hood Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
],
"targeting" => [
"countries" => [
"items" => [
"FR",
"DE",
"CH",
"AU"
],
"op" => "in"
],
"languages" => [
"items" => [
"de",
"en",
"fr"
],
"op" => "in"
],
"profile_age" => [
"from" => 0,
"to" => 10
],
"custom_properties" => [
"plan" => [
"items" => [
"pro",
"enterprise"
],
"op" => "in"
],
"favorite_category" => [
"items" => [
"electronics",
"books"
],
"op" => "in"
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Push AB Test Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"messages": [
{
"name": "Test Message 1",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
},
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"ab_test": {
"test_split": 30,
"winning_metric": "click_rate",
"evaluation_window": "1D",
"winner_delivery_mode": "automatic"
}
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Push AB Test Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"messages": [
{
"name": "Test Message 1",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
},
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"ab_test": {
"test_split": 30,
"winning_metric": "click_rate",
"evaluation_window": "1D",
"winner_delivery_mode": "automatic"
}
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Push AB Test Campaign",
"scheduled_time" => "2026-10-10 10:00:00",
"messages" => [
[
"name" => "Test Message 1",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Hood Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
],
[
"name" => "Test Message 2",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
],
"ab_test" => [
"test_split" => 30,
"winning_metric" => "click_rate",
"evaluation_window" => "1D",
"winner_delivery_mode" => "automatic"
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Multilang Campaign",
"messages": [
{
"name": "Multilang Message",
"channel": "push",
"primary_lang": "it",
"priority": 3,
"push": {
"title": {
"en": "Ocamba Hood Message",
"it": "Ocamba Hood Messaggio",
"sr": "Ocamba Hood Poruka"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App.",
"it": "Questo è un messaggio dalla piattaforma Ocamba, inviato tramite l'\''app Hood Engage.",
"sr": "Ovo je poruka sa Ocamba Platforme, poslata putem Hood Engage Aplikacije."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"it": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"sr": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Multilang Campaign",
"messages": [
{
"name": "Multilang Message",
"channel": "push",
"primary_lang": "it",
"priority": 3,
"push": {
"title": {
"en": "Ocamba Hood Message",
"it": "Ocamba Hood Messaggio",
"sr": "Ocamba Hood Poruka"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App.",
"it": "Questo è un messaggio dalla piattaforma Ocamba, inviato tramite l'app Hood Engage.",
"sr": "Ovo je poruka sa Ocamba Platforme, poslata putem Hood Engage Aplikacije."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"it": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"sr": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Multilang Campaign",
"messages" => [
[
"name" => "Multilang Message",
"channel" => "push",
"primary_lang" => "it",
"priority" => 3,
"push" => [
"title" => [
"en" => "Ocamba Hood Message",
"it" => "Ocamba Hood Messaggio",
"sr" => "Ocamba Hood Poruka"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App.",
"it" => "Questo è un messaggio dalla piattaforma Ocamba, inviato tramite l'app Hood Engage.",
"sr" => "Ovo je poruka sa Ocamba Platforme, poslata putem Hood Engage Aplikacije."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"it" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50",
"sr" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Push AB Test Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"messages": [
{
"name": "Test Message 1",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
},
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"ab_test": {
"test_split": 30,
"winning_metric": "click_rate",
"evaluation_window": "1D",
"winner_delivery_mode": "automatic"
}
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Push AB Test Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"messages": [
{
"name": "Test Message 1",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
},
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
],
"ab_test": {
"test_split": 30,
"winning_metric": "click_rate",
"evaluation_window": "1D",
"winner_delivery_mode": "automatic"
}
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Push AB Test Campaign",
"scheduled_time" => "2026-10-10 10:00:00",
"messages" => [
[
"name" => "Test Message 1",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Hood Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
],
[
"name" => "Test Message 2",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
],
"ab_test" => [
"test_split" => 30,
"winning_metric" => "click_rate",
"evaluation_window" => "1D",
"winner_delivery_mode" => "automatic"
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Push Recurring",
"recurrence": {
"pattern": {
"hour": 12,
"minute": 30,
"weekdays": [
1,
2,
3,
4,
5
],
"months": [
1,
3,
5
]
}
},
"messages": [
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Push Recurring",
"recurrence": {
"pattern": {
"hour": 12,
"minute": 30,
"weekdays": [
1,
2,
3,
4,
5
],
"months": [
1,
3,
5
]
}
},
"messages": [
{
"name": "Test Message 2",
"channel": "push",
"push": {
"title": {
"en": "Ocamba Message"
},
"body": {
"en": "This is a message from the Ocamba Platform."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Push Recurring",
"recurrence" => [
"pattern" => [
"hour" => 12,
"minute" => 30,
"weekdays" => [
1,
2,
3,
4,
5
],
"months" => [
1,
3,
5
]
]
],
"messages" => [
[
"name" => "Test Message 2",
"channel" => "push",
"push" => [
"title" => [
"en" => "Ocamba Message"
],
"body" => [
"en" => "This is a message from the Ocamba Platform."
],
"image" => [
"en" => "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
],
"icon" => "https://ocamba.com/images/ocamba-man.png",
"landing_url" => "https://ocamba.com"
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "New Year Email Campaign",
"scheduled_time": "2026-01-01 00:00:01",
"send_in_profile_time_zone": true,
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"primary_lang": "en",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Happy New Year!</body></html>"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "New Year Email Campaign",
"scheduled_time": "2026-01-01 00:00:01",
"send_in_profile_time_zone": true,
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"primary_lang": "en",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Happy New Year!</body></html>"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "New Year Email Campaign",
"scheduled_time" => "2026-01-01 00:00:01",
"send_in_profile_time_zone" => true,
"messages" => [
[
"name" => "Ocamba Test Email",
"channel" => "email",
"integration_id" => "1830",
"primary_lang" => "en",
"email" => [
"sender_name" => "Ocamba",
"sender_email" => "[email protected]",
"subject" => "Ocamba Greeting",
"html" => [
"en" => "<html><body>Happy New Year!</body></html>"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Email Campaign",
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"primary_lang": "en",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Hello from Ocamba</body></html>",
"de": "<html><body>Hallo aus Ocamba</body></html>",
"fr": "<html><body>Bonjour d'\''Ocamba</body></html>"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Email Campaign",
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"primary_lang": "en",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Hello from Ocamba</body></html>",
"de": "<html><body>Hallo aus Ocamba</body></html>",
"fr": "<html><body>Bonjour d'Ocamba</body></html>"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Email Campaign",
"messages" => [
[
"name" => "Ocamba Test Email",
"channel" => "email",
"integration_id" => "1830",
"primary_lang" => "en",
"email" => [
"sender_name" => "Ocamba",
"sender_email" => "[email protected]",
"subject" => "Ocamba Greeting",
"html" => [
"en" => "<html><body>Hello from Ocamba</body></html>",
"de" => "<html><body>Hallo aus Ocamba</body></html>",
"fr" => "<html><body>Bonjour d'Ocamba</body></html>"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test Recurring Email Campaign",
"send_in_profile_time_zone": true,
"send_if_profile_time_passed": false,
"description": "This is a test Campaign. It uses the recurring scheduling option, and will be sent via email.",
"labels": [
"lebel1",
"lebel2",
"lebel3"
],
"recurrence": {
"pattern": {
"hour": 1,
"minute": 10,
"weekdays": [
4
],
"months": [
3,
5
]
}
},
"utm_tracking": {
"enabled": 0
},
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Hello from Ocamba</body></html>"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test Recurring Email Campaign",
"send_in_profile_time_zone": true,
"send_if_profile_time_passed": false,
"description": "This is a test Campaign. It uses the recurring scheduling option, and will be sent via email.",
"labels": [
"lebel1",
"lebel2",
"lebel3"
],
"recurrence": {
"pattern": {
"hour": 1,
"minute": 10,
"weekdays": [
4
],
"months": [
3,
5
]
}
},
"utm_tracking": {
"enabled": 0
},
"messages": [
{
"name": "Ocamba Test Email",
"channel": "email",
"integration_id": "1830",
"email": {
"sender_name": "Ocamba",
"sender_email": "[email protected]",
"subject": "Ocamba Greeting",
"html": {
"en": "<html><body>Hello from Ocamba</body></html>"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test Recurring Email Campaign",
"send_in_profile_time_zone" => true,
"send_if_profile_time_passed" => false,
"description" => "This is a test Campaign. It uses the recurring scheduling option, and will be sent via email.",
"labels" => [
"lebel1",
"lebel2",
"lebel3"
],
"recurrence" => [
"pattern" => [
"hour" => 1,
"minute" => 10,
"weekdays" => [
4
],
"months" => [
3,
5
]
]
],
"utm_tracking" => [
"enabled" => 0
],
"messages" => [
[
"name" => "Ocamba Test Email",
"channel" => "email",
"integration_id" => "1830",
"email" => [
"sender_name" => "Ocamba",
"sender_email" => "[email protected]",
"subject" => "Ocamba Greeting",
"html" => [
"en" => "<html><body>Hello from Ocamba</body></html>"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test SMS Campaign",
"recurrence": {
"cron": "5 4 2 4 4"
},
"messages": [
{
"name": "Test SMS Message",
"channel": "sms",
"integration_id": "1996",
"sms": {
"content": {
"en": "This SMS message is sent to you from Ocamba!"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test SMS Campaign",
"recurrence": {
"cron": "5 4 2 4 4"
},
"messages": [
{
"name": "Test SMS Message",
"channel": "sms",
"integration_id": "1996",
"sms": {
"content": {
"en": "This SMS message is sent to you from Ocamba!"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test SMS Campaign",
"recurrence" => [
"cron" => "5 4 2 4 4"
],
"messages" => [
[
"name" => "Test SMS Message",
"channel" => "sms",
"integration_id" => "1996",
"sms" => [
"content" => [
"en" => "This SMS message is sent to you from Ocamba!"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test SMS Campaign",
"recurrence": {
"cron": "5 4 2 4 4"
},
"messages": [
{
"name": "Test SMS Message",
"channel": "sms",
"integration_id": "1996",
"sms": {
"content": {
"en": "This SMS message is sent to you from Ocamba!"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test SMS Campaign",
"recurrence": {
"cron": "5 4 2 4 4"
},
"messages": [
{
"name": "Test SMS Message",
"channel": "sms",
"integration_id": "1996",
"sms": {
"content": {
"en": "This SMS message is sent to you from Ocamba!"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test SMS Campaign",
"recurrence" => [
"cron" => "5 4 2 4 4"
],
"messages" => [
[
"name" => "Test SMS Message",
"channel" => "sms",
"integration_id" => "1996",
"sms" => [
"content" => [
"en" => "This SMS message is sent to you from Ocamba!"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/campaigns" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Test SMS Draft",
"is_draft": true,
"messages": [
{
"name": "Test SMS Draft",
"channel": "sms",
"integration_id": "1853",
"sms": {
"content": {
"en": "Welcome to Ocamba"
}
}
}
]
}'const url = 'https://api.ocamba.com/v1/hood/campaigns';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Test SMS Draft",
"is_draft": true,
"messages": [
{
"name": "Test SMS Draft",
"channel": "sms",
"integration_id": "1853",
"sms": {
"content": {
"en": "Welcome to Ocamba"
}
}
}
]
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Test SMS Draft",
"is_draft" => true,
"messages" => [
[
"name" => "Test SMS Draft",
"channel" => "sms",
"integration_id" => "1853",
"sms" => [
"content" => [
"en" => "Welcome to Ocamba"
]
]
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "1030978",
"company_id": "6197120",
"creator_id": "1000223",
"name": "Test Campaign asdfasd",
"send_strategy": "immediate",
"messages": [
{
"id": "8146",
"company_id": "6197120",
"name": "Test Message",
"campaign_id": "1030978",
"channel": "push",
"integration_id": "0",
"push": {
"title": {
"en": "Ocamba Hood Message"
},
"body": {
"en": "This is a message from the Ocamba Platform, served to you by the Hood Engage App."
},
"image": {
"en": "https://gdm-catalog-fmapi-prod.imgix.net/ProductLogo/e170c994-bc3c-4f59-a0f0-37c268282011.jpeg?w=40&h=40&fit=max&dpr=3&auto=format&q=50"
},
"icon": "https://ocamba.com/images/ocamba-man.png",
"landing_url": "https://ocamba.com"
},
"winner": 0,
"primary_lang": "en"
}
],
"next_run_time": "2025-10-31 12:25:54",
"utm_tracking": {
"enabled": 1,
"utm_source": "${OCMH_UTM_SOURCE}",
"utm_medium": "${OCMH_UTM_MEDIUM}",
"utm_campaign": "${OCMH_CAMPAIGN_NAME}"
},
"status": "scheduled",
"is_draft": false,
"status_code": "start_time_in_future",
"effective_status": "scheduled",
"send_in_profile_time_zone": false,
"send_if_profile_time_passed": false,
"scheduled_run_times": [
{
"time": "2025-10-31 12:25:54",
"initiator": "manual",
"skip": false
}
],
"max_runs": 1,
"score": 0
}
400 Bad Request
{
"code": 400,
"title": "Bad request.",
"message": "The request is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}