Custom Events

Add custom events

Changed on

Submit 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

Request body

occurredstring date-time

The date-time when the event occurred. Events must have occurred within the past 90 days. You cannot provide a future date-time. If omitted, the current date-time is used.

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.

okboolean

Success.

operation_idstring uuid

A unique string identifying the API interaction. You can use the operation_id in support requests if something goes wrong.

Example response

{
  "operation_id": "ef625038-70a3-41f1-826f-57bc11dd625a"
}

Changes

    • breaking

      removed subschema #1: Named User from the / request property oneOf list

    • info

      added the new optional request property //

    • info

      added subschema #1: Named user to the / request property oneOf list

    This list may be incomplete.

    • breaking

      removed subschema #2: Amazon Channel from the / request property oneOf list

    • breaking

      the / request property format changed from no format to date-time

    This list may be incomplete.