Additional Schemas
Schemas that are not grouped by a specific tag. These include core data objects and shared schemas used across multiple operations.
Associated push
The specific push_id and accompanying identifiers associated with an event. An associated push helps you trace an event to the original notification or operation.
An associated push object may specify a time, if the push was a singular operation sent at a defined time. Otherwise, the object will include a group_id if the push was sent at a relative time (best_time or local_time) an automation pipeline, or another operation resulting in multiple push_ids.
- campaigns object
An object listing the campaigns a push specification is associated with. The campaigns object includes an array of categories that must have between 1 and 10 elements, each of which is a string with a 64-byte and -character limit.
OBJECT PROPERTIES- categories array[string]
- group_id string
Identifies a push specification delivered over an interval of time, e.g., multiple push_ids as part of the fulfillment of an automation pipeline or a push-to-local-time specification.
- push_id stringREQUIRED
A unique identifier for a push operation.
- time string
The UTC time when the push occurred.
- variant_id integer
The ID of the variant that a push is associated with, if the push was a part of an A/B test (experiment).
Used in:
Examples
Push sent to an audience at a defined date-time
{
"push_id": "6e3339ce-529c-42e4-a2f6-7546f81c9828",
"time": "2015-07-30T21:03:37.631Z"
}
Compliance request
A request for compliance events is much like a request to /api/events, but has a limited scope.
- filters array
An array of filter objects defining the events you want to appear in the event stream.
- resume_offset string
The offset where the stream should begin. The offset is an identifier relevant only to the data stream. The first event in the stream will be the next element satisfying the filter and subset conditions with an offset field greater than this value. Only specify
resume_offsetifstartis absent. - start string
Specifies that the stream should start at the beginning or the end of the application’s data window. Only specify
startifresume_offsetis absent.Possible values:
EARLIEST,LATEST - subset object<Request subset>
Use subsets to return a proportion of the event stream and not all events meeting your other criteria. The
subsetobject defines the proportion of the event stream that you want to return.
Used in:
Compliance request filters
OBJECT PROPERTIES- device_types array[string]
Returns events pertaining to devices on the specified platforms.
- latency integer
The number of milliseconds between the current time and when the events you want to return occurred. If an event occurred more than
latencymilliseconds ago, it is filtered out of the event stream.
Used in:
Examples
Example compliance request filter
{
"device_types": ["email"],
"latency": 120000,
}
Events request
The request body defines the events you want to return in the event stream. You can define position, subset and filter specifications in each request submitted to the stream. Filters are positive statements about what events the client should return. The subset specification returns a representative portion of the stream.
OBJECT PROPERTIES- filters object<Request filters>
An array of filter objects defining the events you want to see in the event stream. A filter object defines a function that either passes or fails an event. Events are included in the response if they pass any of the functions defined by the objects in the array.
- resume_offset string
The offset where the stream should begin. The offset is an identifier relevant only to Real-Time Data Streaming. The first event in the stream will be the next element satisfying the filter and subset conditions with an offset field greater than this value. Only specify
resume_offsetifstartis absent. - start string
Specifies that the stream should start at the beginning or the end of the application’s data window. Only specify
startifresume_offsetis absent.Possible values:
EARLIEST,LATEST - subset object<Request subset>
Use subsets to return a proportion of the event stream and not all events meeting your other criteria. The
subsetobject defines the proportion of the event stream that you want to return.
Used in:
In-app context
The context provides the view state when a button, pager, or form interaction occurs.
OBJECT PROPERTIES- reporting_context object
Describes the content types of the in-app automation. Can be expanded to provide any data for reporting.
OBJECT PROPERTIES- content_types array[string]
- state object
Can contain the current view state of pager and form.
OBJECT PROPERTIES- form objectOBJECT PROPERTIES
- form_identifier stringREQUIRED
Is the form controller identifier.
- response_type string
The type survey response type.
Possible values:
nps,user_feedback - submitted booleanREQUIRED
True if the form has been submitted.
- type string
The form type.
Possible values:
nps,form
- pager objectOBJECT PROPERTIES
- completed boolean
True if the user reached the end of the pager.
- identifier stringREQUIRED
Is the pager controller identifier.
- page_count numberREQUIRED
Total number of pages.
- page_identifier stringREQUIRED
The current page identifier.
- page_index numberREQUIRED
Is the current pager index.
Used in:
Examples
Example in-app context
{
"reporting_context": {
"content_types": [
"survey"
]
},
"state": {
"form": {
"form_identifier": "870db95f-3715-4c98-8047-2871c175d003",
"submitted": false,
"type": "nps",
"response_type": "nps"
},
"pager": {
"identifier": "9e051354-185b-4d4d-888a-885def2e6b7a",
"page_identifier": "992e5540-7144-474c-b666-2671814b3b19",
"page_index": 0,
"page_count": 2,
"completed": false
}
}
Mobile-originated SMS event
An event that occurs when a user sends a message from an SMS device, i.e., the message originates from a mobile device and not from the server (Airship). This event contains context related to the message’s origin, the incoming message itself, and Airship’s response to the origin.
OBJECT PROPERTIES- event_type stringREQUIRED
The specific
MOBILE_ORIGINATEDevent that occurred.Possible values:
mobile_originated_sms - identifiers objectREQUIRED
Contains the sender and MSISDN for the event.
OBJECT PROPERTIES- msisdn stringREQUIRED
The phone number of the user involved in the compliance event.
- sender stringREQUIRED
The phone number or short code of the sender involved in the compliance event.
- properties objectREQUIRED
Contains the mobile-originated message itself and the response to the message.
OBJECT PROPERTIES- inbound_message stringREQUIRED
The contents of the message received from an SMS device.
- keyword string
The specific keyword used in the inbound message, if recognized; the keyword in the
inbound_messagedetermines theoutbound_messagesent to the device. If a keyword could not be matched in theinbound_message, this field is absent. - outbound_message stringREQUIRED
The response sent to the SMS device, based on the inbound message and keyword.
Used in:
Examples
Example mobile_originated_sms event body
{
"event_type": "mobile_originated_sms",
"identifiers": {
"sender": "15558675309",
"msisdn": "15558968663"
},
"properties": {
"inbound_message": "join",
"outbound_message": "Thanks for joining!",
"keyword": "join"
}
}
Request filters
An array of filter objects defining the events you want to see in the event stream. A filter object defines a function that either passes or fails an event. Events are included in the response if they pass any of the functions defined by the objects in the array.
Used in:
Examples
Example filter
{
"device_types": ["ios"],
"latency": 120000,
"notifications": {"push_id": "fae0658c-930e-4f66-bc78-80f46222bc8c"},
"types": ["OPEN", "SEND"],
"devices": [{"named_user_id": "VIP Customer"}]
}
{
"device_types": ["ios"],
"latency": 120000,
"notifications": {"push_id": "af03151e-5ad5-4e30-bbd2-bda28312b3c7"},
"types": ["RICH_READ"],
"users": [{"named_user_id": "best_customer"}]
}
{
"device_types": ["ios"],
"latency": 300,
"notifications": {"push_id": "6626393d-5d42-4de5-a31d-e24e819876ac"},
"types": ["CLOSE"],
"users": [{"contact_id": "982B35f2-0375-6384-893e-a19b5cd5R771"}]
}
Example Predicate filter
{
"predicates": [
{
"and": [
{
"key": "type",
"value": {
"equals": "CUSTOM"
}
},
{
"scope": "body",
"key": "name",
"value": {
"equals": "initial_open"
}
}
]
}
]
}
Request subset
Use subsets to return a proportion of the event stream and not all events meeting your other criteria. The subset object defines the proportion of the event stream that you want to return.
- count integer
Required when the
typeisPARTITION. The value is the number of partitions you want to divide the event stream into. - proportion number
Required when the
typeisSAMPLE. Specifies the percentage of events that will appear in the response, chosen randomly. - selection integer
Required when the
typeisPARTITION. The value is the partition that you want to return in the response. Must be less thancount. - type string
The type of partition.
SAMPLEreturns a random sample of events; the sampleproportiondetermines the fraction of total events that Real-Time Data Streaming returns.PARTITIONsegments the event stream into a number of partitions (determined bycount) and returns a single partition in the event stream (determined byselection).
Possible values:
SAMPLE,PARTITION
Used in:
Examples
Subset `SAMPLE`
{
"type": "SAMPLE",
"proportion": 0.1
}
Subset `PARTITION`
{
"type": "PARTITION",
"count": 10,
"selection": 0
}