Create Container
Create Container
POST
https://api.ocamba.com/v1/hood/containers
Creates a Container
Warning
Applications field is required when creating IOS and Android type of containers.
Note
Web app names are sanitized to be all lowercase. Android and iOS app names stay the same.
We recommend using partner_id instead of account_id, as accounts are deprecated.
When a container is created it will get status ’not-installed’ by default. The status will change to ‘active’ when an event is registered for that container.
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/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Container",
"type": "web",
"partner_id": "6197120"
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"name": "Example Container",
"type": "web",
"partner_id": "6197120"
}
)
};
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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"name" => "Example Container",
"type" => "web",
"partner_id" => "6197120"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "6197120",
"type": "ios",
"name": "Test IOS container",
"applications": [
{
"app": "com.Bookstore.Example"
}
]
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "6197120",
"type": "ios",
"name": "Test IOS container",
"applications": [
{
"app": "com.Bookstore.Example"
}
]
}
)
};
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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "6197120",
"type" => "ios",
"name" => "Test IOS container",
"applications" => [
[
"app" => "com.Bookstore.Example"
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "6197120",
"type": "android",
"name": "Test android container",
"applications": [
{
"app": "com.Online.com"
}
]
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "6197120",
"type": "android",
"name": "Test android container",
"applications": [
{
"app": "com.Online.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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "6197120",
"type" => "android",
"name" => "Test android container",
"applications" => [
[
"app" => "com.Online.com"
]
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "6197120",
"type": "web",
"name": "Example Web container",
"applications": [
{
"app": "example.com"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for a Web Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"auto_resubscribe": true,
"suppress_prompts_on_subdomains": false,
"service_worker": {
"path": "/sw.js",
"scope": "scope"
}
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "6197120",
"type": "web",
"name": "Example Web container",
"applications": [
{
"app": "example.com"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for a Web Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"auto_resubscribe": true,
"suppress_prompts_on_subdomains": false,
"service_worker": {
"path": "/sw.js",
"scope": "scope"
}
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}
)
};
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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "6197120",
"type" => "web",
"name" => "Example Web container",
"applications" => [
[
"app" => "example.com"
]
],
"enable_tags" => true,
"enable_modals" => true,
"description" => "A description for a Web Container.",
"icon" => "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status" => "not-installed",
"push" => [
"enabled" => true,
"override" => false,
"domain" => "t.example.com",
"auto_resubscribe" => true,
"suppress_prompts_on_subdomains" => false,
"service_worker" => [
"path" => "/sw.js",
"scope" => "scope"
]
],
"analytics" => [
"enabled" => true,
"override" => true,
"domain" => "dev-t.ocmhood.com"
],
"crashlytics" => [
"enabled" => false,
"override" => true,
"domain" => "a.example.com"
],
"consent" => [
"enabled" => true,
"override" => false
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "6197120",
"type": "ios",
"name": "Example IOS container",
"applications": [
{
"app": "com.yourApp.BookstreForExample"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for an IOS Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"apns_env": "sandbox",
"apns_p12": "{base64_encoded_p12_file}",
"apns_p12_password": "p12_pass_example",
"auto_resubscribe": false,
"suppress_prompts_on_subdomains": true
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "6197120",
"type": "ios",
"name": "Example IOS container",
"applications": [
{
"app": "com.yourApp.BookstreForExample"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for an IOS Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"apns_env": "sandbox",
"apns_p12": "{base64_encoded_p12_file}",
"apns_p12_password": "p12_pass_example",
"auto_resubscribe": false,
"suppress_prompts_on_subdomains": true
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}
)
};
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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "6197120",
"type" => "ios",
"name" => "Example IOS container",
"applications" => [
[
"app" => "com.yourApp.BookstreForExample"
]
],
"enable_tags" => true,
"enable_modals" => true,
"description" => "A description for an IOS Container.",
"icon" => "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status" => "not-installed",
"push" => [
"enabled" => true,
"override" => false,
"domain" => "t.example.com",
"apns_env" => "sandbox",
"apns_p12" => "[base64_encoded_p12_file]",
"apns_p12_password" => "p12_pass_example",
"auto_resubscribe" => false,
"suppress_prompts_on_subdomains" => true
],
"analytics" => [
"enabled" => true,
"override" => true,
"domain" => "dev-t.ocmhood.com"
],
"crashlytics" => [
"enabled" => false,
"override" => true,
"domain" => "a.example.com"
],
"consent" => [
"enabled" => true,
"override" => false
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);curl -X POST \
"https://api.ocamba.com/v1/hood/containers" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"partner_id": "6197120",
"type": "android",
"name": "Example Android container",
"applications": [
{
"app": "com.yourApp.BookstreForExample"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for an IOS Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"firebase_admin_sdk_json": "{base64_encoded_firebase_json_file}",
"auto_resubscribe": false,
"suppress_prompts_on_subdomains": true
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}'const url = 'https://api.ocamba.com/v1/hood/containers';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"partner_id": "6197120",
"type": "android",
"name": "Example Android container",
"applications": [
{
"app": "com.yourApp.BookstreForExample"
}
],
"enable_tags": true,
"enable_modals": true,
"description": "A description for an IOS Container.",
"icon": "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status": "not-installed",
"push": {
"enabled": true,
"override": false,
"domain": "t.example.com",
"firebase_admin_sdk_json": "{base64_encoded_firebase_json_file}",
"auto_resubscribe": false,
"suppress_prompts_on_subdomains": true
},
"analytics": {
"enabled": true,
"override": true,
"domain": "dev-t.ocmhood.com"
},
"crashlytics": {
"enabled": false,
"override": true,
"domain": "a.example.com"
},
"consent": {
"enabled": true,
"override": false
}
}
)
};
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/containers");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"partner_id" => "6197120",
"type" => "android",
"name" => "Example Android container",
"applications" => [
[
"app" => "com.yourApp.BookstreForExample"
]
],
"enable_tags" => true,
"enable_modals" => true,
"description" => "A description for an IOS Container.",
"icon" => "https://media.lordicon.com/icons/wired/outline/2521-example.svg",
"status" => "not-installed",
"push" => [
"enabled" => true,
"override" => false,
"domain" => "t.example.com",
"firebase_admin_sdk_json" => "[base64_encoded_firebase_json_file]",
"auto_resubscribe" => false,
"suppress_prompts_on_subdomains" => true
],
"analytics" => [
"enabled" => true,
"override" => true,
"domain" => "dev-t.ocmhood.com"
],
"crashlytics" => [
"enabled" => false,
"override" => true,
"domain" => "a.example.com"
],
"consent" => [
"enabled" => true,
"override" => false
]
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "15453",
"company_id": "6197120",
"partner_id": "6197120",
"account_id": "6197120",
"creator_id": "1000223",
"enable_tags": true,
"enable_modals": true,
"type": "web",
"name": "Example Container",
"status": "not-installed",
"utm_ht": "NjY4bL60N1eBPTQ2BG8xNDY4MjE0Nuzp",
"push": {
"enabled": true,
"domain": "t.ocmhood.com"
"vapid_public_key": "BDSBkOzg2fs5NNkVOvs8hvZitQfIo3x45C_XgTkhf_vYy1VCJGm6vyQ2ww9tRjMY9nVQFk8BVpwzmK_M1zOG72k"
"auto_resubscribe": true,
"suppress_prompts_on_subdomains": false
},
"analytics": {
"enabled": false,
"domain": "t.ocmthood.com"
},
"crashlytics": {
"enabled": true,
"domain": "t.ocmhood.com"
},
"consent": {
"enabled": false
},
"autoconf_status": "active"
}
400 Bad Request
{
"code": 400,
"detail": "The name is required.",
"title": "Bad Request"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses