Update Template


                https://api.ocamba.com/v1/hood/templates/{id}
            

Updates a specific Template by setting the values of the parameters passed. Any parameters not provided will be left unchanged.


Name
Description
idstringrequired
Unique resource identifier.


Example: 12345

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.

namestring
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!

204 - No Content
Arrow

note
1 At least one of the updatable fields should be sent via HTTP body in order to change the current state of the template.
tip
1 If you don't know the Template 'id', list the Templates to find it.

200 Arrow
{
  "name": "Test adex update update 2",
  "adex": {
      "zone_id": "1012498",
      "account_id": [
          "53445975"
      ],
      "campaign_id": [
          "1074920",
          "1075027",
          "1075026",
          "1074978",
          "1074977"
      ],
      "group_id": [
          "636"
      ],
      "default_campaign_id": "1074977",
      "number_of_messages": 5,
      "repeat_on_click": 1
  }
}