{ "components": { "schemas": { "api_initiate_opt_in": { "description": "Occurs when an SMS user is registered via the [SMS Channel Registration API](/developer/rest-api/ua/#operation-api-channels-sms-post) without an `opted_in` value — indicating that the user has initiated, but not completed, the registration process. While this event contains a `channel_id`, you cannot send messages to this channel until the associated user completes the opt-in process (indicated by a `mobile_opt_in` event).\n", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates a registration was started via the Airship API without an opt-in date,\nand a message was sent to the end user with instructions on how to opt in.\n", "enum": [ "api_initiate_opt_in" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" } }, "required": [ "event_type", "identifiers" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS API initiated opt-in event", "type": "object", "x-schema-tag": "SMS compliance events" }, "appdevices": { "description": "Information about app users generated by the SDK.", "properties": { "amazon_channel": { "description": "The identifier for a Fire OS channel. In general, this is also the same value as the `channel`.", "type": "string" }, "android_channel": { "description": "The identifier for an Android channel. In general, this is also the same value as the `channel`.", "type": "string" }, "attributes": { "description": "Attributes specific to app devices.", "properties": { "app_package_name": { "description": "A unique identifier for the app name.", "type": "string" }, "app_version": { "description": "The version of the app.", "type": "string" }, "background_push_enabled": { "description": "Indicates whether or not the device has background push notifications enabled.", "enum": [ "true", "false" ], "type": "string" }, "device_model": { "description": "The device model.", "type": "string" }, "device_os": { "description": "The device operating system.", "type": "string" }, "iana_timezone": { "$ref": "#/components/schemas/iana_timezone" }, "locale_country_code": { "$ref": "#/components/schemas/locale_country_code" }, "locale_language_code": { "$ref": "#/components/schemas/locale_language_code" }, "locale_timezone": { "$ref": "#/components/schemas/locale_timezone" }, "locale_variant": { "$ref": "#/components/schemas/locale_variant" }, "location_enabled": { "description": "Indicates whether or not the device has location services enabled.", "enum": [ "true", "false" ], "type": "string" }, "location_permission": { "$ref": "#/components/schemas/location_permission" }, "push_opt_in": { "$ref": "#/components/schemas/push_opt_in" }, "ua_sdk_version": { "$ref": "#/components/schemas/ua_sdk_version" } }, "type": "object" }, "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "IOS", "ANDROID", "AMAZON" ], "type": "string" }, "identifiers": { "description": "Identifying information specific to app devices.", "properties": { "com.urbanairship.aaid": { "description": "Android/Fire OS ad identifier", "format": "uuid", "type": "string" }, "com.urbanairship.gimbal.aii": { "description": "Gimbal application instance identifier", "format": "uuid", "type": "string" }, "com.urbanairship.idfa": { "description": "Apple ad identifier", "format": "uuid", "type": "string" }, "com.urbanairship.limited_ad_tracking_enabled": { "description": "If true, the user has enabled limited ad tracking.", "enum": [ "true", "false" ], "type": "string" }, "com.urbanairship.vendor": { "description": "Apple vendor identifier", "format": "uuid", "type": "string" } }, "type": "object" }, "ios_channel": { "description": "The identifier for an iOS channel. In general, this is also the same value as the `channel`.", "type": "string" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "required": [ "device_type", "channel" ], "title": "App device information", "type": "object", "x-schema-tag": "Device information" }, "array_matcher": { "description": "Determines if an array contains an object that matches another criteria.\n", "oneOf": [ { "properties": { "array_contains": { "description": "The JSON Predicate.", "type": "object" } }, "type": "object" }, { "properties": { "array_contains": { "description": "The JSON Predicate.", "type": "object" }, "index": { "description": "The specified element in the array.", "format": "integer", "type": "number" } }, "type": "object" } ], "title": "Array matcher", "x-schema-tag": "JSON Predicates", "x-weight": 500 }, "associatedPush": { "description": "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.\n\nAn 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_id`s.", "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "time": { "description": "The UTC time when the push occurred.", "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "required": [ "push_id" ], "title": "Associated push", "type": "object" }, "attribute_operation": { "description": "Attribute operation events indicate a change in the device's attributes. Because attribute operations are related to a device, they will have a `device` field.\n\nIf you set an attribute on a named user, Airship records events for each device associated with the named user.\n", "properties": { "body": { "minProperties": 1, "properties": { "remove": { "description": "The attributes removed from the `device` in this event.", "items": { "properties": { "key": { "description": "The attribute being removed.", "type": "string" } }, "required": [ "key" ], "type": "object" }, "minItems": 1, "type": "array" }, "set": { "items": { "description": "The attributes set on the `device` in this event.", "properties": { "key": { "description": "The attribute being set.", "type": "string" }, "value": { "description": "The value for the attribute.", "oneOf": [ { "type": "string" }, { "type": "number" } ] } }, "required": [ "key", "value" ], "type": "object" }, "minItems": 1, "type": "array" } }, "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" }, { "$ref": "#/components/schemas/sms_email_devices" }, { "$ref": "#/components/schemas/opendevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "ATTRIBUTE_OPERATION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Attribute operation event", "type": "object", "x-schema-tag": "Events" }, "bounce": { "description": "An event that occurs when an email could not be delivered to a particular address. The `bounce_class` can provide more information about why the message bounced.\n", "properties": { "body": { "description": "Contains the event subtype and additional properties about the event.", "properties": { "event_type": { "enum": [ "bounce" ], "type": "string" }, "identifiers": { "properties": { "address": { "description": "The email address registered.", "type": "string" } }, "type": "object" }, "properties": { "properties": { "bounce_class": { "description": "The bounce classification as specified in SparkPost.", "maximum": 100, "minimum": 1, "type": "integer" }, "bounce_event_type": { "enum": [ "bounce" ], "type": "string" }, "email": { "description": "The email address that bounced.", "format": "email", "type": "string" }, "sender": { "description": "The address that the bounced email came from (typically the sender address for your project in Airship).", "type": "string" }, "subject": { "description": "The subject line of the bounced email.", "type": "string" } }, "type": "object" } }, "required": [ "event_type", "properties", "identifiers" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email bounce event", "type": "object", "x-schema-tag": "Email compliance events" }, "campaigns": { "description": "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.", "properties": { "categories": { "items": { "type": "string" }, "type": "array" } }, "title": "Campaigns Object", "type": "object", "x-inline-component": true }, "carrier_deactivation": { "description": "Occurs when an MSISDN is deactivated by a carrier. The `properties.action` value indicates the outcome: `uninstalled` for default carrier deactivation monitoring, or `suppressed` when carrier deactivation RND scanning is enabled and the channel is suppressed pending RND verification. For more information, see [SMS Number Life Cycle Management](/developer/api-integrations/sms/compliance/number-lifecycle).", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "The carrier deactivated the address.", "enum": [ "carrier_deactivation" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "action": { "description": "The action performed on the channel. `uninstalled` indicates permanent removal. `suppressed` indicates the channel was suppressed pending RND verification.", "enum": [ "uninstalled", "suppressed" ], "type": "string" } }, "required": [ "action" ], "type": "object" } }, "required": [ "event_type", "identifiers" ], "type": "object" } }, "required": [ "body" ], "title": "SMS carrier deactivation event", "type": "object", "x-schema-tag": "SMS compliance events" }, "channel": { "description": "The unique, platform-agnostic channel identifier for a device.", "type": "string", "x-inline-component": true }, "close": { "description": "Occurs when a user closes the app. Close events are often latent, as they aren't sent back to Airship until the user activates the app again.\n", "properties": { "body": { "properties": { "session_id": { "$ref": "#/components/schemas/session_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CLOSE" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Close", "type": "object", "x-schema-tag": "Events" }, "compliance": { "allOf": [ { "properties": { "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "description": "Compliance events are the only types of events returned by this event stream.\n", "enum": [ "COMPLIANCE" ], "type": "string" } }, "required": [ "id", "type", "occurred", "processed", "offset" ], "type": "object" }, { "discriminator": { "propertyName": "event_type" }, "oneOf": [ { "$ref": "#/components/schemas/rnd-scan" }, { "$ref": "#/components/schemas/bounce" }, { "$ref": "#/components/schemas/emailCreateAndSend" }, { "$ref": "#/components/schemas/registration" }, { "$ref": "#/components/schemas/unsubscribe" }, { "$ref": "#/components/schemas/api_initiate_opt_in" }, { "$ref": "#/components/schemas/carrier_deactivation" }, { "$ref": "#/components/schemas/suppression_removed" }, { "$ref": "#/components/schemas/smsCreateAndSend" }, { "$ref": "#/components/schemas/custom_keyword_response" }, { "$ref": "#/components/schemas/mobile_create_channel" }, { "$ref": "#/components/schemas/mobile_keyword_matched" }, { "$ref": "#/components/schemas/mobile_keyword_unmatched" }, { "$ref": "#/components/schemas/mobile_opt_in" }, { "$ref": "#/components/schemas/mobile_opt_out" }, { "$ref": "#/components/schemas/opted_out" }, { "$ref": "#/components/schemas/smsRegistered" }, { "$ref": "#/components/schemas/smsUpdated" }, { "$ref": "#/components/schemas/sms_uninstalled" }, { "$ref": "#/components/schemas/mobile_terminated_message" } ] } ], "description": "Events relating to regulatory compliance for email and SMS channels.", "title": "Compliance Event", "x-inline-component": true, "x-schema-tag": "Events" }, "complianceEmailChannel": { "description": "Holds information about the email `device` (an individual email channel) the event occurred against.", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "delivery_address": { "description": "The email address of the channel the event occurred against.", "type": "string" }, "device_type": { "description": "Email compliance events use the `EMAIL` device type.", "enum": [ "EMAIL" ], "type": "string" }, "named_user": { "description": "The named user that the channel is associated with; appears only if the channel is associated with a named user.", "type": "string" } }, "required": [ "device_type", "delivery_address" ], "title": "Email Device", "type": "object", "x-inline-component": true }, "complianceRequest": { "description": "A request for compliance events is much like a request to `/api/events`, but has a limited scope.\n", "properties": { "filters": { "description": "An array of filter objects defining the events you want to appear in the event stream.\n", "items": { "$ref": "#/components/schemas/complianceRequestFilters" }, "title": "Request filters", "type": "array" }, "resume_offset": { "description": "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_offset` if `start` is absent.\n", "type": "string" }, "start": { "description": "Specifies that the stream should start at the beginning or the end of the application's data window. Only specify `start` if `resume_offset` is absent.\n", "enum": [ "EARLIEST", "LATEST" ], "type": "string" }, "subset": { "$ref": "#/components/schemas/subset" } }, "title": "Compliance request", "type": "object" }, "complianceRequestFilters": { "properties": { "device_types": { "description": "Returns events pertaining to devices on the specified platforms.", "items": { "enum": [ "email", "sms" ], "type": "string" }, "type": "array" }, "latency": { "description": "The number of milliseconds between the current time and when the events you want to return occurred. If an event occurred more than `latency` milliseconds ago, it is filtered out of the event stream.", "format": "milliseconds", "type": "integer" } }, "title": "Compliance request filters", "type": "object" }, "complianceSmsDevice": { "description": "Holds information about an SMS `device` (an individual SMS channel).", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "delivery_address": { "description": "The phone number for the channel.", "format": "msisdn", "type": "string" }, "device_type": { "description": "SMS compliance events use the `SMS` device type.", "enum": [ "SMS" ], "type": "string" }, "identifiers": { "description": "If present, the `identifiers` object holds the value for the `sender` property.", "properties": { "sender": { "description": "The sender that the `delivery_address` received a message from.", "type": "string" } }, "required": [ "sender" ], "type": "object" } }, "required": [ "device_type" ], "title": "SMS Device", "type": "object", "x-inline-component": true }, "contact": { "description": "Contact information associated with the device at the time the event occurs.", "properties": { "contact_id": { "$ref": "#/components/schemas/contact_id" } }, "required": [ "contact_id" ], "title": "Contact", "type": "object", "x-schema-tag": "User information" }, "contact_change": { "description": "Occurs when a contact is uninstalled, associated with a channel or named user, or dissociated from a \nchannel or named user.\n", "properties": { "body": { "properties": { "change_type": { "description": "Describes the reason the contact change event was emitted.\n\n* `ASSOCIATION`: The contact was associated to a channel or named user.\n* `DISSOCIATION`: The contact was dissociated from a channel or named user.\n* `UNINSTALL`: The contact was uninstalled.", "enum": [ "ASSOCIATION", "DISSOCIATION", "UNINSTALL" ], "type": "string" }, "channel_id": { "description": "The ID of the channel that was associated or dissociated from the contact, depending on the change event\ntype.\n", "type": "string" }, "contact_id": { "description": "The ID of the contact related to the change event.", "type": "string" }, "named_user_id": { "description": "An optional string that represents the named user ID related to the change event.", "type": "string" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CONTACT_CHANGE" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "offset" ], "title": "Contact change", "type": "object", "x-schema-tag": "Events" }, "contact_id": { "description": "The contact identifier for the device.", "type": "string", "x-inline-component": true }, "context": { "description": "An object that establishes a relationship between a push and the origin of the message. Only messages triggered by a custom event will include the context.", "properties": { "event_uuid": { "description": "The ID of the custom event which triggered the send.", "format": "uuid", "type": "string" }, "interaction_id": { "description": "If `interaction_id` was set on the custom event body, it will be populated here.", "type": "string" }, "transaction": { "description": "If `transaction` was set on the custom event body, it will be populated here.", "type": "string" }, "triggered_by": { "description": "The triggering event type.", "enum": [ "custom_event" ], "type": "string" } }, "required": [ "triggered_by", "event_uuid" ], "title": "Context Object", "type": "object", "x-inline-component": true }, "control": { "description": "Occurs when a device is excluded from a push because it was arbitrarily selected as a member of a control group for a [Message A/B test](/guides/experimentation/a-b-tests/messages/), [Sequence A/B test](/guides/experimentation/a-b-tests/sequences/), or [Holdout Experiment](/guides/experimentation/holdout-experiments/).\n", "properties": { "body": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "experiment_id": { "$ref": "#/components/schemas/experiment_id" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" } ] }, "experiment_id": { "$ref": "#/components/schemas/experiment_id" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CONTROL" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Control", "type": "object", "x-schema-tag": "Events" }, "custom": { "allOf": [ { "properties": { "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CUSTOM" ], "type": "string" } }, "required": [ "id", "type", "occurred", "processed", "offset" ], "type": "object" }, { "discriminator": { "propertyName": "event_type" }, "oneOf": [ { "$ref": "#/components/schemas/emailDeliveryEvent" }, { "$ref": "#/components/schemas/emailInjectionEvent" }, { "$ref": "#/components/schemas/emailOpenEvent" }, { "$ref": "#/components/schemas/emailInitialOpenEvent" }, { "$ref": "#/components/schemas/emailDelayEvent" }, { "$ref": "#/components/schemas/emailBounceEvent" }, { "$ref": "#/components/schemas/emailClickEvent" }, { "$ref": "#/components/schemas/emailUnsubscribeLinkEvent" }, { "$ref": "#/components/schemas/delivery_report" }, { "$ref": "#/components/schemas/rcs_read_report" }, { "properties": { "body": { "properties": { "customer_id": { "description": "An external customer-side ID, such as an email address. Absent if empty.", "type": "string" }, "interaction_id": { "description": "An Airship identifier uniquely identifying the interaction. May be absent.", "type": "string" }, "interaction_type": { "description": "The type of interaction as set by the Airship SDK. Values determine whether the interaction triggered an event from the Message Center (`ua_mcrap`), a landing page (`ua_landing_page`), an interactive notification (`ua_interactive_notification`), or a button tap (`ua_button_tap`).\n\n Button tap events with custom names are in the format `ua_button_tap-`. For example, for a button action with custom name `Cat socks55`, the event name is `ua_button_tap-Cat socks55`. See [Buttons and images: App](/guides/messaging/editors/interactive/actions/#buttons-and-images-app) in *Actions in the Interactive editor*.", "enum": [ "ua_mcrap", "ua_landing_page", "ua_interactive_notification", "ua_button_tap", "ua_button_tap-" ], "type": "string" }, "last_delivered": { "$ref": "#/components/schemas/last_delivered" }, "name": { "description": "A plain-text name given to the event.\n", "example": "purchased", "not": { "enum": [ "delivery", "injection", "open", "bounce", "click", "unsubscribe", "delivery_report" ] }, "type": "string" }, "properties": { "additionalProperties": true, "description": "Supports up to 100 key/value pairs that describe custom event properties. If the event has no custom properties, this field is absent.", "maxProperties": 100, "type": "object" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "description": "The event source. `SDK` indicates an event sent from the Airship SDK. `API` indicates an event created by request against the [Custom Events API](/developer/rest-api/ua/operations/custom-events).", "enum": [ "SDK", "API" ], "type": "string" }, "transaction": { "description": "If the event is one in a series representing a single transaction, use the value in this field to tie events together.", "example": "886f53d4-3e0f-46d7-930e-c2792dac6e0a", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "The push that caused the custom event. Absent if a causal relationship to a push cannot be established." }, "value": { "description": "Populated if the event is associated with a count or amount. Airship treats this field as a representation of money. The `value` field respects six digits of precision to the right of the decimal point.", "example": 120.49, "type": "number" } }, "required": [ "name", "source" ], "type": "object" }, "device": { "description": "Device information related to the event. Either the `channel` or `named_user_id` is required. The `named_user_id` is required for custom events sent via the API, else `channel` is required.\n", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The type of device the event was generated from.", "enum": [ "OPEN", "WEB", "ANDROID", "IOS", "AMAZON", "EMAIL", "SMS" ], "type": "string" }, "named_user_id": { "description": "The named user identifier for a device.", "type": "string" } }, "required": [ "channel", "device_type" ], "type": "object" } }, "required": [ "device", "body" ], "title": "General custom event", "type": "object" } ] } ], "description": "Represents custom events that are either emitted from the Airship SDK or submitted through the Custom Events API. You can configure custom events yourself. There are also several CUSTOM-type events for email and SMS that are defined by Airship.\n\nIn general, you can expect device information if the event source is `SDK` or if the event is one of the defined email or SMS events (as defined by `event_type`).\n", "title": "Custom", "x-schema-tag": "Events" }, "customEmailEventProperties": { "properties": { "email": { "description": "The recipient's email address.", "type": "string" }, "sender": { "description": "The sender of the email specified by the event.", "type": "string" }, "subject": { "description": "The subject line of the email specified by the event.", "type": "string" } }, "type": "object", "x-inline-component": true }, "custom_keyword_response": { "description": "Occurs when a mobile-originated keyword is matched, and elicits a custom response.", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Occurs when a mobile-originated keyword generates a custom response.", "enum": [ "custom_keyword_response" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "inbound_message": { "$ref": "#/components/schemas/inbound_message" }, "outbound_message": { "$ref": "#/components/schemas/outbound_message" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS custom keyword response event", "type": "object", "x-schema-tag": "SMS compliance events" }, "delivery_report": { "description": "Delivery reports are custom events sent from our third-party SMS providers.\nThese events report the status of your message between the provider and your audience up to, and including, delivery.\n", "properties": { "body": { "properties": { "interaction_type": { "enum": [ "delivery_report" ], "type": "string" }, "name": { "description": "The name of the delivery report as specified by the vendor. Most events reference the status of the message with reference to the short message service center (SMSC) — the server that receives your message and dispatches it to your audience.\n\n* dispatched — Message has been dispatched and accepted for delivery by the SMSC.\n* aborted — Message was aborted before reaching SMSC.\n* rejected — Message was rejected by SMSC.\n* delivered — Message has been delivered.\n* failed — Message failed to be delivered.\n* expired — Message expired before delivery to SMSC. This may happen if the expiry time for the message was very short.\n* unknown — Message was delivered to SMSC but no Delivery Receipt has been received or a Delivery Receipt that could not be interpreted was received.\n* undeliverable — Message cannot be delivered.\n* deleted — Message has been deleted.\n", "enum": [ "dispatched", "aborted", "rejected", "delivered", "failed", "expired", "unknown", "undeliverable", "deleted" ], "type": "string" }, "properties": { "oneOf": [ { "description": "A delivery report for SMS.\n", "properties": { "error_code": { "description": "An error code from the short message service center, if applicable.", "type": "string" }, "is_rcs": { "description": "A boolean describing if the message was delivered as RCS or not.", "type": "boolean" }, "sender": { "description": "The number or short code that the message originated from.", "type": "string" }, "vendor": { "description": "The delivery service for the message.", "enum": [ "CLX", "TWILIO" ], "type": "string" }, "vendorDeliveryId": { "description": "A unique identifier for the message from the SMS vendor.", "type": "string" } }, "required": [ "sender", "vendor", "vendorDeliveryId" ], "title": "SMS Delivery Properties", "type": "object" }, { "description": "A delivery report for MMS.", "properties": { "carrier_id": { "description": "Identifies the carrier the message was sent through.", "type": "string" }, "error_code": { "description": "An error code from the short message service center, if applicable.", "type": "string" }, "handset": { "description": "The profile of the handset that received the message. This information is only present if the `result_status` is `N102`.", "type": "string" }, "is_rcs": { "description": "A boolean describing if the message was delivered as RCS or not.", "type": "boolean" }, "result_code": { "description": "A status code from the vendor, if applicable.", "enum": [ "N101", "N102", "E101", "E102" ], "type": "string" }, "result_status": { "enum": [ "Message Sent", "Message Sent/Delivered", "Message Failed", "Message,Sent/Expired", "Message Sent/Rejected", "Message Sent/Failed", "Message Sent/Not Supported" ], "type": "string" }, "sender": { "description": "The number or short code that the message originated from.", "type": "string" }, "sent_as": { "description": "Indicates whether the MMS was delivered as MMS (binary) or SMS (HTML).\n", "enum": [ "MMS", "SMS" ], "type": "string" }, "tracking_Id": { "description": "An ID assigned by the delivery service (CLX only).", "type": "string" }, "vendor": { "description": "The delivery service for the message.", "enum": [ "CLX" ], "type": "string" } }, "required": [ "tracking_id", "vendor", "sender", "result_code" ], "title": "MMS Delivery Properties", "type": "object" } ] }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "description": "Identifies the push notification that caused the event.", "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "required": [ "push_id" ], "type": "object" } }, "required": [ "source", "name", "properties" ], "type": "object" }, "device": { "description": "Device properties for custom events with the `delivery_report` interaction type always specify an SMS device.", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "delivery_address": { "description": "The phone number associated with the channel.", "type": "string" }, "device_type": { "enum": [ "SMS" ], "type": "string" } }, "required": [ "channel", "delivery_address", "device_type" ], "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CUSTOM" ], "type": "string" } }, "required": [ "id", "occurred", "offset", "processed", "type", "device", "body" ], "title": "SMS delivery report", "type": "object", "x-schema-tag": "Custom SMS events" }, "deviceMetricsProperties": { "properties": { "agent_family": { "description": "The name of the family of user agent software used to access the email, e.g., WebKit", "type": "string" }, "device_brand": { "description": "The brand of the device that was used to access the user agent software, e.g., Samsung or Apple.", "type": "string" }, "device_family": { "description": "The name of the device used to access the user agent software.", "type": "string" }, "is_mobile": { "description": "Indicates whether or not the user agent is from a mobile device.", "type": "boolean" }, "is_prefetched": { "description": "Indicates if this event was likely prefetched, for example through Apple MPP. This field does not apply to clicks. The value returned in click events is always false.", "type": "boolean" }, "os_family": { "description": "The name of the operating system used to access the user agent software.", "type": "string" }, "os_version": { "description": "The version of the operating system used to access the user agent software.", "type": "string" } }, "type": "object", "x-inline-component": true }, "emailBounceEvent": { "description": "Occurs when an email could not be delivered to an address. The `bounce_class` provides additional information about the reason your message bounced. This event occurs in conjunction with a similar `COMPLIANCE` event.\n", "properties": { "body": { "properties": { "name": { "enum": [ "bounce" ], "type": "string" }, "properties": { "allOf": [ { "$ref": "#/components/schemas/customEmailEventProperties" }, { "properties": { "bounce_class": { "description": "A number between 1 and 100 that represents the specific reason the email bounced.", "format": "(100)|[1-9]\\d?", "type": "string" }, "bounce_event_type": { "enum": [ "bounce" ], "type": "string" } }, "type": "object" } ] }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email bounce event", "type": "object", "x-schema-tag": "Custom email events" }, "emailClickEvent": { "description": "Occurs when a recipient clicks a tracked link in a message. Tracked links are redirected through the provider's click-tracking server to record the event. Only HTTP and HTTPS links are tracked. Unsubscribe link clicks do not trigger this event.", "properties": { "body": { "properties": { "name": { "enum": [ "click" ], "type": "string" }, "properties": { "allOf": [ { "$ref": "#/components/schemas/customEmailEventProperties" }, { "properties": { "link_name": { "description": "The [name of the link](/guides/messaging/messages/content/email/email/#link-names), if set.", "type": "string" }, "link_url": { "description": "The URL of the link that the user clicked.", "type": "string" } }, "type": "object" }, { "$ref": "#/components/schemas/deviceMetricsProperties" } ] }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email click event", "type": "object", "x-schema-tag": "Custom email events" }, "emailCreateAndSend": { "description": "An event that occurs for email addresses used as a part of a [Create and Send](/guides/messaging/bulk-sending/).", "properties": { "body": { "description": "Contains the event subtype and additional properties about the event.", "properties": { "event_type": { "enum": [ "create_and_send" ], "type": "string" }, "identifiers": { "properties": { "address": { "description": "The email address a message was sent to using Create and Send.", "type": "string" } }, "required": [ "address" ], "type": "object" }, "properties": { "description": "Properties for an email [Create and Send](/guides/messaging/bulk-sending/) event.", "properties": { "channel_registered": { "description": "If true, a new channel was created to represent the identifiers in the event. If false, the address was already registered to Airship.", "type": "boolean" }, "commercial_opted_in": { "description": "The date and time when the `address` opted into commercial email messages.", "type": "string" }, "transactional_opted_in": { "description": "The date and time when the `address` opted into transactional email messages.", "type": "string" } }, "required": [ "channel_registered" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel", "description": "Describes the device involved in the `create_and_send` email event." } }, "required": [ "device", "body" ], "title": "Email Create and Send event", "type": "object", "x-schema-tag": "Email compliance events" }, "emailDelayEvent": { "description": "Occurs when a mailbox provider temporarily rejects an email. In general, this event indicates that the provider will attempt to resend the message.\n", "properties": { "body": { "properties": { "name": { "enum": [ "delay" ], "type": "string" }, "properties": { "$ref": "#/components/schemas/customEmailEventProperties" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email delay event", "type": "object", "x-schema-tag": "Custom email events" }, "emailDeliveryEvent": { "description": "Occurs when the remote MTA (email server) acknowledges receipt of a message.", "properties": { "body": { "properties": { "name": { "enum": [ "delivery" ], "type": "string" }, "properties": { "$ref": "#/components/schemas/customEmailEventProperties" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email delivery event", "type": "object", "x-schema-tag": "Custom email events" }, "emailInitialOpenEvent": { "description": "Occurs when a recipient opens an email, rendering a tracking pixel at the top of the email.\n", "properties": { "body": { "properties": { "name": { "enum": [ "initial_open" ], "type": "string" }, "properties": { "allOf": [ { "$ref": "#/components/schemas/customEmailEventProperties" }, { "$ref": "#/components/schemas/deviceMetricsProperties" } ] }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email initial open event", "type": "object", "x-note": "This event requires images to load in the email client. If a user blocks images in their email client, Airship will not register this event.", "x-schema-tag": "Custom email events" }, "emailInjectionEvent": { "description": "This event occurs when the provider (SparkPost) receives a message — typically when a member of the audience responds to an email.", "properties": { "body": { "properties": { "name": { "enum": [ "injection" ], "type": "string" }, "properties": { "$ref": "#/components/schemas/customEmailEventProperties" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email injection event", "type": "object", "x-schema-tag": "Custom email events" }, "emailOpenEvent": { "description": "Occurs when a recipient opens an email, rendering a tracking pixel at the bottom of the message. If a message is truncated by a client or email provider, a user may have to open it in a separate window to render the tracking pixel (and register this event).\n", "properties": { "body": { "properties": { "name": { "enum": [ "open" ], "type": "string" }, "properties": { "allOf": [ { "$ref": "#/components/schemas/customEmailEventProperties" }, { "$ref": "#/components/schemas/deviceMetricsProperties" } ] }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "required": [ "name", "triggering_push", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email open event", "type": "object", "x-note": "This event requires images to load in the email client. If a user blocks images in their email client, Airship will not register this event.", "x-schema-tag": "Custom email events" }, "emailUnsubscribeLinkEvent": { "description": "Occurs when a user unsubscribes from email messaging. The unsubscribe can originate from the email client's unsubscribe button (sent through the `List-Unsubscribe` email header), an unsubscribe link in the message body, or the **Unsubscribe from all** button in the Email Preference Center. Use the `unsubscribe_event_type` property to identify the source. This event is not emitted for [subscription list](/guides/messaging/messages/content/email/email-unsubscribe-links/) unsubscribes.\n", "properties": { "body": { "properties": { "name": { "enum": [ "unsubscribe" ], "type": "string" }, "properties": { "properties": { "unsubscribe_event_type": { "description": "Identifies the source of the unsubscribe.\n\n* `link_unsubscribe`: The user clicked an unsubscribe link in the message body of an email, or selected the **Unsubscribe from all** button in the Email Preference Center.\n* `list_unsubscribe`: The user selected the unsubscribe button in their email client, sent through the `List-Unsubscribe` email header.\n", "enum": [ "link_unsubscribe", "list_unsubscribe" ], "type": "string" } }, "type": "object" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Present only when the unsubscribe originated from a click on an unsubscribe link in the message body of an email.\n" } }, "required": [ "name", "properties", "source" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email unsubscribe link event", "type": "object", "x-schema-tag": "Custom email events" }, "equals_matcher": { "description": "Determines if the value matches exactly.\n", "properties": { "equals": { "oneOf": [ { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" }, { "items": { "oneOf": [ { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "type": "string" } ] }, "type": "array" } ] } }, "title": "Equals matcher", "x-schema-tag": "JSON Predicates", "x-weight": 510 }, "eventsRequest": { "description": "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.\n", "properties": { "filters": { "$ref": "#/components/schemas/eventsRequestFilters" }, "resume_offset": { "description": "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_offset` if `start` is absent.\n", "type": "string" }, "start": { "description": "Specifies that the stream should start at the beginning or the end of the application's data window. Only specify `start` if `resume_offset` is absent.\n", "enum": [ "EARLIEST", "LATEST" ], "type": "string" }, "subset": { "$ref": "#/components/schemas/subset" } }, "title": "Events request", "type": "object" }, "eventsRequestFilters": { "description": "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.\n", "items": { "properties": { "device_types": { "description": "Returns events pertaining to devices on the specified platforms.", "items": { "enum": [ "android", "ios", "amazon", "web", "email", "sms", "open" ], "type": "string" }, "type": "array" }, "devices": { "description": "Limits the stream to events relating to specific device attributes.", "items": { "anyOf": [ { "properties": { "channel": { "$ref": "#/components/schemas/channel" } }, "type": "object" }, { "properties": { "named_user_id": { "description": "The named user for a device. The event stream will return events pertaining to the named user.", "type": "string" } }, "type": "object" } ] }, "type": "array" }, "latency": { "description": "The number of milliseconds between the current time and when the events you want to return occurred. If an event occurred more than `latency` milliseconds ago, it is filtered out of the event stream.", "format": "milliseconds", "type": "integer" }, "notifications": { "description": "Limits the stream to events related to one or more specific pushes. This allows you to easily track the events generated by a given push or pipeline. In this object, you should only specify one of `push_id` or `group_id`. Child pushes may be included in the returned stream. If they are, they will have a group ID relating them back to the push to local time or automation specification that spawned them.\n", "oneOf": [ { "properties": { "push_id": { "description": "The push you want to return events for.", "type": "string" } }, "title": "Push ID", "type": "object" }, { "properties": { "group_id": { "description": "The group you want to return events for.", "type": "string" } }, "title": "Group ID", "type": "object" } ] }, "predicates": { "description": "Limits events to a subset of the event payload.", "items": { "$ref": "#/components/schemas/json_predicate", "type": "object" }, "type": "array" }, "types": { "description": "Specifies the [event](/developer/rest-api/connect/schemas/events/) types you want to return in the event stream.", "items": { "enum": [ "ATTRIBUTE_OPERATION", "CLOSE", "COMPLIANCE", "CONTACT_CHANGE", "CONTROL", "CUSTOM", "FEATURE_FLAG_INTERACTION", "FIRST_OPEN", "FIRST_OPT_IN", "IN_APP_BUTTON_TAP", "IN_APP_EXPERIENCES", "IN_APP_FORM_DISPLAY", "IN_APP_FORM_RESULT", "IN_APP_MESSAGE_CONTROL", "IN_APP_MESSAGE_DISPLAY", "IN_APP_MESSAGE_EXCLUSION", "IN_APP_MESSAGE_EXPIRATION", "IN_APP_MESSAGE_RESOLUTION", "IN_APP_PAGE_SWIPE", "IN_APP_PAGE_VIEW", "IN_APP_PAGER_COMPLETED", "IN_APP_PAGER_SUMMARY", "LABEL_EVENT", "LOCATION", "MOBILE_ORIGINATED", "OPEN", "PUSH_BODY", "REGION", "RICH_CONTROL", "RICH_DELETE", "RICH_DELIVERY", "RICH_READ", "SCREEN_VIEWED", "SEND", "SEND_ABORTED", "SEND_REJECTED", "SHORT_LINK_CLICK", "SUBSCRIPTION", "SUBSCRIPTION_LIST", "TAG_CHANGE", "UNINSTALL", "WEB_CLICK", "WEB_SESSION" ], "type": "string" }, "type": "array" }, "users": { "description": "Limits the stream to events relating to specific users.", "items": { "anyOf": [ { "$ref": "#/components/schemas/contact" }, { "properties": { "named_user_id": { "description": "The named user for a user object. The event stream will return events pertaining to the named user.", "type": "string" } }, "type": "object" } ] }, "type": "array" } }, "type": "object" }, "title": "Request filters", "type": "array" }, "experiment_id": { "description": "The unique identifier for the Message A/B test or Holdout Experiment.", "format": "uuid", "title": "Experiment ID", "type": "string", "x-inline-component": true }, "feature_flag_interaction": { "description": "Occurs when a user interacts with a tracked flagged feature. See [Feature Flags](/guides/experimentation/feature-flags/#interaction-events). The events have a flag ID and flag name, which identify which flagged feature a user interacted with. They also have a boolean `eligible` field, which indicates whether or not the user was in the feature flag audience and had access to the feature.\n", "properties": { "body": { "properties": { "eligible": { "description": "Indicates whether or not the user was in the feature flag audience and had access to the feature. `true` means the user was in the feature flag audience and had access to the feature.", "type": "boolean" }, "flag_id": { "description": "A UUID that is associated with a feature flag.", "type": "string" }, "flag_name": { "description": "The name of a feature flag.", "type": "string" }, "variant_id": { "description": "The UUID of the A/B test variant, if available.", "type": "string" } }, "required": [ "flag_id", "flag_name", "eligible" ], "type": "object", "x-schema-tag": "Event Body" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "FEATURE_FLAG_INTERACTION" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Feature flag interaction event", "type": "object", "x-schema-tag": "Events" }, "first_open": { "description": "This event occurs when a user first registers a channel in your app. This event fires only once per user, when a channel is first registered. Channel registration most commonly occurs immediately after the first app open but can happen at other times as well, for example, if channel registration was delayed. The [open](#open) event fires on every app open, including the first.", "properties": { "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "FIRST_OPEN" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "offset" ], "title": "First open", "type": "object", "x-schema-tag": "Events" }, "first_opt_in": { "description": "This event appears in the stream when a channel is first opted in. This event is specific to email (commercial), SMS, and open channels.", "properties": { "device": { "oneOf": [ { "$ref": "#/components/schemas/sms_email_devices" }, { "$ref": "#/components/schemas/opendevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "FIRST_OPT_IN" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "offset" ], "title": "First opt-in", "type": "object", "x-schema-tag": "Events" }, "group_id": { "description": "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.\n", "format": "uuid", "title": "Group ID", "type": "string", "x-inline-component": true }, "iana_timezone": { "description": "The time zone of the device.", "type": "string", "x-inline-component": true }, "id": { "description": "Uniquely identifies an event. The data stream will occasionally send duplicate events. Duplicate events will have the same `id`, `type`, `occurred`, `device`, and `body` values but different `offset` and `processed` values. You should use the `id` to deduplicate.", "type": "string", "x-inline-component": true }, "in_app_button_tap": { "description": "Occurs when a button is tapped within a Scene.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app button tap was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "button_id": { "description": "A unique identifier for the button.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "locale": { "description": "Optional string that defines the country and language this in-app-automation was localized as by remote-config-api. `country` - (String) An ISO 3166-1 country code, set by device settings. `language` - (String) The ISO 639-1 two-letter language code reflecting the language the phone is set to.", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_BUTTON_TAP" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app button tap", "type": "object", "x-schema-tag": "Events" }, "in_app_context": { "description": "The context provides the view state when a button, pager, or form interaction occurs.\n", "properties": { "reporting_context": { "description": "Describes the content types of the in-app automation. Can be expanded to provide any data for reporting.", "properties": { "content_types": { "items": { "enum": [ "scene", "survey" ], "type": "string" }, "type": "array" } }, "type": "object" }, "state": { "description": "Can contain the current view state of pager and form.", "properties": { "form": { "properties": { "form_identifier": { "description": "Is the form controller identifier.", "format": "uuid", "type": "string" }, "response_type": { "description": "The type survey response type.", "enum": [ "nps", "user_feedback" ], "type": "string" }, "submitted": { "description": "True if the form has been submitted.", "type": "boolean" }, "type": { "description": "The form type.", "enum": [ "nps", "form" ], "type": "string" } }, "required": [ "form_identifier", "submitted" ], "type": "object" }, "pager": { "properties": { "completed": { "description": "True if the user reached the end of the pager.", "type": "boolean" }, "identifier": { "description": "Is the pager controller identifier.", "format": "uuid", "type": "string" }, "page_count": { "description": "Total number of pages.", "type": "number" }, "page_identifier": { "description": "The current page identifier.", "format": "uuid", "type": "string" }, "page_index": { "description": "Is the current pager index.", "type": "number" } }, "required": [ "identifier", "page_identifier", "page_index", "page_count" ], "type": "object" } }, "type": "object" } }, "title": "In-app context", "type": "object" }, "in_app_experiences": { "description": "Events that occur related to the display and completion behavior of a Scene. These events are derived from source events generated by the SDK, so a single user action may generate two events: one for the SDK event, one representing the user action as it relates to their actual activity within the app or website.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "event_name": { "description": "The name of the event.\n", "enum": [ "scene_displayed", "scene_completed", "scene_incomplete", "survey_displayed", "survey_submitted", "survey_not_submitted" ], "type": "string" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "survey_type": { "description": "Only present for survey events.", "enum": [ "nps", "user_feedback" ], "type": "string" }, "time_sent": { "description": "An ISO 8601 date-time, in UTC, when the event occurred. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_EXPERIENCES" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app experiences", "type": "object", "x-schema-tag": "Events" }, "in_app_form_display": { "description": "Occurs when a survey form in a Scene is displayed.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app form was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "forms": { "properties": { "form_id": { "description": "The identifier of the form controller (required).", "format": "uuid", "type": "string" } }, "type": "object" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Required for this type, the value is always `DISPLAY`.", "enum": [ "DISPLAY" ], "type": "string" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_FORM_DISPLAY" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app form display", "type": "object", "x-schema-tag": "Events" }, "in_app_form_result": { "description": "Occurs when a survey form in a Scene is submitted.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app form was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "forms": { "properties": { "form_id": { "description": "The identifier of the form controller (required).", "format": "uuid", "type": "string" }, "nps": { "properties": { "audience_category": { "description": "The NPS category.", "enum": [ "PROMOTER", "PASSIVE", "DETRACTOR" ], "type": "string" }, "question_id": { "description": "The question identifier.", "format": "uuid", "type": "string" }, "score": { "description": "A number between 0 and 10.", "type": "number" } }, "required": [ "question_id", "score", "audience_category" ], "type": "object" }, "response_type": { "description": "The survey response type.", "enum": [ "nps", "user_feedback" ], "type": "string" }, "responses": { "properties": { "question_id": { "description": "The question identifier.", "format": "uuid", "type": "string" }, "type": { "description": "The question type.", "enum": [ "single_choice", "multiple_choice", "text_input", "email_input" ], "type": "string" }, "value": { "description": "The choice type identifier for `single_choice` or `multiple_choice` questions, or user-provided text for `text_input` or `email_input` fields." } }, "required": [ "question_id", "type", "value" ], "type": "object" }, "type": { "description": "The form type.", "enum": [ "nps", "form" ], "type": "string" } }, "type": "object" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Required for this type, the value is always `RESULT`.", "enum": [ "RESULT" ], "type": "string" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_FORM_RESULT" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app form result", "type": "object", "x-schema-tag": "Events" }, "in_app_message_control": { "description": "Occurs when an In-App Automation or Scene is not delivered because the targeted user's contact or channel ID was part of a control group for a [Holdout Experiment](/guides/experimentation/holdout-experiments/).\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not the Airship system. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "The date-time when the in-app message payload was sent to the device.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Indicates that the in-app message was never delivered because the user was part of an experiment control group.\n\n`CONTROL` indicates that the message was not displayed because the channel or contact was hashed into the experiment control group.", "enum": [ "CONTROL" ], "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_MESSAGE_CONTROL" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app message control", "type": "object", "x-schema-tag": "Events" }, "in_app_message_display": { "description": "Occurs when an In-App Automation or Scene is displayed to a user. Because the event pertains to a specific device, the device information object will be populated.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_MESSAGE_DISPLAY" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app message display", "type": "object", "x-schema-tag": "Events" }, "in_app_message_exclusion": { "description": "Occurs when an In-App Automation or Scene is not displayed on a device because the user was banned. See [Ban Lists](/guides/messaging/messages/delivery/ban-lists/).\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not the Airship system. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "The date-time when the in-app message payload was sent to the device.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Indicates that the in-app message was not displayed on a device because the channel or named user was excluded from the push. The only possible value is \n`AUDIENCE_CHECK_EXCLUDED`, which indicates that the message was not displayed because the channel or named user is on a project's [ban list](/guides/messaging/messages/delivery/ban-lists/). This is also reported when a 400- or 500-level error resolving the user's status on a ban list occurs.", "enum": [ "AUDIENCE_CHECK_EXCLUDED" ], "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_MESSAGE_EXCLUSION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app message exclusion", "type": "object", "x-schema-tag": "Events" }, "in_app_message_expiration": { "description": "Occurs when a new In-App Automation or Scene message has taken the place of another message, a message has passed its expiration, or because displaying the message in-app would be redundant. This event type may be latent. It is not emitted until the app becomes active.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "replacing_push": { "$ref": "#/components/schemas/associatedPush", "description": "An associated push object for the in-app message that replaced the message. Present if `type` is `REPLACED`." }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_expired": { "description": "The date-time when the message was set to expire.", "type": "string" }, "time_sent": { "description": "The date-time when the in-app message payload was sent to the device.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Indicates how the in-app message expired.\n\n* `REPLACED`: The in-app message was replaced by a more current one. If type is `REPLACED`, the `replacing_push` key will be present.\n* `EXPIRED`: The in-app message exceeded its expiration date. If type is `EXPIRED`, then the `time` key will be present.\n* `ALREADY_DISPLAYED`: The message was opened directly (either from the lock screen or notification center). The Airship SDK will NOT display it again in the app, because the user is guaranteed to have seen it.", "enum": [ "REPLACED", "EXPIRED", "ALREADY_DISPLAYED" ], "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_MESSAGE_EXPIRATION" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app message expiration", "type": "object", "x-schema-tag": "Events" }, "in_app_message_resolution": { "description": "Occurs when an In-App Automation or Scene is cleared from the display, either by user action or timeout. Because this event pertains to an individual device, the device information object will be present.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app message was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "button_description": { "description": "The title of the button the user interacted with. Present if `type` is set to `BUTTON_CLICK`.", "type": "string" }, "button_group": { "description": "A category associated with the in-app message button. It may be [predefined](/reference/messages/built-in-interactive-notifications/) or [custom defined](/developer/sdk-integration/mobile/push/getting-started/), or blank if there is no association with a category.", "type": "string" }, "button_id": { "description": "A unique identifier for the button. Present if `type` is set to `BUTTON_CLICK`.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "duration": { "description": "The number of milliseconds that the user was on the screen.", "format": "milliseconds", "type": "integer" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "The date-time when the in-app message payload was sent to the device.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Appears if the user began the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "type": { "description": "Indicates how the in-app message was resolved.\n\n* `BUTTON_CLICK`: The user clicked/tapped a button in the message. This type is accompanied by additional fields.\n* `MESSAGE_CLICK`: The user clicked/tapped a part of the message, but not a button.\n* `TIMED_OUT`: The user ignored the notification, and it dismissed itself after an interval of time.\n* `USER_DISMISSED`: The user clicked/tapped `X` to close the message or closed it using the swipe gesture.", "enum": [ "BUTTON_CLICK", "MESSAGE_CLICK", "TIMED_OUT", "USER_DISMISSED" ], "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_MESSAGE_RESOLUTION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app message resolution", "type": "object", "x-schema-tag": "Events" }, "in_app_page_swipe": { "description": "Occurs when a user swipes to the next or previous page (screen) in a pager (specific to Scenes).\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app pager was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "from_page_index": { "description": "Is the previous page index.", "type": "number" }, "from_pager_identifier": { "description": "Is the previous page identifier.", "format": "uuid", "type": "string" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "locale": { "description": "Optional string that defines the country and language this in-app-automation was localized as by remote-config-api. `country` - (String) An ISO 3166-1 country code, set by device settings. `language` - (String) The ISO 639-1 two-letter language code reflecting the language the phone is set to.", "type": "string" }, "pager_identifier": { "description": "Is the pager controller identifier.", "format": "uuid", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app pager was sent to the device. May be absent.", "type": "string" }, "to_page_identifier": { "description": "Is the current page identifier.", "format": "uuid", "type": "string" }, "to_page_index": { "description": "Is the current page index.", "type": "number" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_PAGE_SWIPE" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app page swipe", "type": "object", "x-schema-tag": "Events" }, "in_app_page_view": { "description": "Occurs when a page (screen) is displayed within a pager (specific to Scenes).\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app pager was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "completed": { "description": "True if the user reached the end of the pager.", "type": "boolean" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "locale": { "description": "Optional string that defines the country and language this in-app-automation was localized as by remote-config-api. `country` - (String) An ISO 3166-1 country code, set by device settings. `language` - (String) The ISO 639-1 two-letter language code reflecting the language the phone is set to.", "type": "string" }, "page_count": { "description": "Total number of pages.", "type": "number" }, "page_identifier": { "description": "The current page identifier.", "format": "uuid", "type": "string" }, "page_index": { "description": "Is the current pager index.", "type": "number" }, "pager_identifier": { "description": "Is the pager controller identifier.", "format": "uuid", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "viewed_count": { "description": "Number of times the current page has been viewed.", "type": "number" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_PAGE_VIEW" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app page view", "type": "object", "x-schema-tag": "Events" }, "in_app_pager_completed": { "description": "Occurs when the last page (screen) of a pager is viewed for the first time (specific to Scenes).\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app pager was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "locale": { "description": "Optional string that defines the country and language this in-app-automation was localized as by remote-config-api. `country` - (String) An ISO 3166-1 country code, set by device settings. `language` - (String) The ISO 639-1 two-letter language code reflecting the language the phone is set to.", "type": "string" }, "page_count": { "description": "Total number of pages.", "type": "number" }, "page_identifier": { "description": "The current page identifier.", "format": "uuid", "type": "string" }, "page_index": { "description": "Is the current pager index.", "type": "number" }, "pager_identifier": { "description": "Is the pager controller identifier.", "format": "uuid", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_PAGER_COMPLETED" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app pager completed", "type": "object", "x-schema-tag": "Events" }, "in_app_pager_summary": { "description": "Describes the full path a user took within a pager (specific to Scenes), including the order of pages (screens) visited and time spent per page.\n", "properties": { "body": { "properties": { "app_defined_id": { "description": "An identifier defined by the application if the in-app pager was created by the application logic, not Airship. If this field is present, the event body will not contain `push_id`, `group_id`, `campaigns`, `variant_id`, or `triggering_push` fields.", "type": "string" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "completed": { "description": "True if the user reached the end of the pager.", "type": "boolean" }, "context": { "$ref": "#/components/schemas/in_app_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "locale": { "description": "Optional string that defines the country and language this in-app-automation was localized as by remote-config-api. `country` - (String) An ISO 3166-1 country code, set by device settings. `language` - (String) The ISO 639-1 two-letter language code reflecting the language the phone is set to.", "type": "string" }, "page_count": { "description": "Total number of pages.", "type": "number" }, "page_identifier": { "description": "The current page identifier.", "format": "uuid", "type": "string" }, "pager_identifier": { "description": "Is the pager controller identifier.", "format": "uuid", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "time_sent": { "description": "An ISO 8601 date-time indicating when the payload defining the in-app message was sent to the device. May be absent.", "type": "string" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "Optional. Present if the user started the current session by opening a push notification. It does not describe the campaign for this message, but refers to another campaign that can be attributed to this event." }, "viewed_pages": { "properties": { "display_time_ms": { "description": "Is how long the page was displayed in milliseconds.", "format": "milliseconds", "type": "number" }, "page_identifier": { "description": "The current page identifier.", "format": "uuid", "type": "string" }, "page_index": { "description": "The current page index.", "type": "number" } }, "type": "object" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "IN_APP_PAGER_SUMMARY" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "In-app pager summary", "type": "object", "x-schema-tag": "Events" }, "inbound_message": { "description": "The body of the inbound (to Airship) text message. This is the message a user sent to opt into or out of messages. This text corresponds to the `keyword` if present.", "type": "string", "x-inline-component": true }, "json_predicate": { "description": "[Standard request filters](/developer/rest-api/connect/schemas/others/#eventsrequestfilters) check specific, predefined fields in your events and remove any events that don't match the criteria for that field. For example, the `device_types` filter always checks the `device_type` sub-field of the device object. In contrast, you can use JSON Predicates to examine any part of an event, providing more flexibility than the standard filters. You can also combine multiple JSON Predicate objects to create complex filtering logic for your event stream.\n\nThe simplest JSON Predicate examines a single key and provides a `matcher` object that can be applied to the value at that key. To filter a stream for only [Open events](/developer/rest-api/connect/schemas/events/#open), you could use the standard filter `types`: `filters:{\"types\": [\"OPEN\"]}`. However, to achieve this with a JSON Predicate, you would use `filters:{\"predicates\":{\"key\":\"type\", \"value\": {\"equals\": \"OPEN\"}}}`. This checks the value of the top-level key `type` to see if it's exactly \"OPEN\". It also serves as a foundational step for constructing more intricate filters.\n\nTo filter for only Android events, you could use the `device_type` filter, but a JSON Predicate allows for more complex combinations later. Since the device type key doesn't appear at the top level of the event, you'll need to provide a scope, like this `filters:{\"predicates\":{\"scope\":[\"device\"], \"key\":\"device_type\", \"value\": {\"equals\": \"ANDROID\"}}}`. This configuration targets the `device_type` key within the `device` object, checking if its value is \"ANDROID\".\n\nYou can combine the two filters to see only Opens from Android devices: `filters:{\"predicates\":{\"and\":[\n {\"scope\":[\"device\"], \"key\":\"device_type\", \"value\": {\"equals\": \"ANDROID\"}},\n {\"key\":\"type\", \"value\": {\"equals\": \"OPEN\"}}\n]}}`\n\nWe also have matchers other than `equals`. Numeric `at_least` and `at_most` can be combined to create ranges. `version_matches` uses [Ivy syntax](https://ant.apache.org/ivy/history/2.1.0/settings/version-matchers.html) to match version numbers. `is_present` determines if there's any value at a given key. `array_contains` can be combined with another predicate to determine if an array contains an object that matches another criteria.\n\n", "oneOf": [ { "properties": { "and": { "items": { "$ref": "#/components/schemas/json_predicate" }, "type": "array" } }, "title": "And", "type": "object" }, { "properties": { "or": { "items": { "$ref": "#/components/schemas/json_predicate" }, "type": "array" } }, "title": "Or", "type": "object" }, { "properties": { "not": { "description": "The JSON Predicate.", "type": "object" } }, "title": "Not", "type": "object" }, { "properties": { "key": { "description": "The name of the value being matched.", "type": "string" }, "scope": { "description": "The path into a JSON object.", "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "value": { "$ref": "#/components/schemas/value_matcher", "description": "The match that the value is checked against.", "type": "object" } }, "required": [ "key", "value" ], "title": "Value", "type": "object" } ], "title": "JSON Predicate", "x-schema-tag": "JSON Predicates", "x-weight": 100 }, "label_event": { "description": "Occurs when you update a Scene screen name.\n", "properties": { "body": { "properties": { "group_id": { "$ref": "#/components/schemas/group_id" }, "labels": { "description": "Page list", "items": { "properties": { "id": { "description": "Page ID", "format": "uuid", "type": "string" }, "label": { "description": "Page label", "type": "string" } }, "required": [ "id", "label" ], "type": "object" }, "type": "array" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "required": [ "push_id", "labels" ], "type": "object" }, "id": { "description": "Uniquely identifies an event. The data stream will occasionally send duplicate events. Duplicate events will have the same `id`, `type`, `occurred`, and `body` values but different `offset` and `processed` values. Use the `id` to deduplicate.", "type": "string" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "LABEL_EVENT" ], "type": "string" } }, "required": [ "id", "type", "occurred", "processed", "offset", "body" ], "title": "Label event", "type": "object", "x-schema-tag": "Events" }, "last_delivered": { "description": "Identifies the last push notification the audience received before the event. Absent if the last push occurred more than 12 hours ago.", "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "time": { "description": "The UTC time when the push occurred.", "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "required": [ "push_id" ], "type": "object", "x-inline-component": true }, "locale_country_code": { "description": "The ISO 3166-1 country code as defined in device settings.", "type": "string", "x-inline-component": true }, "locale_language_code": { "description": "The ISO 639-1 two-letter language code reflecting the language that the device is set to.", "type": "string", "x-inline-component": true }, "locale_timezone": { "description": "The device's time zone offset in seconds from UTC.", "type": "string", "x-inline-component": true }, "locale_variant": { "description": "The language variant.", "type": "string", "x-inline-component": true }, "location": { "deprecated": true, "description": "An event declaring the device to be at a particular latitude and longitude.", "properties": { "body": { "properties": { "foreground": { "description": "If true, the application was foregrounded when the event occurred.", "type": "boolean" }, "latitude": { "description": "The latitude where the event occurred.", "type": "string" }, "longitude": { "description": "The longitude where the event occurred.", "type": "string" }, "session_id": { "$ref": "#/components/schemas/session_id" } }, "required": [ "latitude", "longitude", "foreground" ], "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "LOCATION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Location", "type": "object", "x-schema-tag": "Events" }, "location_permission": { "description": "* `SYSTEM_LOCATION_DISABLED` Location is disabled in system settings\n* `NOT_ALLOWED` Android: missing manifest permissions, iOS: opted out\n* `ALWAYS_ALLOWED` Android: has manifest permissions, iOS: opted in background and foreground\n* `FOREGROUND_ALLOWED` iOS only: opted in foreground only\n* `UNPROMPTED`: iOS only\n\n", "enum": [ "SYSTEM_LOCATION_DISABLED", "NOT_ALLOWED", "ALWAYS_ALLOWED", "FOREGROUND_ALLOWED", "UNPROMPTED" ], "type": "string", "x-inline-component": true }, "mobile_create_channel": { "description": "If a channel does not exist for the MSISDN/sender combination and your account is configured\nto create a channel if none exists in such instances, we will emit this event. The resulting channel will necessarily be opted out, awaiting an opt-in action by the user.\n", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates that a channel for the `sms` event type was created.", "enum": [ "mobile_create_channel" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "opted_in": { "description": "The date and time when the channel was registered.", "type": "string" }, "registration_type": { "description": "Indicates that the channel was registered with Airship.", "enum": [ "create" ], "type": "string" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile create channel event", "type": "object", "x-schema-tag": "SMS compliance events" }, "mobile_keyword_matched": { "description": "Occurs when a mobile-originated message contains a recognized keyword.\n", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Occurs when a mobile-originated event contains a recognized keyword.", "enum": [ "mobile_keyword_matched" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "inbound_message": { "$ref": "#/components/schemas/inbound_message" }, "keyword": { "description": "Indicates that a mobile-originated message contained a recognized keyword.", "type": "string" }, "outbound_message": { "$ref": "#/components/schemas/outbound_message" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile keyword matched event", "type": "object", "x-schema-tag": "SMS compliance events" }, "mobile_keyword_unmatched": { "description": "Occurs when a mobile-originated message *does not* contain a recognized keyword.\n", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Occurs when a mobile-originated event does not contain a recognized keyword.", "enum": [ "mobile_keyword_unmatched" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "inbound_message": { "$ref": "#/components/schemas/inbound_message" }, "outbound_message": { "$ref": "#/components/schemas/outbound_message" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile keyword unmatched event", "type": "object", "x-schema-tag": "SMS compliance events" }, "mobile_opt_in": { "description": "Occurs when a user opts in to text messages via a keyword.", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates that the event represents a newly registered address.", "enum": [ "mobile_opt_in" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "inbound_message": { "$ref": "#/components/schemas/inbound_message" }, "keyword": { "description": "The keyword the user sent to opt in.", "type": "string" }, "outbound_message": { "$ref": "#/components/schemas/outbound_message" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile opt in event", "type": "object", "x-schema-tag": "SMS compliance events" }, "mobile_opt_out": { "description": "Occurs when a user sends a MO message that matches a keyword with an opt-out action. If present, this event would supplant a `mobile_keyword_matched` event.\n", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "The event represents a user who opted out of notifications.", "enum": [ "mobile_opt_out" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "inbound_message": { "$ref": "#/components/schemas/inbound_message" }, "keyword": { "description": "Indicates that the user responded to opt out of messages. The enumerated values represent default keywords, but any custom keywords that you configure to allow mobile opt-outs can also appear here.", "enum": [ "STOP", "STOPALL", "UNSUBSCRIBE", "CANCEL", "END", "QUIT", "ARRET" ], "type": "string" }, "outbound_message": { "$ref": "#/components/schemas/outbound_message" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile opt out event", "type": "object", "x-schema-tag": "SMS compliance events" }, "mobile_originated": { "description": "Represents a message action that originated from a user — like an inbound SMS or email.", "properties": { "body": { "$ref": "#/components/schemas/mobile_originated_sms" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "MOBILE_ORIGINATED" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Mobile originated event", "type": "object", "x-schema-tag": "Events" }, "mobile_originated_sms": { "description": "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.\n", "properties": { "event_type": { "description": "The specific `MOBILE_ORIGINATED` event that occurred.", "enum": [ "mobile_originated_sms" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains the mobile-originated message itself and the response to the message.\n", "properties": { "inbound_message": { "description": "The contents of the message received from an SMS device.\n", "type": "string" }, "keyword": { "description": "The specific keyword used in the inbound message, if recognized; the keyword in the `inbound_message` determines the `outbound_message` sent to the device. If a keyword could not be matched in the `inbound_message`, this field is absent.\n", "type": "string" }, "outbound_message": { "description": "The response sent to the SMS device, based on the inbound message and keyword.\n", "type": "string" } }, "required": [ "inbound_message", "outbound_message" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "title": "Mobile-originated SMS event", "type": "object" }, "mobile_terminated_message": { "description": "Occurs when Airship sends an SMS message to a user. The message represented by this event could be a response to an individual mobile-originated (MO) message, or a message initiated from the Airship UI/API.\n", "properties": { "body": { "description": "Contains the Compliance event subtype and properties specific to the event subtype.", "properties": { "event_type": { "description": "Airship has emitted a mobile-terminated message.", "enum": [ "mobile_terminated_message" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" } }, "required": [ "event_type", "identifiers" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS mobile terminated message event", "type": "object", "x-schema-tag": "SMS compliance events" }, "named_user_id": { "description": "The named user identifier for the device.", "type": "string", "x-inline-component": true }, "nameduser": { "description": "User information for events which occur at the user level.", "properties": { "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "required": [ "named_user_id" ], "title": "Named user", "type": "object", "x-schema-tag": "Device information" }, "numeric_matcher": { "description": "Determines if a number matches or is within range of the criteria.\n", "oneOf": [ { "properties": { "at_least": { "type": "number" } }, "type": "object" }, { "properties": { "at_most": { "type": "number" } }, "type": "object" }, { "properties": { "at_least": { "type": "number" }, "at_most": { "type": "number" } }, "type": "object" } ], "title": "Numeric matcher", "x-schema-tag": "JSON Predicates", "x-weight": 520 }, "occurred": { "description": "When the event occurred.", "type": "string", "x-inline-component": true }, "offset": { "description": "An identifier of a location in the stream; used to resume the stream after severing a connection. If you open a stream using the offset value, the stream will resume with the next element in the stream. You should store this value as a string so that you can easily resume the stream if it ends for any reason.", "type": "string", "x-inline-component": true }, "open": { "description": "Occurs when a user opens your app. This event fires every time a user opens your app, including the first time. See also the [first open](#first-open) event.", "properties": { "body": { "properties": { "last_delivered": { "$ref": "#/components/schemas/last_delivered" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush", "description": "An associated push object, establishing a causal relationship between a push and the Open event. Absent if a causal relationship to a push cannot be established." } }, "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "OPEN" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "offset" ], "title": "Open", "type": "object", "x-schema-tag": "Events" }, "opendevices": { "description": "Information about open channel users.", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "OPEN" ], "type": "string" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" }, "open_platform_name": { "description": "If `device_type` is set to `OPEN`, this field shows the full name of the platform.", "type": "string" } }, "title": "Open channel device information", "type": "object", "x-schema-tag": "Device information" }, "opted_out": { "allOf": [ { "$ref": "#/components/schemas/smsEventShared" }, { "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "The address opted out of notifications.", "enum": [ "opted_out" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" } }, "required": [ "event_type", "identifiers" ], "type": "object" } }, "required": [ "body" ], "type": "object" } ], "description": "Occurs when a user is opted out of an SMS audience via the Airship API, i.e., not via an opt-out keyword. This event type does not contain additional `properties`.", "title": "SMS opted out event", "x-schema-tag": "SMS compliance events" }, "outbound_message": { "description": "The message you sent to the user represented in the event.", "type": "string", "x-inline-component": true }, "presence_matcher": { "description": "Determines if there is any value for a given key.\n", "properties": { "is_present": { "description": "If `true`, the value should be present. If `false`, the value should not be present.", "type": "boolean" } }, "title": "Presence matcher", "type": "object", "x-schema-tag": "JSON Predicates", "x-weight": 530 }, "processed": { "description": "When the event was ingested by Airship. There may be some latency between when the event occurred, and when it was processed.", "type": "string", "x-inline-component": true }, "push_body": { "description": "Occurs when you initiate a push, automation, or sequence.\n\nAirship fulfills delivery over a time interval with a number of child pushes, each with a unique `push_id` and a common `group_id`. There is no guarantee that push body events (defined in Push Body Event) for the child pushes fulfilling a group will appear in the stream.\n\nWhen you start, pause, or publish a sequence, Airship emits a `push_body` event for the sequence itself, and each message contained within the sequence (i.e., messages +1). After you start a sequence, Airship does not issue subsequent `push_body` events for the sequence unless you pause or publish changes to the sequence.\n\nAirship does not store the API payload for unicast messages. See the [Data Retention Schedule](/reference/general/#data-retention-schedule).\n", "properties": { "body": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "payload": { "description": "The specification of the push as sent via the API, a Base64 encoded JSON value.", "type": "string" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "resource": { "description": "Describes the type of push, helping you interpret the JSON response. Values pertain to the push `type`.", "enum": [ "PIPELINES", "SCHEDULES", "PUSH", "EXPERIMENTS", "IN_APP_AUTOMATION" ], "type": "string" }, "trimmed": { "description": "If true, the push payload was trimmed from the event body.", "type": "boolean" } }, "required": [ "payload", "trimmed", "resource" ], "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "PUSH_BODY" ], "type": "string" } }, "required": [ "offset" ], "title": "Push body", "type": "object", "x-schema-tag": "Events" }, "push_id": { "description": "A unique identifier for a push operation.", "format": "uuid", "title": "Push ID", "type": "string", "x-inline-component": true }, "push_opt_in": { "description": "Indicates whether or not the device is opted into push notifications.", "type": "string", "x-inline-component": true }, "rcs_read_report": { "description": "Read reports are custom events sent when an RCS message is marked as read. These events use the `delivery_report` interaction type with a `name` of `read`. See [RCS branded senders](/developer/api-integrations/sms/rcs/).\n", "properties": { "body": { "properties": { "interaction_type": { "enum": [ "delivery_report" ], "type": "string" }, "name": { "description": "Indicates the event is an RCS read.", "enum": [ "read" ], "type": "string" }, "properties": { "properties": { "is_rcs": { "description": "A boolean describing whether the message was delivered as RCS.", "type": "boolean" }, "number_of_message_parts": { "description": "The number of message parts delivered.", "type": "number" }, "recipient_country_code": { "description": "The country code of the message recipient.", "type": "string" }, "sender": { "description": "The number or short code that the message originated from.", "type": "string" }, "vendor": { "description": "The delivery service for the message.", "enum": [ "CLX", "TWILIO" ], "type": "string" }, "vendorDeliveryId": { "description": "A unique identifier for the message from the SMS vendor.", "type": "string" } }, "required": [ "sender", "vendor", "vendorDeliveryId" ], "type": "object" }, "source": { "enum": [ "API" ], "type": "string" }, "triggering_push": { "description": "Identifies the push notification that caused the event.", "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "required": [ "push_id" ], "type": "object" } }, "required": [ "source", "name", "properties" ], "type": "object" }, "device": { "description": "Device properties for custom events with the `delivery_report` interaction type always specify an SMS device.", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "delivery_address": { "description": "The phone number associated with the channel.", "type": "string" }, "device_type": { "enum": [ "SMS" ], "type": "string" } }, "required": [ "channel", "delivery_address", "device_type" ], "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "CUSTOM" ], "type": "string" } }, "required": [ "id", "occurred", "offset", "processed", "type", "device", "body" ], "title": "RCS read report", "type": "object", "x-schema-tag": "Custom SMS events" }, "region": { "description": "Region events are emitted when a device enters or exits a geofence or the range of any of a set of bluetooth beacons. Region events require a Gimbal integration. Events for Gimbal customers include the Gimbal application instance identifier as `com.urbanairship.gimbal.aii` within the `identifiers` object.\n", "properties": { "body": { "properties": { "action": { "description": "Indicates whether the event was the result of a user entering or exiting the region.", "enum": [ "enter", "exit" ], "type": "string" }, "name": { "description": "A friendly name for the event; may be retrieved from a third-party.", "type": "string" }, "region_id": { "description": "The identifier for the region in Airship.", "format": "uuid", "type": "string" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "source_info": { "description": "Information about the source application that generated the event.", "properties": { "region_id": { "description": "The unique region identifier from the originating system.", "type": "string" }, "source": { "description": "Identifies the system that the event originated from.", "example": "Gimbal", "type": "string" } }, "type": "object" } }, "required": [ "action", "region_id", "source_info" ], "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "REGION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Region event", "type": "object", "x-schema-tag": "Events" }, "registration": { "description": "An event that occurs when users register to receive email messages.", "properties": { "body": { "description": "Contains the event subtype and additional properties about the event.", "properties": { "event_type": { "enum": [ "registration" ], "type": "string" }, "identifiers": { "properties": { "address": { "description": "The email address registered.", "type": "string" } }, "type": "object" }, "properties": { "properties": { "commercial_opted_in": { "description": "The date and time when the user opted into commercial email messages.", "type": "string" }, "registration_type": { "description": "`create` indicates that a channel was created in Airship. `update` represents a `PUT` call to the email channel registration API.\n", "enum": [ "create", "unbounce", "update", "opt_in", "unsubscribe" ], "type": "string" }, "source": { "description": "Only appears when [suppression is removed from an email channel using the dashboard Contact Management tool](/guides/audience/tools/contact-management/#removing-suppression).", "enum": [ "ui" ], "type": "string" }, "suppression_state": { "description": "The suppression state of the email address.", "enum": [ "imported", "spam_complaint", "commercial_spam_complaint", "out_of_band", "bounce", "none" ], "type": "string" }, "user": { "description": "The username of the Airship dashboard user that [removed suppression from an email channel using the dashboard Contact Management tool](/guides/audience/tools/contact-management/#removing-suppression) and acknowledged the compliance implications.", "type": "string" } }, "required": [ "registration_type" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email registration event", "type": "object", "x-schema-tag": "Email compliance events" }, "richControlPushObject": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "type": "object", "x-inline-component": true }, "richPushObject": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "context": { "$ref": "#/components/schemas/rich_push_context" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "type": "object", "x-inline-component": true }, "rich_control": { "description": "Occurs when a Message Center message is not delivered to a user because they are in a control group for a [Sequence A/B test](/guides/experimentation/a-b-tests/sequences/) or [Holdout Experiment](/guides/experimentation/holdout-experiments/).", "properties": { "body": { "$ref": "#/components/schemas/richControlPushObject" }, "device": { "$ref": "#/components/schemas/appdevices" }, "experiment_id": { "description": "ID for the requested experiment.", "format": "uuid", "type": "string" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "RICH_CONTROL" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Rich control", "type": "object", "x-schema-tag": "Events" }, "rich_delete": { "description": "Occurs when a user deletes a Message Center message from their inbox.", "properties": { "body": { "$ref": "#/components/schemas/richPushObject" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "RICH_DELETE" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Rich delete", "type": "object", "x-schema-tag": "Events" }, "rich_delivery": { "description": "Occurs when a Message Center message is delivered to a user's inbox.\n\nEven though rich push deliveries may or may not cause an alert on the user's lock screen, they are always associated with a push identifier in the Airship system.\n", "properties": { "body": { "$ref": "#/components/schemas/richPushObject" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "RICH_DELIVERY" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Rich delivery", "type": "object", "x-schema-tag": "Events" }, "rich_push_context": { "description": "The context provides reporting information associated with a rich push message.\n", "properties": { "extra": { "description": "A dictionary of string keys to arbitrary JSON values associated with the rich push message.", "type": "object" } }, "title": "Rich push context", "type": "object" }, "rich_read": { "description": "Occurs when a user reads a Message Center message in their inbox.", "properties": { "body": { "$ref": "#/components/schemas/richPushObject" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "RICH_READ" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Rich read", "type": "object", "x-schema-tag": "Events" }, "rnd-scan": { "description": "Occurs when an MSISDN undergoes an RND scan, either as part of recurring carrier deactivation monitoring or as an ad hoc scan, indicated by `source`. RND scans may remove suppression, uninstall the channel, or take no action. For more information, see [SMS Number Life Cycle Management](/developer/api-integrations/sms/compliance/number-lifecycle).", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates an RND scan action for the channel.", "enum": [ "rnd_scan" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "action": { "description": "The action performed on the channel as a result of the scan. `suppression_removed` indicates the channel was restored from suppression. `uninstalled` indicates permanent removal. `none` indicates a scan with no action taken.", "enum": [ "suppression_removed", "uninstalled", "none" ], "type": "string" }, "reassigned": { "description": "Indicates whether the action was due to a number reassignment.", "type": "boolean" }, "scan_id": { "description": "Optional identifier shared by all events from the same scan.", "type": "string" }, "source": { "description": "Optional identifier of the process that initiated the scan event. `monthly_scan` indicates a carrier deactivation RND scan aligned with the monthly FCC RND update. `app_scan` indicates a full audience RND scan.", "enum": [ "monthly_scan", "app_scan" ], "type": "string" } }, "required": [ "action" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS RND scan event", "type": "object", "x-schema-tag": "SMS compliance events" }, "scope": { "description": "The scope at which the operation was performed; only present on events\nwhich target a named user.\n", "enum": [ "app", "web", "email", "sms" ], "title": "Scope", "type": "string", "x-inline-component": true }, "screen_viewed": { "description": "Occurs when a user has finished viewing a screen. It is up to you to instrument your app or website with names for each screen. Doing so will allow you to determine the user's path by filtering on the fields in the table below.\n", "properties": { "body": { "properties": { "duration": { "description": "The number of milliseconds that the user was on the screen.", "format": "milliseconds", "type": "integer" }, "previous_screen": { "description": "The name assigned to the screen the user was on prior to the `viewed_screen`.", "type": "string" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "viewed_screen": { "description": "The name assigned to the screen that the user left.", "type": "string" } }, "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SCREEN_VIEWED" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Screen viewed", "type": "object", "x-schema-tag": "Events" }, "send": { "description": "Occurs whenever a push notification is sent to a device identified in the audience selector of a message.\n", "properties": { "body": { "properties": { "alerting": { "description": "If true, the send event was alerting. Alerting send event has notification text, badge, or sound.", "type": "boolean" }, "campaigns": { "$ref": "#/components/schemas/campaigns" }, "click_tracking": { "description": "If true, email click events will be reported. Only HTTP and HTTPS links are tracked.", "type": "boolean" }, "context": { "$ref": "#/components/schemas/context" }, "experiment_id": { "$ref": "#/components/schemas/experiment_id" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "open_tracking": { "description": "If true, email open events will be reported.", "type": "boolean" }, "push_id": { "$ref": "#/components/schemas/push_id" }, "variant_id": { "$ref": "#/components/schemas/variant_id" } }, "required": [ "push_id" ], "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" }, { "$ref": "#/components/schemas/sms_email_devices" }, { "$ref": "#/components/schemas/opendevices" } ] }, "experiments": { "description": "An object listing the details of the [Message A/B test](/guides/experimentation/a-b-tests/messages) or [Holdout Experiment](/guides/experimentation/holdout-experiments), if the send includes either.", "properties": { "experiment_id": { "$ref": "#/components/schemas/experiment_id" }, "type": { "description": "The type of experiment. `GLOBAL` is for A/B tests, `EXP_GROUP` is for Holdout Experiments.", "enum": [ "EXP_GROUP", "GLOBAL" ], "type": "string" }, "variant_id": { "description": "For A/B tests, the string ID of the message variant.", "type": "string" } }, "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SEND" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Send", "type": "object", "x-schema-tag": "Events" }, "send_aborted": { "description": "Occurs when a push is dropped from our system before delivery is attempted. This can happen:\n\n * When using [external data feeds](/guides/personalization/sources/external-data-feeds/) to personalize a message and an error was encountered or the feed returned a non-successful response\n * When a [Message Limit](/guides/messaging/project/config/message-limits/) is met\n * When a [ban list](/guides/messaging/messages/delivery/ban-lists/) webhook issues a `drop` response for a user\n\nDevice information for the device that did not receive the push is included with `SEND_ABORTED` events.\n", "properties": { "body": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns", "description": "Appears if the aborted push was associated with one or more campaigns." }, "group_id": { "$ref": "#/components/schemas/group_id", "description": "Appears if the aborted push belonged to a group." }, "push_id": { "$ref": "#/components/schemas/push_id", "description": "The push that was aborted." }, "reason": { "description": "Describes the reason this push was aborted.\n\n* `FEED_BANNED_RESPONSE`: The response from the endpoint indicated a channel was banned. See [Ban Lists](/guides/messaging/messages/delivery/ban-lists/).\n* `FEED_REQUEST_REJECTED`: The request to the specified server was rejected. Occurs when a 4xx HTTP response code is returned when Airship calls the webhook.\n* `FEED_RESOLVE_FAILURE`: The URI of the feed could not be resolved.\n* `FREQUENCY_LIMIT_FAILURE`: A [Message Limit](/guides/messaging/project/config/message-limits/) retrieval failed.\n* `FREQUENCY_LIMIT_REACHED`: A [Message Limit](/guides/messaging/project/config/message-limits/) was exceeded.\n* `UNKNOWN`: The error occurred due to another problem.", "enum": [ "FEED_BANNED_RESPONSE", "FEED_REQUEST_REJECTED", "FEED_RESOLVE_FAILURE", "FREQUENCY_LIMIT_FAILURE", "FREQUENCY_LIMIT_REACHED", "UNKNOWN" ], "type": "string" } }, "required": [ "push_id", "reason" ], "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SEND_ABORTED" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Send aborted", "type": "object", "x-schema-tag": "Events" }, "send_rejected": { "description": "Occurs when a push fails during communication with a third party, like APNs or GCM. This typically indicates that the user has uninstalled the app or otherwise invalidated the last-registered credentials stored in Airship. The event contains the rejected push and the group, variant, or campaigns the push belonged to.\n\n\nDevice information for the device that did not receive the push is included with `SEND_REJECTED` events.\n", "properties": { "body": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns", "description": "Appears if the rejected push was associated with one or more campaigns." }, "group_id": { "$ref": "#/components/schemas/group_id", "description": "Appears if the rejected push belonged to a group." }, "push_id": { "$ref": "#/components/schemas/push_id", "description": "The push that was rejected." }, "status": { "description": "The status of the message.", "enum": [ "BadDeviceToken", "Unauthorized", "InvalidPackageName", "InvalidParameters", "Unavailable", "MessageTooBig", "InvalidTtl", "InvalidDataKey", "MissingRegistration", "Uninstalled" ], "type": "string" }, "variant_id": { "$ref": "#/components/schemas/variant_id", "description": "Appears if the rejected push was a part of an experiment (A/B Test)." } }, "required": [ "push_id" ], "type": "object" }, "device": { "$ref": "#/components/schemas/appdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SEND_REJECTED" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Send rejected", "type": "object", "x-schema-tag": "Events" }, "session_id": { "description": "Represents the \"session\" of user activity. Absent if the application was initialized while backgrounded.", "format": "uuid", "title": "Session ID", "type": "string", "x-inline-component": true }, "short_link_click": { "description": "Occurs when a user taps or \"clicks\" an Airship-shortened link in an SMS or MMS message.", "properties": { "body": { "properties": { "campaigns": { "$ref": "#/components/schemas/campaigns" }, "group_id": { "$ref": "#/components/schemas/group_id" }, "properties": { "properties": { "original_url": { "description": "The URL represented by the Airship-shortened link.", "type": "string" } }, "required": [ "original_url" ], "type": "object" }, "push_id": { "$ref": "#/components/schemas/push_id" } }, "required": [ "push_id", "properties" ], "type": "object" }, "device": { "properties": { "attributes": { "properties": { "web_user_agent_string": { "description": "Describes the web user agent for the audience member who used the link.", "type": "string" } }, "type": "object" }, "channel": { "$ref": "#/components/schemas/channel" }, "delivery_address": { "description": "The MSISDN of the audience member who clicked the link.", "type": "string" }, "device_type": { "enum": [ "SMS" ], "type": "string" }, "identifiers": { "properties": { "sender": { "description": "The sender of the message.", "type": "string" } }, "required": [ "sender" ], "type": "object" } }, "required": [ "channel", "device_type" ], "type": "object" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SHORT_LINK_CLICK" ], "type": "string" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Short link click event", "type": "object", "x-schema-tag": "Events" }, "smsCreateAndSend": { "description": "An event that occurs for SMS channels used as a part of a [Create and Send](/guides/messaging/bulk-sending/).", "properties": { "body": { "description": "Contains the event subtype and additional properties about the event.", "properties": { "event_type": { "enum": [ "create_and_send" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Properties for an SMS [Create and Send](/guides/messaging/bulk-sending/) event.", "properties": { "channel_registered": { "description": "If true, a new channel was created to represent the identifiers in the event. If false, the address was already registered to Airship.", "type": "boolean" }, "opted_in": { "description": "The date-and-time when the `msisdn` opted into messages from the `sender`.", "type": "string" } }, "required": [ "channel_registered" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice", "description": "Describes the device involved in the `create_and_send` SMS event." } }, "required": [ "device", "body" ], "title": "SMS Create and Send event", "type": "object", "x-schema-tag": "SMS compliance events" }, "smsEventShared": { "properties": { "device": { "$ref": "#/components/schemas/complianceSmsDevice" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "description": "Compliance events are the only types of events returned by this event stream.\n", "enum": [ "COMPLIANCE" ], "type": "string" } }, "required": [ "offset" ], "type": "object", "x-inline-component": true }, "smsIdentifiers": { "description": "Contains the sender and MSISDN for the event.", "properties": { "msisdn": { "description": "The phone number of the user involved in the compliance event.", "type": "string" }, "sender": { "description": "The phone number or short code of the sender involved in the compliance event.", "type": "string" } }, "required": [ "sender", "msisdn" ], "title": "SMS Identifiers", "type": "object", "x-inline-component": true }, "smsRegistered": { "description": "Occurs when a user opts in to receive SMS messages from you, via a call to the [SMS registration API](/developer/rest-api/ua/#operation-api-channels-sms-post).", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates that the event represents a newly registered address.", "enum": [ "registration" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "opted_in": { "description": "The ISO 8601 date-time (UTC) when the channel opted-in to notifications.", "type": "string" }, "registration_type": { "description": "Indicates whether the channel was created or updated.", "enum": [ "create", "update" ], "type": "string" } }, "required": [ "registration_type", "opted_in" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS registration event", "type": "object", "x-schema-tag": "SMS compliance events" }, "smsUpdated": { "description": "When an SMS event update occurs.", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates that the event represents a newly registered address.", "enum": [ "registration" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "opted_in": { "description": "The ISO 8601 date-time (UTC) when the channel opted-in to notifications.", "type": "string" }, "registration_type": { "description": "Indicates the channel was updated.", "enum": [ "update" ], "type": "string" } }, "required": [ "registration_type", "opted_in" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS update event", "type": "object", "x-schema-tag": "SMS compliance events" }, "sms_email_devices": { "description": "Information about the SMS or email device related to an event.", "properties": { "channel": { "description": "The channel identifier.", "type": "string" }, "delivery_address": { "description": "* If `device_type` is `SMS`, this field shows the MSISDN.\n* If `device_type` is `EMAIL`, this field shows the email address.\n", "type": "string" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "EMAIL", "SMS" ], "type": "string" }, "named_user_id": { "description": "The named user the channel is associated with.", "type": "string" } }, "required": [ "channel", "device_type" ], "title": "Device information for SMS and email", "type": "object", "x-schema-tag": "Device information" }, "sms_uninstalled": { "description": "Occurs when the [SMS uninstall API](/developer/rest-api/ua/#operation-api-channels-sms-uninstall-post) is called.", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "The address was uninstalled.", "enum": [ "uninstall" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" } }, "required": [ "event_type", "identifiers" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS uninstalled event", "type": "object", "x-schema-tag": "SMS compliance events" }, "subscription": { "description": "`SUBSCRIPTION` events reflect changes to a user's subscription state. Most `SUBSCRIPTION` events represent changes to opt-in status. When the event represents a change to subscription list memberships rather than a full opt-in or opt-out, the body includes a `subscription_lists` payload and no opt-out timestamps are set on the channel.\n", "properties": { "body": { "properties": { "event_type": { "description": "Determines the source of the subscription event. `registration` and `create_and_send` events result in changes to `opted_in` dates. `link_unsubscribe` and `list_unsubscribe` events represent changes to `opted_out` status unless the body includes a `subscription_lists` payload, in which case the change applies only to the listed subscription lists. All other event types contain `opted_out` dates.\n\n* `registration`: Represents a change to a user's `commercial_opted_in`, `transactional_opted_in`, `click_tracking_opted_in`, or `open_tracking_opted_in` dates.\n* `create_and_send`: A user's opted_in status changed as a result of a [Create and Send](/guides/messaging/bulk-sending/) event.\n* `bounce`: Subscription status changed as a result of a bounce event.\n* `link_unsubscribe`: The user clicked an unsubscribe link in the message body of an email, or selected the **Unsubscribe from all** button in the Email Preference Center.\n* `list_unsubscribe`: The user selected the unsubscribe button in their email client, sent through the `List-Unsubscribe` email header.\n* `spam_complaint`: The user classified an email as spam.\n* `out_of_band`: A bounce occurred after the recipient MTA accepted an email.\n", "enum": [ "registration", "create_and_send", "bounce", "list_unsubscribe", "link_unsubscribe", "spam_complaint", "out_of_band" ], "type": "string" }, "identifiers": { "description": "Contains address information specific to the `channel_id` specified in the event.", "properties": { "address": { "description": "The email address representing the change.", "type": "string" } }, "type": "object" }, "properties": { "properties": { "click_tracking_opted_in": { "format": "date-time", "type": "string" }, "click_tracking_opted_out": { "format": "date-time", "type": "string" }, "commercial_opted_in": { "format": "date-time", "type": "string" }, "commercial_opted_out": { "format": "date-time", "type": "string" }, "open_tracking_opted_in": { "format": "date-time", "type": "string" }, "open_tracking_opted_out": { "format": "date-time", "type": "string" }, "transactional_opted_in": { "format": "date-time", "type": "string" }, "transactional_opted_out": { "format": "date-time", "type": "string" } }, "type": "object" }, "subscription_lists": { "description": "Present when the event represents a change to the user's subscription list membership rather than a full opt-in or opt-out. When this property is absent, the event applies to the channel as a whole.\n", "properties": { "canceled": { "description": "An array of subscription list IDs the user was removed from.", "items": { "type": "string" }, "type": "array" }, "enrolled": { "description": "An array of subscription list IDs the user was added to.", "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "required": [ "event_type", "identifiers" ], "type": "object", "x-schema-tag": "Event Body" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SUBSCRIPTION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Subscription event", "type": "object", "x-note": "These events appear in the stream whenever a user changes their `opted_in` or `opted_out` dates, which may not be meaningful in all cases; a user may opt into an email list on which they're already a member.\n", "x-schema-tag": "Events" }, "subscription_list": { "description": "Occurs when subscription list enrollment changes for a device or user.\n", "properties": { "body": { "$ref": "#/components/schemas/subscription_list_mutations", "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices_noattributes" }, { "$ref": "#/components/schemas/sms_email_devices" }, { "$ref": "#/components/schemas/opendevices" }, { "$ref": "#/components/schemas/nameduser" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "SUBSCRIPTION_LIST" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Subscription list event", "type": "object", "x-schema-tag": "Events" }, "subscription_list_mutations": { "description": "Changes to a device or user's subscription list membership.", "properties": { "canceled": { "description": "An array of subscription list IDs which were canceled. Present\nonly when a cancellation occurred.\n", "items": { "type": "string" }, "type": "array" }, "current": { "description": "An array of subscription list IDs the user is enrolled in after\nthe change.\n", "items": { "type": "string" }, "type": "array" }, "enrolled": { "description": "An array of subscription list IDs which were enrolled. Present\nonly when an enrollment occurred.\n", "items": { "type": "string" }, "type": "array" }, "scope": { "$ref": "#/components/schemas/scope" } }, "type": "object", "x-inline-component": true }, "subset": { "description": "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.", "properties": { "count": { "description": "Required when the `type` is `PARTITION`. The value is the number of partitions you want to divide the event stream into.", "type": "integer" }, "proportion": { "description": "Required when the `type` is `SAMPLE`. Specifies the percentage of events that will appear in the response, chosen randomly.", "format": "float", "maximum": 1, "minimum": 0, "type": "number" }, "selection": { "description": "Required when the `type` is `PARTITION`. The value is the partition that you want to return in the response. Must be less than `count`.", "type": "integer" }, "type": { "description": "The type of partition.\n\n* `SAMPLE` returns a random sample of events; the sample `proportion` determines the fraction of total events that Real-Time Data Streaming returns.\n* `PARTITION` segments the event stream into a number of partitions (determined by `count`) and returns a single partition in the event stream (determined by `selection`).", "enum": [ "SAMPLE", "PARTITION" ], "type": "string" } }, "title": "Request subset", "type": "object" }, "suppression_removed": { "description": "Occurs when suppression is removed from an SMS channel outside of an RND scan, for example from the dashboard. For more information, see [SMS Opt-In/Out Handling](/developer/api-integrations/sms/opt-in-out-handling#suppression).", "properties": { "body": { "description": "Contains the event subtype, identifiers, and additional properties about the event.", "properties": { "event_type": { "description": "Indicates that suppression was removed from the channel.", "enum": [ "suppression_removed" ], "type": "string" }, "identifiers": { "$ref": "#/components/schemas/smsIdentifiers" }, "properties": { "description": "Contains properties specific to the `event_type`.", "properties": { "source": { "description": "Identifies where suppression was removed. `ui` indicates removal from the Airship dashboard.", "enum": [ "ui" ], "type": "string" } }, "required": [ "source" ], "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceSmsDevice" } }, "required": [ "device", "body" ], "title": "SMS suppression removed event", "type": "object", "x-schema-tag": "SMS compliance events" }, "tag_change": { "description": "Occurs when tags change for a device.\n", "properties": { "body": { "properties": { "add": { "description": "Tag group/tag pairs added to the device. Each tag group is an array containing one or more tags within this object.", "type": "object" }, "current": { "description": "The total set/state of tag group/tag pairs associated with the device after the tag change. Each tag group is an array containing one or more tags within this object.", "type": "object" }, "remove": { "description": "Tag group/tag pairs removed from the device. Each tag group is an array containing one or more tags within this object.", "type": "object" } }, "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices_noattributes" }, { "$ref": "#/components/schemas/sms_email_devices" }, { "$ref": "#/components/schemas/opendevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "TAG_CHANGE" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Tag change", "type": "object", "x-schema-tag": "Events" }, "ua_sdk_version": { "description": "The version of the Airship SDK used in the app.", "type": "string", "x-inline-component": true }, "uninstall": { "description": "Occurs when a user uninstalls an Airship-integrated app in response to a push.", "properties": { "body": { "properties": { "decay": { "description": "If true, Airship recorded an uninstall event due to user inactivity.", "type": "boolean" } }, "required": [ "decay" ], "type": "object" }, "device": { "oneOf": [ { "$ref": "#/components/schemas/appdevices" }, { "$ref": "#/components/schemas/webdevices" } ] }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "UNINSTALL" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Uninstall", "type": "object", "x-schema-tag": "Events" }, "unsubscribe": { "description": "A compliance event representing a user who unsubscribed from your email messaging. The unsubscribe can originate from the email client's unsubscribe button (sent through the `List-Unsubscribe` email header, an unsubscribe link in the message body, or the Email Preference Center. When the unsubscribe applies to specific subscription lists rather than the email channel as a whole, the body includes a `subscription_lists` payload and no opt-out timestamps are set on the channel.\n", "properties": { "body": { "description": "Contains the event subtype and additional properties about the event.", "properties": { "event_type": { "description": "Unsubscribe events are considered `registration` events; the `registration_type` indicates the type of registration occurring.", "enum": [ "registration" ], "type": "string" }, "identifiers": { "properties": { "address": { "description": "The email address registered.", "type": "string" } }, "type": "object" }, "properties": { "properties": { "message_type": { "description": "The message type that the user unsubscribed from.", "enum": [ "commercial" ], "type": "string" }, "registration_type": { "enum": [ "unsubscribe" ], "type": "string" } }, "required": [ "registration_type", "message_type" ], "type": "object" }, "subscription_lists": { "description": "Present when the unsubscribe applies to one or more subscription lists rather than the email channel as a whole. When this property is present, no opt-out timestamps are set on the channel.\n", "properties": { "canceled": { "description": "An array of subscription list IDs the user was removed from.", "items": { "type": "string" }, "type": "array" } }, "type": "object" } }, "required": [ "event_type", "identifiers", "properties" ], "type": "object" }, "device": { "$ref": "#/components/schemas/complianceEmailChannel" } }, "required": [ "device", "body" ], "title": "Email unsubscribe event", "type": "object", "x-schema-tag": "Email compliance events" }, "user": { "description": "The current state of the user when the event is emitted, including the contact ID and an optional named user ID.", "properties": { "contact_id": { "$ref": "#/components/schemas/contact_id" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "title": "User", "type": "object", "x-schema-tag": "User information" }, "value_matcher": { "description": "The value you are filtering for in the JSON Predicate.", "oneOf": [ { "$ref": "#/components/schemas/array_matcher" }, { "$ref": "#/components/schemas/equals_matcher" }, { "$ref": "#/components/schemas/numeric_matcher" }, { "$ref": "#/components/schemas/presence_matcher" }, { "$ref": "#/components/schemas/version_matcher" } ], "title": "Value matcher", "x-inline-component": true }, "variant_id": { "description": "The ID of the variant that a push is associated with, if the push was a part of an A/B test (experiment).", "title": "Variant ID", "type": "integer", "x-inline-component": true }, "version_matcher": { "description": "Determines if version numbers match.\n", "properties": { "version_matches": { "description": "The version number string to be matched. Format strings using [Ivy syntax](https://ant.apache.org/ivy/history/2.1.0/settings/version-matchers.html).", "type": "string" } }, "title": "Version matcher", "type": "object", "x-schema-tag": "JSON Predicates", "x-weight": 550 }, "web_click": { "description": "Occurs when a user interacts with a web notification, e.g., clicked or tapped it. Web Click events have a device attribute on the event indicating the channel that was the target of the notification. The body of a Web Click Event is an associated push object.\n", "properties": { "body": { "$ref": "#/components/schemas/associatedPush" }, "device": { "$ref": "#/components/schemas/webdevices_nolocale" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "WEB_CLICK" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Web click event", "type": "object", "x-schema-tag": "Events" }, "web_session": { "description": "Occurs when an opted in user begins interacting with a website. Web session events have a device attribute, indicating the channel associated with the user.\n", "properties": { "body": { "properties": { "last_delivered": { "$ref": "#/components/schemas/last_delivered" }, "session_id": { "$ref": "#/components/schemas/session_id" }, "triggering_push": { "$ref": "#/components/schemas/associatedPush" } }, "type": "object" }, "device": { "$ref": "#/components/schemas/webdevices" }, "id": { "$ref": "#/components/schemas/id" }, "occurred": { "$ref": "#/components/schemas/occurred" }, "offset": { "$ref": "#/components/schemas/offset" }, "processed": { "$ref": "#/components/schemas/processed" }, "type": { "enum": [ "WEB_SESSION" ], "type": "string" }, "user": { "$ref": "#/components/schemas/user" } }, "required": [ "id", "device", "type", "occurred", "processed", "body", "offset" ], "title": "Web session event", "type": "object", "x-schema-tag": "Events" }, "webdevices": { "description": "Information about web users generated by the SDK.", "properties": { "attributes": { "properties": { "iana_timezone": { "$ref": "#/components/schemas/iana_timezone" }, "locale_country_code": { "$ref": "#/components/schemas/locale_country_code" }, "locale_language_code": { "$ref": "#/components/schemas/locale_language_code" }, "locale_timezone": { "$ref": "#/components/schemas/locale_timezone" }, "locale_variant": { "$ref": "#/components/schemas/locale_variant" }, "push_opt_in": { "$ref": "#/components/schemas/push_opt_in" }, "ua_sdk_version": { "$ref": "#/components/schemas/ua_sdk_version" }, "web_browser_name": { "description": "The name of the browser running the SDK.", "type": "string" }, "web_browser_type": { "description": "Indicates whether the browser was running on a desktop or mobile device.", "type": "string" }, "web_browser_version": { "description": "The version of the browser.", "type": "string" }, "web_user_agent_string": { "description": "The user agent reported by the browser.", "type": "string" } }, "required": [ "web_browser_name", "web_browser_type", "web_browser_version", "web_user_agent_string", "ua_sdk_version", "push_opt_in" ], "type": "object" }, "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "WEB" ], "type": "string" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "required": [ "channel", "device_type" ], "title": "Web device information", "type": "object", "x-schema-tag": "Device information" }, "webdevices_noattributes": { "description": "Information about web users in tag change events.", "properties": { "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "WEB" ], "type": "string" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "required": [ "channel", "device_type" ], "title": "Web device information without `attributes`", "type": "object", "x-inline-component": true }, "webdevices_nolocale": { "description": "Information about web users generated by the SDK.", "properties": { "attributes": { "properties": { "iana_timezone": { "$ref": "#/components/schemas/iana_timezone" }, "push_opt_in": { "$ref": "#/components/schemas/push_opt_in" }, "ua_sdk_version": { "$ref": "#/components/schemas/ua_sdk_version" }, "web_browser_name": { "description": "The name of the browser running the SDK.", "type": "string" }, "web_browser_type": { "description": "Indicates whether the browser was running on a desktop or mobile device.", "type": "string" }, "web_browser_version": { "description": "The version of the browser.", "type": "string" }, "web_user_agent_string": { "description": "The user agent reported by the browser.", "type": "string" } }, "required": [ "web_browser_name", "web_browser_type", "web_browser_version", "web_user_agent_string", "ua_sdk_version", "push_opt_in" ], "type": "object" }, "channel": { "$ref": "#/components/schemas/channel" }, "device_type": { "description": "The platform that the channel is on.", "enum": [ "WEB" ], "type": "string" }, "named_user_id": { "$ref": "#/components/schemas/named_user_id" } }, "required": [ "channel", "device_type" ], "title": "Web device information without locale", "type": "object", "x-inline-component": true, "x-schema-tag": "Device information" } }, "securitySchemes": { "basicAuth": { "description": "Authorization header containing the word `Basic` followed by a space and a Base64-encoded string generated from your app key and master secret in `appKey:masterSecret` format. For example, `Basic YXBwX2tleTptYXN0ZXJfc2VjcmV0`. This security type is only accepted by the Compliance endpoint.", "scheme": "basic", "type": "http", "x-display-name": "Basic Auth (Master)" }, "bearerAuth": { "description": "Authorization header containing the word `Bearer` followed by a space and a bearer token, which can be obtained from Airship [when configuring a direct integration](/guides/reports/real-time-data-streaming/). Tokens can be revoked at will.", "scheme": "bearer", "type": "http", "x-display-name": "Bearer Token" } } }, "info": { "description": "Airship's Real-Time Data Streaming API exposes a stream of events describing a user's experience within a mobile app or browser. Events reflect user action, automated device responses to their environment (e.g., encountering a beacon), and experience-changing actions initiated by app/site publishers, such as sending a push notification.\n\nTo consume the event stream, you must issue an authenticated request including a starting point for the stream and optional filter and subset specifications.\n\nThe event data is delivered as [newline-delimited JSON](https://github.com/ndjson/ndjson-spec), with each event on its own line. The accept header should be set to `application/vnd.urbanairship+x-ndjson; version=3;`. Each event contains an offset that denotes its location on the stream. If a client disconnects for any reason, it should reconnect with instructions to start at the last offset it successfully processed, to avoid missing any data. For each app key authorized to use Real-Time Data Streaming, Airship stores 7 days or 100 GB worth of data, whichever comes first.\n", "title": "Airship Real-Time Data Streaming API", "version": "V3" }, "openapi": "3.0.0", "paths": { "/api/events": { "post": { "description": "Opens a new event stream according to your request filters. Unlike our other APIs, a request to /api/events/ returns a stream of data, where each line is a JSON object. The response body contains all the events in that stream. Since streams by definition go on forever, Real-Time Data Streaming will never end the response without some external reason.\n", "operationId": "openEventStream", "parameters": [ { "description": "The app key for the project you want to return events for.", "in": "header", "name": "X-UA-Appkey", "required": true, "schema": { "description": "The application key.", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/eventsRequest" } } } }, "responses": { "200": { "content": { "application/vnd.urbanairship+x-ndjson; version=3;": { "schema": { "discriminator": { "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/attribute_operation" }, { "$ref": "#/components/schemas/close" }, { "$ref": "#/components/schemas/compliance" }, { "$ref": "#/components/schemas/contact_change" }, { "$ref": "#/components/schemas/control" }, { "$ref": "#/components/schemas/custom" }, { "$ref": "#/components/schemas/feature_flag_interaction" }, { "$ref": "#/components/schemas/first_open" }, { "$ref": "#/components/schemas/first_opt_in" }, { "$ref": "#/components/schemas/in_app_button_tap" }, { "$ref": "#/components/schemas/in_app_experiences" }, { "$ref": "#/components/schemas/in_app_form_display" }, { "$ref": "#/components/schemas/in_app_form_result" }, { "$ref": "#/components/schemas/in_app_message_control" }, { "$ref": "#/components/schemas/in_app_message_display" }, { "$ref": "#/components/schemas/in_app_message_exclusion" }, { "$ref": "#/components/schemas/in_app_message_expiration" }, { "$ref": "#/components/schemas/in_app_message_resolution" }, { "$ref": "#/components/schemas/in_app_page_swipe" }, { "$ref": "#/components/schemas/in_app_page_view" }, { "$ref": "#/components/schemas/in_app_pager_completed" }, { "$ref": "#/components/schemas/in_app_pager_summary" }, { "$ref": "#/components/schemas/label_event" }, { "$ref": "#/components/schemas/location" }, { "$ref": "#/components/schemas/mobile_originated" }, { "$ref": "#/components/schemas/open" }, { "$ref": "#/components/schemas/push_body" }, { "$ref": "#/components/schemas/region" }, { "$ref": "#/components/schemas/rich_control" }, { "$ref": "#/components/schemas/rich_delete" }, { "$ref": "#/components/schemas/rich_delivery" }, { "$ref": "#/components/schemas/rich_read" }, { "$ref": "#/components/schemas/screen_viewed" }, { "$ref": "#/components/schemas/send" }, { "$ref": "#/components/schemas/send_aborted" }, { "$ref": "#/components/schemas/send_rejected" }, { "$ref": "#/components/schemas/short_link_click" }, { "$ref": "#/components/schemas/subscription" }, { "$ref": "#/components/schemas/subscription_list" }, { "$ref": "#/components/schemas/tag_change" }, { "$ref": "#/components/schemas/uninstall" }, { "$ref": "#/components/schemas/web_click" }, { "$ref": "#/components/schemas/web_session" } ] } } }, "description": "The response to a successful request is an unending stream of [newline-delimited JSON](https://github.com/ndjson/ndjson-spec). Each non-empty line in the response represents a single event.\n\nThis response body is of arbitrarily large size. As long as the connection is open, Airship will continue to write to the data stream. If no events have been dispatched down a connection for some time, the API will write to the connection to prevent it from being closed for inactivity. By default, only a blank line (a single newline character) will be written. If the `enable_offset_updates` field in the request is `true`, then instead of a blank line, an event will be written with type `OFFSET_UPDATE`. These events have no `body` or `device` field, and always have `occurred` and `processed` times indicating when they were sent. The `offset` field will contain the offset of the last event considered for inclusion in the stream whether or not it was actually sent. This may be useful to track position in the stream when using a filter which removes much of it.\n\n\nThese events should not be stored, and will be different for every connection even if requests are identical. `OFFSET_UPDATE` events are not subject to filters, and if requested will be delivered regardless of those specified. You should always check the type field before handling any delivered event.\n\n\nIf you receive no data or new line characters for ninety seconds, close the connection and reconnect.\n" }, "402": { "description": "Like other Airship applications, Real-Time Data Streaming supports a limited number of simultaneous connections. If you exceed this number, you may receive this response." }, "404": { "description": "We do not have data for the specified App key. This is likely because we have yet to ingress or generate any data for your app." } }, "security": [ { "bearerAuth": [] } ], "summary": "Open an event stream", "tags": [ "Event Stream" ], "x-important": "Airship will occasionally add:\n\n* New properties to existing objects.\n\n* New event types, which will be JSON objects with new values for the type field.\n\nYour integration must be tolerant of these kinds of changes.\n", "x-note": "In the request specification, JSON collection types have semantic meaning.\n\n**array**: Arrays indicate a boolean `\"OR\"`. Wherever an array appears in the specification, the resulting stream will contain the events passing any of the conditions defined by the array. An empty array results in a `400` response.\n\n**object**: Object attributes indicate a boolean `\"AND\"`. All conditions in the object must be satisfied in order for an event to be written to the response. If you would like all events to pass the condition the attribute defines, omit the attribute. If an unexpected attribute appears on an event, a status code `400` response will be returned.\n" } }, "/api/events/general": { "post": { "description": "Opens a stream delivering events proving data-safety regulation compliance for email and SMS channel-related events (registration, unsubscription, etc.).\n\nUnlike a standard event stream, a compliance event stream uses basic authorization, like API calls to `https://go.urbanairship.com/api`.\n", "operationId": "openComplianceEventStream", "parameters": [ { "description": "The app key for the project you want to return compliance events for.", "in": "header", "name": "X-UA-Appkey", "required": true, "schema": { "description": "The application key.", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/complianceRequest" } } } }, "responses": { "200": { "content": { "application/vnd.urbanairship+x-ndjson; version=3;": { "schema": { "$ref": "#/components/schemas/compliance" } } }, "description": "The response to a successful request is an unending stream of [newline-delimited JSON](https://github.com/ndjson/ndjson-spec). Each non-empty line in the response represents a single compliance event. Unlike events in a normal event stream, this endpoint returns events of the `compliance` type, and is open to SMS and email customers. As long as the connection is open, Airship will continue to write to the event stream.\n\nIf a stream records no events for a period of time, the API will write a blank line (a single newline character) to the connection to prevent it from being closed for inactivity. If the `enable_offset_updates` field in the request is `true`, then the blank line is replaced with an `OFFSET_UPDATE` event. These events have no `body` or `device` field, and always have `occurred` and `processed` times indicating when they were sent. The `offset` field will contain the offset of the last event considered for inclusion in the stream whether or not it was actually sent. This may be useful to track position in the stream when using a filter which removes much of it.\n\nYou should not store these events; they will be different for every connection even if requests are identical. `OFFSET_UPDATE` events are not subject to filters, and are delivered even if not specified in the list of events you want to return. You should always check the type field before handling any delivered event.\n\nIf you do not receive data or new line characters for ninety seconds, close the connection and reconnect.\n" } }, "security": [ { "basicAuth": [] } ], "summary": "Open a compliance event stream", "tags": [ "Compliance Event Stream" ] } } }, "servers": [ { "description": "The North American base URL for Airship's Real-Time Data Streaming API", "url": "https://connect.urbanairship.com" }, { "description": "The European base URL for Airship's Real-Time Data Streaming API", "url": "https://connect.asnapieu.com" } ], "tags": [ { "description": "Opens an event stream to your filter specifications.", "name": "Event Stream", "x-card-description": "Consume real-time event streams" }, { "description": "The compliance event stream provides real-time access to `COMPLIANCE` type events. This endpoint is open to all Airship users.", "name": "Compliance Event Stream", "x-card-description": "Access compliance event data" } ], "x-schema-tags": [ { "description": "Contains information about events organized by `type`. Some events contain additional subtypes or device information.\n", "name": "Events", "x-card-description": "Event type definitions" }, { "description": "Contains event body information specific to email compliance events.\n", "name": "Email compliance events", "x-card-description": "Email compliance event schemas" }, { "description": "Contains event body information specific to SMS compliance events.\n", "name": "SMS compliance events", "x-card-description": "SMS compliance event schemas" }, { "description": "Airship delivers email messages through a provider (SparkPost). Custom email events represent events that occur at the provider level — outside Airship, between the provider and recipient.\n", "name": "Custom email events", "x-card-description": "Provider email event schemas" }, { "description": "Events are ascribed to devices. App, web, SMS, email, and open channel `devices` return different information.\n", "name": "Device information", "x-card-description": "Device information schemas" }, { "description": "Airship delivers SMS messages through service providers Sinch (formerly known as CLX) and Twilio. Custom SMS events represent events that occur between the service provider and recipient. They do not represent Airship service events.\n", "name": "Custom SMS events", "x-card-description": "Provider SMS event schemas" }, { "description": "Contains information about the user that is associated with a given event.\n", "name": "User information", "x-card-description": "User information schemas" }, { "description": "Provides a flexible language for expressing custom filtering of your event stream.\n", "name": "JSON Predicates", "x-card-description": "Filter expression schemas" } ] }