View a Campaign
View a Campaign
GET
https://api.ocamba.com/v1/hood/campaigns/{id}
Retrieves the details of a Campaigns that has previously been created if a valid identifier was provided
Rate limits:
Burst: 10/s
Steady: 150/m
Path parameters
parametersQuery parameters
parametersResponse schemas
›
200
application/json
›
500
application/json
GET https://api.ocamba.com/v1/hood/campaigns/{id} HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
curl -X GET "https://api.ocamba.com/v1/hood/campaigns/{id}" \
-H "Authorization: Bearer $TOKEN"
fetch("https://api.ocamba.com/v1/hood/campaigns/{id}", {
method: "GET",
headers: { Authorization: `Bearer ${TOKEN}` }
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v1/hood/campaigns/{id}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $token"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
{
"total": 1,
"items": [
{
"id": "1000248",
"company_id": "1000000",
"creator_id": "1000223",
"creator": {
"id": "1000163",
"company_id": "1000000",
"name": "John Doe",
"status": "active",
"image": "https://image-uri-example.com"
},
"financial_performance": {
"items": [
{
"event_name": "Cost",
"event": "cost",
"event_date": "2024-10-01",
"cost": "500",
"revenue": "500"
}
],
"profit": "300"
},
"name": "My First Campaign",
"description": "This is my first campaign on the Hood application.",
"labels": "cars,bwm,audi,volkswagen",
"metadata": {
"key": "key",
"value": "value"
},
"send_strategy": "manual",
"was_launched": true,
"ab_test": {
"name": "My First A/B Test",
"test_split": 30,
"winning_metric": "click_rate",
"evaluation_window": "5D 20H 30M",
"winner_delivery_mode": "manual"
},
"messages": [
{
"id": "1024",
"company_id": "1000000",
"name": "My first Message",
"campaign_id": "1000222",
"channel": "email",
"integration_id": "0",
"template_id": "1024",
"primary_lang": "en",
"email": {
"sender_name": "John Doe",
"sender_email": "[email protected]",
"subject": "All products 20% off!",
"preheader": "Enjoy a 20% discount on all products from the assortment",
"reply_to": "[email protected]",
"html": {
"key": "en",
"value": "Title example"
}
},
"push": {
"title": {
"key": "en",
"value": "Title example"
},
"body": {
"key": "en",
"value": "Hello world"
},
"image": {
"key": "en",
"value": "https://www.exampleimage.com/"
},
"landing_url": "https://www.landingurl.com/",
"icon": "https://www.iconexample.com",
"tag": "tag",
"require_interaction": "1",
"renotify": "0",
"silent": "0",
"vibration": "100,100,200",
"badge": "https://www.badgeexample.com",
"actions": {
"title": "{\n \"en\": \"en_title\"\n \"de\": \"de_title\"\n}",
"icon": "https://www.iconexample.com",
"url": "https://www.urlexample.com"
}
},
"sms": {
"content": {
"key": "en",
"value": "Content example"
},
"shorten_links": [
{
"placeholder": "URL_1",
"url": "https://ocamba.com",
"expires_in": 4
}
]
},
"test_result": 33.33,
"winner": 1,
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
],
"end_time": "2024-10-06 10:00:00",
"next_run_time": "2024-10-06 09:00:00",
"last_run_time": "2024-10-06 09:00:00",
"scheduled_time": "2024-10-06 10:00:00",
"recurrence": {
"pattern": {
"minute": 10,
"hour": 10,
"weekdays": [
4
],
"months": [
12
]
},
"cron": "0 0 * * *"
},
"utm_tracking": {
"enabled": 1,
"utm_source": "OCMH_UTM_SOURCE",
"utm_medium": "OCMH_UTM_MEDIUM",
"utm_campaign": "OCMH_CAMPAIGN_NAME",
"utm_term": "keyword",
"utm_id": "OCMH_CAMPAIGN_ID",
"utm_content": "html",
"custom": {
"key": "key"
}
},
"status": "scheduled",
"status_code": "start_time_in_future",
"is_draft": true,
"effective_status": "active",
"send_in_profile_time_zone": true,
"send_if_profile_time_passed": true,
"quiet_hours": {
"from": 2,
"to": 12
},
"last_run_initiator": "time_pattern",
"scheduled_run_times": [
{
"time": "2024-10-06 15:04:00",
"initiator": "time_pattern",
"skip": true
}
],
"max_runs": 2,
"targeting": {
"countries": {
"items": [
"US"
],
"op": "in"
},
"languages": {
"items": [
"en"
],
"op": "in"
},
"os": {
"items": [
"4"
],
"op": "in"
},
"browsers": {
"items": [
"12"
],
"op": "in"
},
"containers": {
"items": [
"2309876111"
],
"op": "in"
},
"groups": {
"items": [
"164"
],
"op": "in"
},
"application_groups": {
"items": [
"1014"
],
"op": "nin"
},
"regions": {
"items": [
"2661876"
],
"op": "in"
},
"partners": {
"items": [
"2661876"
],
"op": "in"
},
"applications": {
"items": [
"2661876"
],
"op": "in"
},
"engagement_score": {
"from": 11,
"to": 73
},
"profile_age": {
"from": 10,
"to": 100
},
"custom_properties": {
"value": {
"items": [
"foo"
],
"op": "eq"
}
},
"profile_lists": {
"items": [
"1000114"
],
"op": "nin"
},
"segment_lists": {
"items": [
"1000114"
],
"op": "in"
},
"utm_sources": {
"items": [
"Facebook"
],
"op": "in"
}
},
"deal_id": "1000251",
"score": 20,
"stats": {
"total_user": 11,
"delivered": 11,
"failed": 11,
"conversion": 11,
"churn": 11.52
},
"run_counter": 2,
"evaluated": true,
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
]
}
500 Internal Server Error
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses
Tip
1
If you don’t know the campaign id, list the campaigns to find it.