Update Campaign
Copied
https://api.ocamba.com/v1/hood/campaigns/{id}
Copied
https://api.ocamba.com/v1/hood/campaigns/{id}
Updates the specific Campaign by setting the values of the parameters passed. Any parameters not provided will be left unchanged
Name
Descriptionidstringrequired
Unique resource identifier.Example: 12345
Name
Descriptionadexobject
Name
Descriptionadex_messages[ template-adex-message ]
Array of adex message objects.Adex Message
Name
Descriptionaccount_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 clickExample: 1
Possible values: 0 | 1
zone_idinteger
Push zone id created on Ocamba platform.Example: 1000321
integration_idstring
Adex channel does not have integrations, automatiacally set to 0.template_ids[ string ]
Array of valid adex template ids.emailobject
Name
Descriptionemail_messages[ template-email-message ]
Array of email message objects.Email message
Name
Descriptioncontentstring
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.
integration_idstring
Valid email integration id.Example: 1524
template_ids[ string ]
Array of valid email template ids.end_timedateTime
Schedule a campaign end time. Timezone: GMT.Example: 2024-10-27 22:32:00
labels[ string ]
Array of labels names.Example: cars,marketing
max_runsnumber (integer)
The maximum number of times a Campaign can be run.Example: 10
metadataobject
Name
Descriptionkeystring
Key for the metadata. Maximum 40 characters.Example: key
valuestring
Value for the metadata. Maximum 500 characters.Example: value
namestring
Name of the campaign, max 100 characters.Example: My first campaign
pushobject
Name
Descriptionadex_messages[ template-push-message ]
Array of push message objects.Push Message
Name
Descriptionactionspush-message-action
An array of action objects.Push Message Action
Name
Descriptioniconstring
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
Descriptionkeystring
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
Descriptionkeystring
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
Descriptionkeystring
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
integration_idstring
Push channel does not have integrations, automatiacally set to 0.template_ids[ string ]
Array of valid push template ids.repeat_with_cron[ campaign-cron ]
Defines the campaign's schedule through an array of objects.RepeatWithCron
Name
Descriptioncronstring
A cron expression automatically generated based on the provided minute, hour, day of the month, month, and day of the week values.Example: 0 1,3 * 2 *
days_of_montharray
An array of unique values specifying the day(s) of the month the Campaign should run. Valid values range from 1 to 31.Example: 5
days_of_weekarray
An array of unique values specifying the day(s) of the week the Campaign should run. 0 represents Sunday and 6 represents Saturday.Example: 0,4
hoursarray
An array of unique values specifying the hour(s) of the day the Campaign should run. Valid values range from 0 to 23.Example: 10
minutesarray
An array of unique values specifying the minute(s) of the hour the Campaign should run. Valid values range from 0 to 59.Example: 5
monthsarray
An array of unique values specifying the month(s) the Campaign should run. Valid values range from 1 to 12.Example: 12
repeat_with_ticker[ campaign-ticker ]
Defines the campaign's schedule through an array of objects.Time interval
Name
Descriptiondays_of_weekarray
Specifies the days of the week when the campaign will run, using an array of values where each number represents a day (e.g., 0 for Sunday, 6 for Saturday). For example, 2,5 would represent Tuesday and Friday.Example: 2,5
hournumber (integer)
Specifies the time interval in hours at which the campaign will execute.Example: 2
start_fromdateTime
The starting date and time from which the time interval will begin.Example: 2024-10-02 15:00
repeat_with_timearray (date-time)
Specifies the exact dates and times when the Campaign is scheduled to run.Example: 2024-10-12 07:27:12,2024-10-12 07:27:12
scorenumber (integer)
Campaign performance score.Example: 20
send_if_user_time_passedboolean
Send notification to users even if user time zone already passed.Example: true
Possible values: true | false
send_in_user_time_zoneboolean
Send notification to users based on their own local time zones.Example: true
Possible values: true | false
smsobject
Name
Descriptionintegration_idstring
Valid sms integration id.Example: 1511
sms_messages[ template-sms-message ]
Array of sms message objects.Sms Message
Name
Descriptioncontentobject
Name
Descriptionkeystring
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.Shorten Link
Name
Descriptionexpires_innumber (integer)
The amount of time in days in which the shortened link will expire. Minimum is 1 maximum is 60. Default value is 7.Example: 4
placeholderstring
Placeholder for the url in content. It must also be present in content of the sms. Maximum length is 20.Example: URL_1
urlstring
A valid url that will be shortened. The shortened version will replace the placeholder when sending sms. Maximum length is 1000.Example: https://ocamba.com
template_ids[ string ]
Array of valid sms template ids.start_timedateTime
Schedule a campaign start time. Timezone: GMT.Example: 2024-10-05 22:32:00
statusstring
The status of the Campaign.Example: active
Possible values: active | draft | inactive | paused | suspended
targetingcampaign-targeting
Targeting object.Campaign targeting
Name
Descriptionapplication_groupsobject
Name
Descriptionitems[ string ]
Array of hood application group ids created by the Ocamba platform.opstring
Example: neq
Possible values: eq | neq
applicationsobject
Name
Descriptionitems[ string ]
List of application ids with unique items and minimum length of 1. Every item should be valid full qualified domain name and can contain star (*).opstring
Example: eq
Possible values: eq | neq
browsersobject
Name
Descriptionitems[ string ]
Array of browser ids supported by Ocamba, max 100 items.opstring
Example: eq
Possible values: eq | neq
containersobject
Name
Descriptionitems[ string ]
Array of hood containers ids created on Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
countriesobject
Name
Descriptionitems[ string ]
Array of country codes supported by Ocamba (ISO 3166-1, 2 letter country codes), max 270 items.opstring
Example: eq
Possible values: eq | neq
engagement_scoreobject
Name
Descriptionfromnumber (integer)
Describes the lower threshold for engagement score when targeting users. Minimum value is 0, maximum is 100.Example: 11
tonumber (integer)
Describes the upper threshold for engagement score when targeting users. Minimum value is 1, maximum is 100.Example: 73
groupsobject
Name
Descriptionitems[ string ]
Array of hood group ids created on Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
languagesobject
Name
Descriptionitems[ string ]
Array of language codes supported by Ocamba (ISO 639-2, 2 letter language codes), max 50 items.opstring
Example: eq
Possible values: eq | neq
osobject
Name
Descriptionitems[ string ]
Array of os ids supported by Ocamba, max 50 items.opstring
Example: eq
Possible values: eq | neq
partnersobject
Name
Descriptionitems[ string ]
List of partner ids with unique items and minimum length of 1.opstring
Example: eq
Possible values: eq | neq
regionsobject
Name
Descriptionitems[ string ]
Region ids.opstring
Example: eq
Possible values: eq | neq
remote_usersobject
Name
Descriptionitems[ string ]
Array of remote user ids maximum length of 100, tracked by Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
subscribed_ageobject
Name
Descriptionfromnumber (integer)
Number in range 0-3500Example: 10
tonumber (integer)
Number in range 1-3500. Must be greater than 'from' field.Example: 100
user_dataobject
Name
Descriptionkeystring
Key can be any string which represents user specific data, max 100 characters. Key will be sanitized by removing leading and trailing whitespace, replacing all consecutive non-leading and non-trailing whitespaces with a single underscore, converting all character to lowercase and using only first 100 characters if there are over 100 characters.valueobject
Name
Descriptionitems[ string ]
Array of values, maximum 10 items.opstring
Example: eq
Possible values: eq | neq
usersobject
Name
Descriptionitems[ string ]
Array of user ids tracked by Ocamba platform, max 100 items.opstring
Example: eq
Possible values: eq | neq
telegramobject
Name
Descriptionintegration_idstring
Valid telegram integration id.Example: 1531
telegram_messages[ template-telegram-message ]
Array of telegram message objects.Telegram Message
Name
Descriptioncontentstring
Content of the telegram message.Example: Hello from Ocamba!
template_ids[ string ]
Array of valid telegram template ids.webhooks[ campaign-webhooks ]
Defines an array of webhook objects, with a maximum of 3 entries.Webhooks
Name
Descriptionnamestring
A user-provided name for the webhook, which must be unique within the array.Example: webhook example
204 - No Content
note
1 Updatable fields are name, description, status, labels, metadata, start_time, end_time, repeat_with_cron, repeat_with_ticker, repeat_with_time, send_in_user_time_zone, send_if_user_time_passed, quiet_hours, max_runs, webhooks, push, adex, email, sms, targeting, deal_id, score.
tip
1 If you don't know the campaign id, list the campaigns to find it.