Create Template


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

Creates a Template


Name
Description
Adex message object.
Adex Message
Name
Description
account_idarray
Array of account ids created on Ocamba platform.


Example: 123456,654321

campaign_idarray
Array of campaign ids created on Ocamba platform.


Example: 1367890,1098763

default_campaign_idinteger
Campaign id created on Ocamba platform.


Example: 1036975

group_idarray
Array of group ids created on Ocamba platform.


Example: 113,22,374

number_of_messagesinteger
Minimal value is 1, maximal value is 10.


Example: 4

Default: 1

repeat_on_clickinteger
Repeats action on click


Example: 1

Possible values: 0 | 1

zone_idinteger
Push zone id created on Ocamba platform.


Example: 1000321

descriptionstring
The description of the Template.


Example: This is an example of description.

Email object.
Email message
Name
Description
contentstring
The email content. string[1 .. 65535] characters.


Example: 60% Off One Item Just Added to the Sale! Click here!

preheaderstring
The preheader is the text to the right of the subject line that gives a brief preview of the email. string[1 .. 100] characters.


Example: 60% Off One Item Just Added to the Sale!

subjectstring
The subject of the email. string[1 .. 78] characters.


Example: My first email with Ocamba.

namestringrequired
Name of the Template


Example: Template Example

Push message object.
Push Message
Name
Description
An array of action objects.
Push Message Action
Name
Description
iconstring
Visual attribute presented to the user. Must be a valid url.


Example: https://www.iconexample.com

titleobject
The main textual aspect as pairs of keys and values, where key represents language and value title in that language.


Example: { "en": "en_title" "de": "de_title" }

urlstring
The landing url of the action.


Example: https://www.urlexample.com

badgestring
Monochromatic mini-icon which portrays to user source where he subscribed in the first place.


Example: https://www.badgeexample.com

bodyobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 120 characters.


Example: Hello world

iconstring
Secondary visual attribute presented to the user. Must be a valid url.


Example: https://www.iconexample.com

imageobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 1000 characters.


Example: https://www.exampleimage.com/

landing_urlstring
The url of the site the user is redirected to when clicking on the notification.


Example: https://www.landingurl.com/

renotifystring
Replacing old notification with the new one using the silent method. Applicable only with tag option.


Example: 0

Possible values: 0 | 1

require_interactionstring
Demand action execution from the user. Applicable only for desktop users. Acts like a boolean.


Example: 1

Possible values: 0 | 1

silentstring
Serving notification without sound and vibration. Applicable only to mobile devices.


Example: 0

Possible values: 0 | 1

tagstring
This option enables the removal of notifications with the same tag which were delivered earlier.


Example: tag

titleobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 70 characters.


Example: Title example

vibrationstring
Two vibration pulses with customizable length and pause between them, described in milliseconds (200,100,200 formats), will start when a notification is displayed. Applicable only for Android users.


Example: 100,100,200

Sms message object.
Sms Message
Name
Description
contentobject

Name
Description
keystring
Language code supported by Ocamba platform (ISO 639-2, 2 letter language codes).


Example: en

valuestring
Maximum 160 characters.


Example: Content example

shorten_links[ shorten-link ]
Array of shorten link objects, maximum length is limited by content length. If a placeholder in content has less than 23 characters it will count as 23 characters.

Telegram Message
Name
Description
contentstring
Content of the telegram message.


