API ReferenceAnnouncementsCommunity Discussion
API ReferenceCommunity DiscussionAnnouncementsSubscribeLog In
API Reference

OS Targeting

You can target specific operating systems for a given campaign.

📘

Use the Dictionary to fetch a list of available operating systems:
resources/campaigns_properties/operating_systems

Flow

  1. Use the campaigns endpoint to update the os_targeting field:
{
   "os_targeting": {
      "type": "INCLUDE",
      "value": [
         {
            "os_family": "iOS",
            "sub_categories": [
               "iOS 9",
               "iOS 10"
            ]
         },
         {
            "os_family": "Android"
         }
      ]
   }
}

📘

To target specific versions of an operating system, include the sub_categories property. If omitted, sub_categories will include all versions.

  1. In the updated Campaign Object, the value property stores the targeted collection:
{
  // other Campaign fields...
   "os_targeting": {
      "type": "INCLUDE",
      "value": [
         {
            "os_family": "Android",
            "sub_categories": []
         },
         {
            "os_family": "iOS",
            "sub_categories": [
               "iOS_9",
               "iOS_10"
            ]
         }
      ],
      "href": null
   }
}

📘

To fetch OS Targeting details, fetch the relevant campaign (using the use the campaigns endpoint) and check the value of the os_targeting field.