Create Container

Create Container

POST https://api.ocamba.com/v1/hood/containers
Creates a Container

Rate limits:

  • Burst: 10/s
  • Steady: 150/m

Request schema

body

Response schemas

curl -X POST \
 "https://api.ocamba.com/v1/hood/containers" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "partner_id": "24097548",
  "name": "Example Name",
  "type": "web",
  "applications": [
    {
      "app": "example.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": "24097548",
      "name": "Example Name",
      "type": "web",
      "applications": [
        {
          "app": "example.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" => "24097548",
    "name" => "Example Name",
    "type" => "web",
    "applications" => [
      [
        "app" => "example.com"
      ]
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

{
  "id": "15453",
  "company_id": "6197120",
  "partner_id": "24097548",
  "account_id": "24097548",
  "creator_id": "1000223",
  "enable_tags": true,
  "enable_modals": true,              
  "type": "web",
  "name": "Example Name",
  "status": "not-installed",
  "applications":[
    {
      "app": "example.com",
      "create_time": "2023-12-25 14:55:15"
      }
    ],
  "utm_ht": "NjY4bL60N1eBPTQ2BG8xNDY4MjE0Nuzp",
  "push": {
    "enabled": true,
    "domain": "dev-t.ocmhood.com",
    "prompts": [
        {
            "id": "923c93ca-a339-413a-ad0c-2468cd5ecbd2",
            "name": "Default Native Prompt",
            "type": "native",
            "options": {
                "delay": null,
                "onclick": false,
                "onscroll": true
            },
            "create_time": "2025-10-24 08:27:49",
            "update_time": "2025-10-24 08:27:49"
        }
    ],
    "vapid_public_key": "BDSBkOzg2fs5NNkVOvs8hvZitQfIo3x45C_XgTkhf_vYy1VCJGm6vyQ2ww9tRjMY9nVQFk8BVpwzmK_M1zOG72k"
    "auto_resubscribe": true,
    "suppress_prompts_on_subdomains": false
  },
  "analytics": {
    "enabled": false,
    "domain": "dev-t.ocmthood.com"
  },
      "crashlytics": {
      "enabled": true,
      "domain": "dev-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
Note

Web app names are sanitized to be all lowercase. Android and iOS app names stay the same. Mandatory fields are Container Name, Partner Id and Type.

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.