Example: Hello from Ocamba!
tip
1 It is required to set at least one channel type.
Adex, push message Arrow
{
  "name": "Template example",
  "push": {
    "title": {
      "en": "first title"
    },
    "landing_url": "https://example.com",
    "actions": [
      {
        "title": {
          "en": "first title"
        }
      }
    ]
  },
  "adex": {
    "zone_id": "30303030",
    "account_id": [
      "1001001",
      "2002002",
      "3003003"
    ],
    "number_of_messages": 3,
    "repeat_on_click": 0
  }
}
{
  "name": "all",
  "description": "description",
  "push": {
      "title": {
          "en": "title",
          "ar": "ar title",
          "bg": "bg title",  
      },
      "body": {
          "en": "body",
          "ar": "ar body",
          "bg": "bg body",  
      },   
      "icon": "https://www.011shop.rs/uploads/store/products/images/majica.jpg",
      "landing_url": "https://example",
      "tag": "tag",
      "require_interaction": 1,
      "renotify": 1,
      "silent": 1,
      "vibration": "100,100,100",
      "badge": "https://www.ocamba.com/baddge",
      "actions": [
          {
              "title": {
                  "ar": "ar example",
                  "bg": "bg example",
                  "en": "ca example"
              },
              "icon": "https://www.011shop.rs/uploads/store/products/images/majica.jpg",
              "url": "https://www.011shop.rs/uploads/store/products/images/majica.jpg"
          }
      ]
  },
  "adex": {
      "zone_id": "3000651",
      "account_id": [
          "6197120",
          "77957571",
          "26544179",
          "90921878",
          "24097548",
          "11117473",
          "98884220",
          "15881112",
          "86446726",
          "39578887",
          "98482244",
          "90653569",
          "52129304",
          "25005510",
          "42084773",
          "45945959",
          "44498263",
          "62464120",
          "47699893",
          "18140335"
      ],
      "campaign_id": [
          "1014025",
          "1013160",
          "1011958",
          "1011222",
          "1013027",
          "1012490",
          "1013688",
          "1013134",
          "1011619",
          "1011612",
          "1011591",
          "1014086",
          "1012320",
          "1013036",
          "1012985",
          "1012863",
          "1013376",
          "1012158",
          "1012055"
      ],
      "group_id": [
          "1747"
      ],
      "default_campaign_id": "1011222",
      "number_of_messages": 1,
      "repeat_on_click": 0
  },
  "sms": {
      "content": {
          "en": "en title${URL_0}",
          "vi": "vi title",
          "zh": "zh title"
      },
      "shorten_links": [
          {
              "placeholder": "URL_0",
              "url": "https://ocamba.com",
              "expires_in": 7
          }
      ]
  },
  "email": {
      "subject": "some subject",
      "preheader": "sale!",
      "content": "sale, 60%. Click here!"
  }
}
201 Arrow
{
  "id": "1002",
  "company_id": "123456",
  "name": "all",
  "description": "description",
  "channels": [
      "push",
      "sms",
      "adex",
      "email"
  ],
  "push": {
      "title": {
          "en": "title",
          "ar": "ar title",
          "bg": "bg title",  
      },
      "body": {
          "en": "body",
          "ar": "ar body",
          "bg": "bg body",  
      },   
      "icon": "https://www.011shop.rs/uploads/store/products/images/majica.jpg",
      "landing_url": "https://example",
      "tag": "tag",
      "require_interaction": 1,
      "renotify": 1,
      "silent": 1,
      "vibration": "100,100,100",
      "badge": "https://www.ocamba.com/baddge",
      "actions": [
          {
              "title": {
                  "ar": "ar example",
                  "bg": "bg example",
                  "en": "ca example"
              },
              "icon": "https://www.011shop.rs/uploads/store/products/images/majica.jpg",
              "url": "https://www.011shop.rs/uploads/store/products/images/majica.jpg"
          }
      ]
  },
  "adex": {
      "zone_id": "3000651",
      "account_id": [
          "6197120",
          "77957571",
          "26544179",
          "90921878",
          "24097548",
          "11117473",
          "98884220",
          "15881112",
          "86446726",
          "39578887",
          "98482244",
          "90653569",
          "52129304",
          "25005510",
          "42084773",
          "45945959",
          "44498263",
          "62464120",
          "47699893",
          "18140335"
      ],
      "campaign_id": [
          "1014025",
          "1013160",
          "1011958",
          "1011222",
          "1013027",
          "1012490",
          "1013688",
          "1013134",
          "1011619",
          "1011612",
          "1011591",
          "1014086",
          "1012320",
          "1013036",
          "1012985",
          "1012863",
          "1013376",
          "1012158",
          "1012055"
      ],
      "group_id": [
          "1747"
      ],
      "default_campaign_id": "1011222",
      "number_of_messages": 1,
      "repeat_on_click": 0
  },
  "sms": {
      "content": {
          "en": "en title${URL_0}",
          "vi": "vi title",
          "zh": "zh title"
      },
      "shorten_links": [
          {
              "placeholder": "URL_0",
              "url": "https://ocamba.com",
              "expires_in": 7
          }
      ]
  },
  "email": {
      "subject": "some subject",
      "preheader": "sale!",
      "content": "sale, 60%. Click here!"
  },
  "create_time": "2024-07-03 06:42:30",
  "update_time": "2024-07-03 06:42:30"
}