Custom Events
Add custom events
Changed onSubmit an externally-generated custom event, associated with a channel ID or named user, to Airship. You can use these events as custom event triggers for Automation or Sequences and can use handlebars to personalize messages using custom event properties (information in the body.properties object).
post/api/custom-events
Request
- Base URLhttps://go.urbanairship.com
- Auth
- HTTP bearer
- or OAuth 2Client credentialsToken URLhttp://oauth2.{domain}.com/tokenScopesevt
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
[
{
"body": {
"external_campaigns": {
"categories": [
"shoes",
"running",
"summer_2017"
]
},
"interaction_id": "your.store/us/en_us/pd/shoe/pid-11046546/pgid-10978234",
"interaction_type": "url",
"name": "purchased",
"properties": {
"category": "mens shoes"
},
"session_id": "22404b07-3f8f-4e42-a4ff-a996c18fa9f1",
"transaction": "886f53d4-3e0f-46d7-930e-c2792dac6e0a",
"unique_id": "4c2c380a-0400-4d34-ab04-aaf31f0967c7",
"value": 120.49
},
"user": {
"named_user_id": "tommy_tutone"
}
}
]Response
Returned on success.
Example response
{
"operation_id": "ef625038-70a3-41f1-826f-57bc11dd625a"
}Changes
- breaking
removed
subschema #1: Named Userfrom the/request propertyoneOflist - info
added the new optional request property
// - info
added
subschema #1: Named userto the/request propertyoneOflist
This list may be incomplete.
- breaking
- breaking
removed
subschema #2: Amazon Channelfrom the/request propertyoneOflist - breaking
the
/request property format changed from no format todate-time
This list may be incomplete.
- breaking