Create a Campaign
Create a Campaign
POST
https://api.ocamba.com/v1/hood/campaigns
Creates a new campaign with the provided data. All required fields must be included in the request body. Upon successful creation, the new campaign is persisted and the full campaign object is returned in the response.
Note
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.
Tip
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 ‘draft’ as status field.
Warning
If you pass the run_immediately field as 1, the campaign will execute automatically upon it’s creation.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Request schema
bodyResponse schemas
›
201
application/json
›
400
application/json
›
500
application/json
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 Multilang Campaign",
"messages": [
{
"name": "Multilang Message",
"channel": "push",
"primary_lang": "it",
"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",
"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",
"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 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!"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT"
],
"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 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!"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT"
],
"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 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!"
]
]
]
],
"targeting" => [
"countries" => [
"items" => [
"IT"
],
"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 Email Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"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>"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 Email Campaign",
"scheduled_time": "2026-10-10 10:00:00",
"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>"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 Email Campaign",
"scheduled_time" => "2026-10-10 10:00:00",
"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>"
]
]
]
],
"targeting" => [
"countries" => [
"items" => [
"IT",
"CH",
"DE"
],
"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 SMS Draft Asdasda",
"is_draft": true,
"messages": [
{
"name": "Test SMS Draft Asdasda",
"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 Asdasda",
"is_draft": true,
"messages": [
{
"name": "Test SMS Draft Asdasda",
"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 Asdasda",
"is_draft" => true,
"messages" => [
[
"name" => "Test SMS Draft Asdasda",
"channel" => "sms",
"integration_id" => "1853",
"sms" => [
"content" => [
"en" => "Welcome to 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 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"
},
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 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"
},
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 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"
],
"targeting" => [
"countries" => [
"items" => [
"IT",
"CH",
"DE"
],
"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 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>"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 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>"
}
}
}
],
"targeting": {
"countries": {
"items": [
"IT",
"CH",
"DE"
],
"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 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>"
]
]
]
],
"targeting" => [
"countries" => [
"items" => [
"IT",
"CH",
"DE"
],
"op" => "in"
]
]
]
));
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"
}
Responses