Airship provides a RESTful API that you can use to send and schedule pushes, manage your device audience, and retrieve reporting data about your device audience and pushes.
There are no hard limits to the amount of data you can retrieve or request to Airship, however, there are recommended guidelines for each of our API endpoints that should be heeded in order to reduce the number of timeouts you may encounter when querying any of the below endpoints.
If you encounter an HTTP 50x response on endpoints that use GETs, PUTs, or DELETE methods ensure that your server implements a retry method with an exponential back-off to provide the best possible service. Also set a realistic timeout, as your performance may vary depending on the API endpoint used. |
Complex Segments can cause delays in processing
When creating segments or pushes with logical expressions keep in mind that one or more NOT statements may cause latency when sending notifications, as NOT operations are inherently more expensive to perform than OR or AND operations.
Latency is more significant with larger audiences. We recommend using AND statements in place of NOT statements whenever possible as a best practice
Device changes can take a few minutes
Some requests to register or unregister information about a device may take a few minutes to process before you are able to see the changes. Keep this in mind when performing PUT or POST requests.
Push API
POST /api/push
-
- A Push Object describes everything about a push notification, including the audience and payload. A push object is composed of up to seven attributes, and some of the limitations are mentioned below:
- audience: an audience selector forms the expression that determines the set of channels to target.
- When using Compound Selectors or Logical Expressions for your audience selector, ensure that you set a limit of no more than 1000 selectors per push request
- Total: Max limit is dependent on the platform you are sending to (iOS, Android, Amazon) in addition to a 256 KB limit for the Message Center.
- device_types: An array containing one or more strings identifying targeted platforms. Accepted platforms are
ios
,android
,amazon
,wns
,web
,sms
,email
, andopen::<open_platform_name>
(using theopen_platform_name
value of your open channel). Min items: 1 - in-app message: A JSON object describing an in-app message payload, In-app messages are sent via the same payload as iOS and Android, so the payload limits for their respective platform apply here.
- localizations: An array of localizations that is available for your Android, iOS, Amazon, and Web audiences only.
-
notification: Notification Object that is required unless either
message
orin_app
is present. You can provide analert
and any platform overrides that apply to thedevice_type
platforms you specify.-
iOS Platform Override: Max limit is set to 2,048 bytes
-
Android Platform Override: Max limit is set to 4,096 bytes
-
- audience: an audience selector forms the expression that determines the set of channels to target.
- A Push Object describes everything about a push notification, including the audience and payload. A push object is composed of up to seven attributes, and some of the limitations are mentioned below:
Limits to batching push requests
- Please include no more than 100 Push Objects in your batch request.
Segments API
GET /api/segments/
- The default limit is set to 25 Segment objects per request. Set to limit of 25 or less in your API calls.
Schedule a Notification API
POST /api/schedules/
- Include no more than 1000 Scheduled Objects in your batch request. For Local Time Delivery, include no more than 100 Scheduled Objects in your batch request.
List Schedules API
GET /api/schedules/
- The default limit is set to 25 Schedule Objects per request. Set the limit to 25 or less in your API calls.
List Existing Automation Pipelines API
GET /api/pipelines/?limit=(integer)&enabled=(enabled_flag)
- No default limit. For maximum performance, set your limit between 25 to 100.
List Deleted Automation Pipelines API
GET /api/pipelines/deleted/?start=(date)
- No default limit.
Channel Tags API
POST /api/channels/tags/
- We recommend not to set more than 1000 tags per Channel ID.
Named User Tag Limit
POST /api/named_users/tags/
- We recommend not to set more than 1000 tags per Named User.
Channel Listing API
GET /api/channels/
- The default limit is 1000 Channel Objects returned per request. Set the limit to 1000 or less in your API calls.
Channel Uninstall API
POST /api/channels/uninstall/
- Recommended limit of no more than 100 Channel ID Objects per uninstall request.
Reports API
GET /api/reports/responses/list?start=(date)&end=(date)&limit=(results_per_page)
- The default limit is 25 Push Reports objects per request. Set your limit to 25 or lower in your API calls.
Timestamp limit
- Try to choose a start and end date where the time frame is within the last month. Setting a start and end date that is larger than that time window may result in a timeout or slower response.
Named User Listing API
GET /api/named_users
- The default limit is set to 100.
Named Users Association API
POST /api/named_users/associate
- You may only associate up to 50 Channel IDs to a Named User.
Named User Tags API
POST /api/named_users/tags
- The default limit is set to 1000 Tags.
- The default limit is set to 1000 Named User Objects.
Create a List API
POST /api/lists/
- You can upload up to 100 lists per application
Update list contents API
PUT /api/lists/(name)/csv
- Each List can hold no more than 10 million identifiers.