Create Container


                https://api.ocamba.com/v1/hood/containers
            

Creates a Container


Name
Description
account_idstring
The ID of the Account, generated by the Ocamba. This field is deprecated and will be removed in future. Please use partner as a replacement.


Example: 1000001

analyticsobject

Name
Description
domainstring
Location where the analytics of the Container are located.


Example: t.ocmthood.com

enabledboolean
Determines wheather the analytics of the Container are enabler or not.


Example: true

overrideboolean
When set, enabled field is checked in the background. Only for Android and IOS type containers.


Example: true

applicationsobject

Name
Description
appstring
The name of the app. Has to be a fully qualified domain name.


Example: example-app.com

create_timestring
Last update time of the Application. Timezone: GMT.


Example: 2021-10-30 14:27:26

include_subdomainsboolean
Determines if the Container includes subdomains of the app.


Example: true

consentobject

Name
Description
enabledboolean
Determines if the Consent approved or not.


Example: true

overrideboolean
When set, enabled field is checked in the background. Only for Android and IOS type containers.


Example: true

descriptionstring
The description of the Container.


Example: This is an example of description.

namestringrequired
Name of the Container


Example: Container Example

partner_idstringrequired
The ID of the Partner, generated by the Ocamba.


Example: 1000001

pushobject

Name
Description
apns_envstring
Determines the Apns P12 Environment


Example: production

Possible values: production sandbox

apns_p12string
Dependant on the environment field. Only valid as a base64 encoded string and with valid password, if the certificate requires any. Only for IOS type tags.

apns_p12_passwordstring
The password of the Apns P12 certificate. Only for IOS type containers.

domainstring



Example: t.ocmhood.com

enabledboolean
Determines if Push is enabled or not.

firebase_admin_sdk_jsonstring
Must be a base64 encoded string representing the FirebaseAdminSdk object. Only for Android type containers.

has_apns_p12boolean
Determines if the Apns P12 certificate had been set. Generated by the Ocamba. Only for IOS type containers.

has_firebase_admin_sdk_jsonboolean
Determines if the FirebaseAdminSdk object had been set. Generated by the Ocamba. Only for Android type containers.

overrideboolean
When set, enabled field is checked in the background. Only for Android and IOS type containerss.


Example: true

promptprompt
Prompt object.
Prompt
Name
Description
create_timestring
Create time of the Tag. Timezone: GMT.


Example: 2021-10-29 12:47:00

filters[ object ]
Array of prompt filter objects.

idstring
Id of the prompt. Generated by the Ocamba.


Example: 0cb3502c-7fee-49c3-8a27-39e3df66fc8e

namestring
Name of the Prompt.


Example: New Native Prompt

optionsobject

Name
Description
actionmessage_colorstring
Action message color in RGB hexadecimal code.


Example: d94552

background_colorstring
Background color in RGB hexadecimal code.


Example: 4a88d9

category[ object ]
Array of category objects. Each object consists of two keys, one is 'name' and second is 'label'. Label represents text displayed to end user, and 'name' represents programmatic variable name.


Example: [ {"name":"key1","label":"sport"}, {"name":"key2","label":"politics"}, {"name":"key3","label":"business"} ]

delaynumber
Trigger window prompt after N seconds.


Example: 4

iconstring
Icon URL.


Example: https://icon.com/favicon.ico

label_colorstring
Label color in RGB hexadecimal code.


Example: 4a88d9

onclickboolean
Trigger window prompt in event of any user click on page.


Example: true

oncustomstring
Trigger window prompt on custom event with specific string with name of event, document.dispatchEvent(new Event("bilosta"));


Example: event

onscrollboolean
Trigger window prompt in event of any user scroll.


Example: true

state_button_negative_promptstring
Negative button name.


Example: Don't Allow

state_button_positive_promptstring
Positive button name.


Example: Allow

state_text_promptstring
Text which will be shown on window prompt.


Example: Allow notifications on your device to get latest news.

subscribe_backgroundstring
Subscribe background color in RGB hexadecimal code.


Example: 9479d9

subscribe_colorstring
Subscribe color in RGB hexadecimal code.


Example: 9479d9

unsubscribe_colorstring
Unsubscribe color in RGB hexadecimal code.


Example: e6543e

typestring
Type of the Prompt


Example: native

Possible values: slide | bell | link | native | html

update_timestring
Last update time of the Tag. Timezone: GMT.


Example: 2021-10-30 14:27:26

service_workerobject

Name
Description
pathstring
Path of the Service Worker.


Example: /sw.js

scopestring
Scope of the service worker isn't adjustable yet.


Example: example-scope

vapid_public_keystring
Exists only for web type containers. Generated by the Ocamba.


Example: BCNgZE2uKpC0T9rx65suEzjsXlNz3kXxcVHcFjQ6tDLQpF8lsFd1XBuwdZ2JHPzvU1A8X6QZFtN1w63imLqKNbs

statusstring
Determines the status of the Container.


Example: active

Possible values: active verification rejected paused inactive pending disabled

typestringrequired
Determines the type of application the Container is suited for.


Example: web

Possible values: web android ios
note
1 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.

2 We recommend using partner_id instead of account_id, as accounts are deprecated.
200 Arrow
{       
  "partner_id": "24097548",
  "name": "Example Name",
  "type": "web",
  "status": "active",
  "applications": [
      {
        "app": "example.com",
        "include_subdomains": true
      }
  ]
}
201 Arrow
"id": "15453",
"company_id": "6197120",
"partner_id": "24097548",
"creator_id": "1000223",
"type": "web",
"name": "Example Name",
"status": "active",
"applications":[
  {
    "app": "example.com",
    "include_subdomains": false,
    "create_time": "2023-12-25 14:55:15"
    }
  ],
"utm_ht": "NjY4bL60N1eBPTQ2BG8xNDY4MjE0Nuzp",
"push": {
  "enabled": true,
  "prompts": [
    {
      "id": "c563fc2d-abe5-4dd9-afee-78981d335e6a",
      "name": "Default Native Prompt",
      "type": "native",
      "options": {
        "delay": null,
        "onclick": false,
        "onscroll": true
      },
      "create_time": "2023-12-25 14:55:15",
      "update_time": "2023-12-25 14:55:15"
    }
  ],
  "vapid_public_key": "BDSBkOzg2fs5NNkVOvs8hvZitQfIo3x45C_XgTkhf_vYy1VCJGm6vyQ2ww9tRjMY9nVQFk8BVpwzmK_M1zOG72k"
},
"analytics": {
  "enabled": false,
  "domain": "dev-t.ocmthood.com"
},
"consent": {
  "enabled": true
}}