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.

Jump to examples ↓

OBJECT PROPERTIES
  • localization_ids array[string]

    An array of identifiers used for reporting. Each ID represents a localized message (push object with localizations array).

  • name string

    An optional string.

  • push object<Push object>REQUIRED

    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_ids key 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 a HTTP 400 Bad Request.

  • schedule objectREQUIRED
    Any 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 object
        OBJECT 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 object
            OBJECT PROPERTIES
            • count integerREQUIRED

              The frequency of messaging corresponding to the type. For example, a count of 2 results in a message every 2 hours, days, weeks, months, etc. based on the type value.

            • type stringREQUIRED

              The unit of measurement for the cadence.

              Possible values: hourly, daily, monthly, yearly

          • Weekly Cadence object
            OBJECT PROPERTIES
            • count integerREQUIRED

              The frequency of messaging on the weekly cadence. For example, a count of 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 scheduled cadence.

  • url string

    The url key 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.

Jump to examples ↓

One of
  • Scheduled time object

    Scheduled push to be delivered globally at the same moment.

    OBJECT PROPERTIES
  • 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 timezone tag (or Named Users containing at least one channel with a timezone tag). Devices in the audience that do not have a timezone tag will not receive your message.

    OBJECT PROPERTIES
    • 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:

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"
}