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
Name
Descriptionidstringrequired
Unique resource identifier.Example: 12345
Name
Descriptionfilters[ object ]
Array of prompt filter objects.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
note
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.