Schedules
Schedule notifications for delivery.
Schedule object
A schedule object consists of a schedule, i.e., a future delivery time, an optional name, and a push object.
OBJECT PROPERTIES- localization_ids array[string]
An array of identifiers used for reporting. Each ID represents a localized message (push object with
localizationsarray). - name string
An optional string.
A push object describes everything about a push notification, including the audience and push payload. A push object is composed of up to seven attributes.
- push_ids array[string]
An array of the push IDs associated with the schedule. The
push_idskey is set by the server, and so is present in responses but not in creation requests sent from the client. Requests that contain this key will return aHTTP 400 Bad Request. - schedule objectREQUIREDAny of
The delivery time specified in UTC.
- Recurring schedule object
Recurring schedules allow you to send a message multiple times at a set cadence. This is useful for subscription reminders, birthdays, etc. This is accomplished by adding recurring data to the schedule endpoint.
OBJECT PROPERTIES- recurring objectOBJECT PROPERTIES
- cadence objectREQUIRED
Defines how often the message is to be sent. It consists of the type (unit) and an optional value (count).
One of- Standard Cadence objectOBJECT PROPERTIES
- count integerREQUIRED
The frequency of messaging corresponding to the
type. For example, acountof 2 results in a message every 2 hours, days, weeks, months, etc. based on thetypevalue. - type stringREQUIRED
The unit of measurement for the cadence.
Possible values:
hourly,daily,monthly,yearly
- Weekly Cadence objectOBJECT PROPERTIES
- count integerREQUIRED
The frequency of messaging on the weekly cadence. For example, a
countof 2 results in a message every 2 weeks. - days_of_week string
The days of the week on which Airship can send your message.
Possible values:
monday,tuesday,wednesday,thursday,friday,saturday,sunday - type stringREQUIRED
Possible values:
weekly
- end_time string
The date-time when the schedule will end and stop sending messages.
- exclusions array
The date-time ranges when messages are not sent.
- paused boolean
If
true, the schedule is paused, and will not result in sends at the regularly scheduledcadence.
- url string
The
urlkey is set by the server, and so is present in responses but not in creation requests sent from the client.
Used in:
Examples
Example schedule
{
"url": "http://go.urbanairship/api/schedules/2d69320c-3c91-5241-fac4-248269eed109",
"schedule": {"scheduled_time": "2020-04-01T18:45:30"},
"name": "My schedule",
"push": {
"audience": {"tag": "49ers"},
"device_types": [ "ios", "android" ],
"notification": {"alert": "Touchdown!"},
"options": {"expiry": 10800}
}
}
Schedule specification
The delivery time specified in UTC.
One of- Scheduled time object
Scheduled push to be delivered globally at the same moment.
OBJECT PROPERTIES- scheduled_time string
A date-time.
- Local scheduled time object
Deliver a message at each device’s local time. This ensures that users receive your message at the same time of day across all time zones in your app’s audience. This feature only works for channels that have a
OBJECT PROPERTIEStimezonetag (or Named Users containing at least one channel with atimezonetag). Devices in the audience that do not have atimezonetag will not receive your message.- local_scheduled_time string
Alternative to
scheduled_time. The scheduled device local date-time to send the notification.
- Best time object
Alternative to
scheduled_time. Uses predictive analytics to send the notification at the optimal send time for each member of your audience.When your audience includes users without an optimal send time tag, those users will be dropped from delivery and will not receive the message. Since optimal send time is determined from user behavior over time, new users might not have an optimal send time determined for the first week or two after channel registration.
OBJECT PROPERTIES- best_time object
Schedules the notification for the optimal send time.
OBJECT PROPERTIES- send_date string
The date set by the user for when the push should go out, localized to the time zone for a given channel. Best-time pushes require activation of our predictive analytics toolset.
Used in:
- Create experiment (A/B Test)
- Experiment listing
- Experiment lookup
- Schedule a notification
- Schedule a templated push
- Scheduled experiment listing
- Update schedule
- Validate experiment
Examples
Global schedule
{
"scheduled_time": "2020-04-01T18:45:30"
}
Best time example
{
"best_time": {
"send_date": "2020-06-01"
}
}
Local time
{
"local_scheduled_time": "2020-04-01T18:45:30"
}