Skip to main content

Setup

You will need an Airship account with a project configured. In Courier, navigate to the Airship Integration page, enter your auth token and base URL, then click “Save.”

Profile Requirements

To deliver a push notification to a recipient over Airship, Courier must be provided the recipient’s Airship audience and device types. These values should be included in the recipient profile as airship.
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "airship": {
        "audience": {
          "named_user": "user-123"
        },
        "device_types": ["ios"]
      }
    },
    "data": {
      "username": "Steph Courier"
    }
  }
}

Overrides

You can use a provider override to replace what Courier sends to Airship’s API. For example, you can use basic auth with your send request:
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "airship": {
        "audience": {
          "named_user": "user-123"
        },
        "device_types": ["ios"]
      }
    },
    "data": {
      "dataForPushMessage": true
    },
    "providers": {
      "airship": {
        "override": {
          "body": {},
          "headers": {
            "Authorization": "Basic <EncodedAppKey:AppSecret>"
          }
        }
      }
    }
  }
}
Everything inside of message.providers.airship.override will replace what Courier sends to Airship’s API. You can see all the available options by visiting Airship’s API docs.

Tracking Events

Courier will include tracking URL information in the global_attributes data bag. See push notification tracking for details.