Additional Schemas
Schemas that are not grouped by a specific tag. These include core data objects and shared schemas used across multiple operations.
Custom Event object
Defines a Custom Event.
OBJECT PROPERTIES- body objectREQUIRED
Contains information about your Custom Event. While only the event
OBJECT PROPERTIESnameis required, it is recommended that you provide as much information in this object as possible, so that your event is relevant and informative.- interaction_id string
The identifier defining where the event occurred. In a traditional website, this would be the path and query string from the URL. In a single page app that uses hash routing, it would be the path, query string, and fragment identifier.
- interaction_type string
Describes the type of interaction that triggered the event, e.g.,
url,social,email. This should almost always be ‘url’ for web events. Airship can separate events with the samenamebyinteraction_type, providing greater insight into Custom Events. - name stringREQUIRED
A plain-text name for the event. Airship’s analytics systems will roll up events with the same
name, providing counts and total value associated with the event. This value cannot contain upper-case characters. If thenamecontains upper-case characters, you will receive a 400 response. - properties object
An object containing Custom Event properties. You can use handlebars to access Custom Event properties in templates or messages triggered by the Custom Event. Items in the
propertiesobject are limited to a 255 character maximum string length. - session_id string
The user session during which the event occurred. You must supply and maintain session identifiers.
- transaction string
If the event is one in a series representing a single transaction, use the transaction field to tie events together.
- unique_id string
If properties for the Custom Event are being used for triggering and personalizing a Sequence, use a unique ID to introduce uniqueness in order to differentiate messages and prevent dropping sends as duplicates.
- value number
If the event is associated with a count or amount, the ‘value’ field carries that information. Airship will treats this field as a representation of money; mathematical operations will use fixed precision representations of this field. The
valuefield respects six digits of precision to the right of the decimal point. This field is optional; if empty, its value will default to zero.
- occurred string
The date-time when the event occurred. Events must have occurred within the past 90 days. You cannot provide a future date-time. If omitted, the current date-time is used.
- user objectREQUIRED
Contains the Airship channel identifier for the user who triggered the event.
One of- Named User objectOBJECT PROPERTIES
- named_user_id string
The Named User associated with the event.
- Fire OS Channel objectOBJECT PROPERTIES
- amazon_channel string
The unique channel identifier for a Fire OS device.
- Android Channel objectOBJECT PROPERTIES
- android_channel string
The unique channel identifier for an Android device.
- iOS Channel objectOBJECT PROPERTIES
- ios_channel string
The unique channel identifier for an iOS device.
- Web Channel objectOBJECT PROPERTIES
- web_channel string
The unique channel identifier for a web device.
- Generic Channel objectOBJECT PROPERTIES
- channel string
Airship canonical identifier for a user. Airship will determine the device.
Used in:
Examples
Example Custom Event
{
"occurred": "2020-05-02T02:31:22",
"user": {
"named_user_id": "cool.person"
},
"body": {
"name": "purchased",
"value": 239.85,
"transaction": "686f53d4-7e0s-36d7-234e-c9792dac6e7b",
"interaction_id": "your.store/us/en_us/pd/shoe/pid-123456/pgid-123456",
"interaction_type": "email",
"unique_id": "4c2c380a-0400-4d34-ab04-aaf31f0967c7",
"properties": {
"description": "sky high",
"brand": "victory",
"colors": [
"red",
"blue"
],
"items": [
{
"text": "New Line Sneakers",
"price": "$ 79.95"
},
{
"text": "Old Line Sneakers",
"price": "$ 79.95"
},
{
"text": "Blue Line Sneakers",
"price": "$ 79.95"
}
],
"name": "Cool Person",
"userLocation": {
"state": "CO",
"zip": "80202"
}
},
"session_id": "22404b07-3f8f-4e42-a4ff-a996c18fa9f1"
}
}
Experiment object
An experiment object describes an A/B test, including the audience and variant portions.
OBJECT PROPERTIESThe audience for the experiment.
An audience selector forms the expression that determines the set of channels to target.
- campaigns object<Campaigns object>
Campaigns object that will be applied to resulting pushes.
An object specifying custom campaign categories related to the notification.
- control number
The proportional subset of the audience that will not receive a push. The remaining audience will be split between the variants. It may help to think of this value as a percentage. See Audience groups in the API in Message A/B tests.
- created_at string
The date-time when the experiment was created. This value is created and assigned automatically by Airship and appears in responses only.
- description string
A description of the experiment.
- device_types array[string]REQUIRED
An array containing one or more strings identifying targeted platforms.
- id string
The unique ID assigned to this experiment. This value is created and assigned automatically by Airship and appears in responses only.
- name string
A name for the experiment.
- push_id string
The push ID associated with this experiment. This value is created and assigned automatically by Airship and appears in responses only.
- variants array[object]REQUIRED
The variants for the experiment. An experiment must have at least 1 variant and no more than 26.
Used in:
- Create experiment (A/B Test)
- Experiment listing
- Experiment lookup
- Scheduled experiment listing
- Validate experiment
Examples
Example
{
"name": "<experiment name>",
"description": "<experiment description>",
"control": "<control group>",
"audience": "<audience-selection>",
"device_types": "<device-types>",
"campaigns": "<campaigns>",
"variants": "[<variant specifications>]",
"id": "<id>",
"created_at": "timestamp",
"push_id": "<push_id>"
}
List response object
Contains all user-specified data about a static list or attributes list (metadata), but does not contain CSV list contents. Use the /api/lists/{name}/csv endpoints to upload or download list contents.
- channel_count integer
A count of resolved channel identifiers for the last uploaded and successfully processed identifier list. This will always be 0 for attribute lists.
- created string
The date-time when the list was initially created.
- description string
An optional description for the list.
- error_path string
If non-empty, indicates that there were errors in the processed CSV file. The value is either an empty string or a URL to download a file describing the errors.
- extra object
An optional JSON map of up to 100 key-value (string-to-string) pairs associated with the list. Keys in this object have a 64-character maximum; values can be up to 1,024 characters.
- last_updated string
The date-time when the identifiers of the list were last updated successfully.
- name stringREQUIRED
The name of the list, consists of up to 64 URL-safe characters. The name is how the list is identified, so it should be unique and memorable.
- status string
A string value representing the state of the list.
ready— The list was processed successfully and is ready for sending.processing— The list is being processed.failure— There was an error processing the last uploaded list.
Possible values:
ready,processing,failure
Used in:
Examples
List response object
{
"ok": true,
"lists": [
{
"name": "ua_attributes_my_list",
"description": "My first list",
"extra": {
"filename": "list.csv",
"source": "crm"
},
"created": "2020-05-13T21:41:25",
"last_updated": "2020-05-13T21:45:17",
"channel_count": 0,
"error_path": "https://go.urbanairship.com/api/attribute-lists/ua_attributes_my_list/errors",
"status": "ready"
},
{
"name": "ua_attributes_another_list",
"description": "My second list",
"extra": {
"filename": "list2.csv",
"source": "api"
},
"created": "2020-05-14T21:41:25",
"last_updated": "2020-05-14T21:45:17",
"channel_count": 0,
"error_path": "https://go.urbanairship.com/api/attribute-lists/ua_attributes_another_list/errors",
"status": "ready"
}
]
}
Sender ID
A sender_id describes the sender target to apply the keyword action event to. This must be a number the app is already configured to send from. If a sender exists in multiple countries, a country can be specified by prefixing the country code with a colon, e.g., US:12345.
The sender_id is composed of two parts:
- A
senderstem - Required numeric string. - A
country_code- Optional 2-letter ISO 3166 country code.