Create Prompt on a specific Container
https://api.ocamba.com/v1/hood/containers/{id}/push-prompts
https://api.ocamba.com/v1/hood/containers/{id}/push-prompts
Creates a new Push Prompt
Rate limits:
Burst: 10/s
Steady: 150/m
Name
Descriptionidstringrequired
Unique resource identifier.Example: 12345
Name
Descriptionfilters[ prompt-filter ]
Prompt filter
Name
Descriptionfilters[ object ]
Array of filter objects. This object is the same as the tag filter object(including this field).opstring
Filter operator.Possible values: eq | neq | lt | lte | gt | gte | is-set | is-not-set | is-empty | is-not-empty | is-true | is-false | contains | not-contains | starts-with | not-starts-with | ends-with | not-ends-with | match-css | not-match-css | match-regex | not-match-regex | match-regex-no-case | not-match-regex-no-case
valuestring
Filter value. Minimum 1, maximum 1000 characters.Example: Some-value
variablestring
Variable to filter. You can add either system or user-defined variables, and each variable must have a valid id.Example: campaign
namestringrequired
Name of the Prompt.Example: New Native Prompt
optionsobjectrequired
Name
Descriptionactionmessage_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 PromptExample: native
Possible values: slide | bell | link | native | html
201 - Created
1 The id parameter is a valid Container id to which the Push Prompt will be added.
2 The type can not be changed.
3 The options field isn't required for native prompts only in web type of container.