# Airship

> Send, check and schedule push notifications with Airship, the mobile app engagement platform: to a named user, a device, a tag, a segment or a static list. Keep named users' channels, tags and attributes in step, send custom events, manage static lists and read push reports. Start a workflow when a push is sent or scheduled, or a segment or list changes.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/airship

## Actions

### Add channel to named user

Link a channel (a device) or an email address to a named user, such as when someone signs in, so pushes to them reach it. A channel linked to someone else moves to this named user.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.
- Channel ID (`channel_id`, text): The channel to link, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5. Give this or an email address.
- Email address (`email_address`, text): An email address registered in Airship, to link instead of a channel.
- Platform (`platform`, text): The channel's platform. Only needed for a channel registered in the last few minutes. One of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browser), `email`, `sms`, `open` (Open channel).

**Outputs**

- `associated` (true/false): True once Airship accepted it; it applies in moments
- `channel_id` (text): The channel linked; empty when an email address was
- `email_address` (text): The email address linked; empty when a channel was
- `named_user_id` (text): The named user

**Example output**

```json
{
  "associated": true,
  "channel_id": "dceafd02-b852-4305-83df-98b65fa40dd4",
  "email_address": "",
  "named_user_id": "customer-42"
}
```

### Create static list

Make an empty static list (a list of people you keep yourself, such as loyalty members) to fill with 'Replace static list members'.

**Inputs**

- Name (`name`, text, required): The list's name, up to 64 characters, such as platinum_members. It can't be changed or reused.
- Description (`description`, text): What the list is for.
- Extra data (`extra`, object): Names and values to keep with it, such as {"source": "crm"}.

**Outputs**

- `created` (true/false): True once Airship made it
- `description` (text): Its description
- `extra` (object): Its extra key-value data
- `name` (text): The new list's name

**Example output**

```json
{
  "created": true,
  "description": "loyalty program platinum members",
  "extra": {
    "key": "value"
  },
  "name": "platinum_members"
}
```

### Delete named user

Delete a named user and uninstall every channel linked to them, removing their data from Airship, such as for a privacy request. It can't be undone.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.

**Outputs**

- `deleted` (true/false): True once Airship accepted it; uninstalling takes a little while
- `named_user_id` (text): The named user deleted

**Example output**

```json
{
  "deleted": true,
  "named_user_id": "customer-42"
}
```

### Delete scheduled push

Delete a scheduled push notification so it is never sent. It can't be undone.

**Inputs**

- Schedule ID (`schedule_id`, text, required): The schedule's ID, from 'Schedule push notification' or 'List scheduled pushes'.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `schedule_id` (text): The schedule deleted

**Example output**

```json
{
  "deleted": true,
  "schedule_id": "eac2ace6-349a-41a2-b874-5496d7bf0100"
}
```

### Delete static list

Delete a static list. Its name can't be used for a new list afterwards.

**Inputs**

- Static list (`static_list`, text, required): The list to delete, or its name.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `name` (text): The list deleted

**Example output**

```json
{
  "deleted": true,
  "name": "platinum_members"
}
```

### Get channel

Get a channel (a device, email address or phone number): its platform, whether it takes notifications, its named user and tags.

**Inputs**

- Channel ID (`channel_id`, text, required): The channel's ID, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5.

**Outputs**

- `address` (text): Its email address or open channel address; empty for a device
- `channel_id` (text): The channel's ID
- `created` (text): When it was registered (UTC)
- `installed` (true/false): False once the app was uninstalled
- `last_registration` (text): When it last checked in (UTC)
- `named_user_id` (text): The named user it belongs to; empty if none
- `opted_in` (true/false): True when it takes notifications
- `platform` (text): Its platform: ios, android, amazon, web, email, sms or open
- `tag_groups` (object): Its tags, by tag group
- `tags` (list): Its primary device tags

**Example output**

```json
{
  "address": "",
  "channel_id": "9c36e8c7-5a73-47c0-9716-99fd3d4197d5",
  "created": "2020-08-08T20:41:06",
  "installed": true,
  "last_registration": "2020-05-01T18:00:27",
  "named_user_id": "some_id_that_maps_to_your_systems",
  "opted_in": false,
  "platform": "ios",
  "tag_groups": {
    "tag_group_1": [
      "tag1",
      "tag2"
    ],
    "tag_group_2": [
      "tag1",
      "tag2"
    ]
  },
  "tags": [
    "tag1",
    "tag2"
  ]
}
```

### Get named user

Get a named user with their tags, attributes and linked channels.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.

**Outputs**

- `attributes` (object): Their attributes, by attribute ID
- `channel_count` (number): How many channels are linked to them
- `channels` (list): The channels (devices, email addresses) linked to them
- `created` (text): When Airship first saw them (UTC)
- `last_modified` (text): When they last changed (UTC)
- `named_user_id` (text): The named user's ID
- `tags` (object): Their tags, by tag group, such as {"loyalty": ["gold"]}

**Example output**

```json
{
  "attributes": {
    "item_purchased": "Fur removal tool",
    "pets_age": 12
  },
  "channel_count": 1,
  "channels": [
    {
      "channel_id": "dceafd02-b852-4305-83df-98b65fa40dd4",
      "created": "2020-04-08T20:41:06",
      "installed": true,
      "last_registration": "2020-05-01T18:00:27",
      "opted_in": true,
      "platform": "ios"
    }
  ],
  "created": "2020-04-08T20:41:06",
  "last_modified": "2020-05-01T18:00:27",
  "named_user_id": "user-456",
  "tags": {
    "my_fav_tag_group": [
      "tag1",
      "tag2"
    ]
  }
}
```

### Get push results

Get one push notification's results: when it was sent, to how many devices, and how many people opened the app from it.

**Inputs**

- Push ID (`push_id`, text, required): The push's ID, from 'Send push notification' or 'List pushes with results'.

**Outputs**

- `direct_responses` (number): How many people opened the app from it
- `group_id` (text): The group it belongs to (an automation or local-time send)
- `open_channel_sends` (number): How many it was sent to on open channels
- `open_channels` (list): Sends on each open channel platform
- `push_id` (text): The push's ID
- `push_time` (text): When it was sent (UTC)
- `push_type` (text): What kind of push it was, such as BROADCAST_PUSH, TAG_PUSH, SEGMENTS_PUSH, SCHEDULED_PUSH or UNICAST_PUSH
- `sends` (number): How many devices it was sent to on Airship's own platforms

**Example output**

```json
{
  "direct_responses": 15,
  "group_id": "",
  "open_channel_sends": 167,
  "open_channels": [
    {
      "platform": "PLATFORM_NAME",
      "sends": 22
    },
    {
      "platform": "ANOTHER_PLATFORM",
      "sends": 145
    }
  ],
  "push_id": "90f28bc6-6c9b-4c99-b970-973afc266e08",
  "push_time": "2020-02-25 23:03:12",
  "push_type": "UNICAST_PUSH",
  "sends": 167
}
```

### Get scheduled push

Get one scheduled push notification: when it goes out, who it goes to and what it says.

**Inputs**

- Schedule ID (`schedule_id`, text, required): The schedule's ID, from 'Schedule push notification' or 'List scheduled pushes'.

**Outputs**

- `audience` (text): Who it goes to, such as tag vip
- `message` (text): The notification's text
- `name` (text): Its name; empty if it has none
- `paused` (true/false): True when a repeating schedule is paused
- `platforms` (list): The platforms it is built for
- `push_ids` (list): The push IDs Airship gave it
- `recurring` (true/false): True for a schedule that repeats
- `schedule_id` (text): The schedule's ID
- `send_at` (text): When it goes out (UTC, or each device's local time for a local one); a day for best_time
- `timing` (text): How it is timed: exact (one moment), local (each device's time of day), best_time or recurring
- `url` (text): Its address in Airship's API

**Example output**

```json
{
  "audience": "tag earlyBirds",
  "message": "Good Day Sunshine",
  "name": "Morning People",
  "paused": false,
  "platforms": [
    "ios",
    "android"
  ],
  "push_ids": [
    "83046227-9b06-4114-9f23-0df349792bbd"
  ],
  "recurring": false,
  "schedule_id": "eac2ace6-349a-41a2-b874-5496d7bf0100",
  "send_at": "2026-12-03T09:15:00",
  "timing": "exact",
  "url": "https://go.urbanairship.com/api/schedules/eac2ace6-349a-41a2-b874-5496d7bf0100"
}
```

### Get segment

Get a segment's name and the rules that pick its audience.

**Inputs**

- Segment (`segment`, text, required): The segment, from the project's segments, or its ID.

**Outputs**

- `criteria` (object): The rules that pick its audience, as Airship writes them
- `name` (text): Its name
- `segment_id` (text): The segment's ID

**Example output**

```json
{
  "criteria": {
    "and": [
      {
        "tag": "ipad"
      },
      {
        "not": {
          "tag": "foo"
        }
      }
    ]
  },
  "name": "A segment",
  "segment_id": "00c0d899-a595-4c66-9071-bc59374bbe6b"
}
```

### Get sends report

Count the push notifications sent on each platform in a time range, hour by hour, day by day or month by month.

**Inputs**

- From (`start`, date and time, required): The start of the time range.
- To (`end`, date and time, required): The end of the time range.
- Split by (`precision`, text): How to split the range. Defaults to days. One of: `DAILY`, `HOURLY`, `MONTHLY`. Default: `DAILY`.

**Outputs**

- `periods` (list): Each hour, day or month in the range
- `precision` (text): How the range is split: HOURLY, DAILY or MONTHLY
- `total` (number): Pushes sent in the whole range

**Example output**

```json
{
  "periods": [
    {
      "by_platform": {
        "android": 50,
        "ios": 500
      },
      "date": "2020-05-01 00:00:00",
      "total": 550
    }
  ],
  "precision": "MONTHLY",
  "total": 550
}
```

### Get static list

Get a static list's status (ready, processing or failure) and how many channels it reaches.

**Inputs**

- Static list (`static_list`, text, required): The list, or its name.

**Outputs**

- `channel_count` (number): How many channels the last good upload reaches
- `created` (text): When it was made (UTC)
- `description` (text): Its description
- `error_path` (text): A link to the last upload's errors; empty if none
- `extra` (object): Its extra key-value data
- `last_updated` (text): When its members last changed (UTC)
- `name` (text): The list's name
- `status` (text): ready (it can be sent to), processing (an upload is being read) or failure (the last upload failed)

**Example output**

```json
{
  "channel_count": 1000,
  "created": "2020-04-08T20:41:06",
  "description": "loyalty program platinum members",
  "error_path": "",
  "extra": {
    "key": "value"
  },
  "last_updated": "2020-05-01T18:00:27",
  "name": "platinum_members",
  "status": "ready"
}
```

### List pushes with results

List the push notifications sent in a time range, with how many were sent and how many people opened the app from each.

**Inputs**

- From (`start`, date and time, required): The start of the time range.
- To (`end`, date and time, required): The end of the time range.
- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `pushes` (list): The pushes, newest first as Airship lists them

**Example output**

```json
{
  "count": 1,
  "pushes": [
    {
      "direct_responses": 0,
      "group_id": "4e768dc7-4ebc-4206-890a-60b5627763a7",
      "open_channel_sends": 0,
      "open_channels": [],
      "push_id": "f4db3752-a982-4a2b-994e-7b5fd1c7f02f",
      "push_time": "2020-08-15 02:12:22",
      "push_type": "UNICAST_PUSH",
      "sends": 1
    }
  ]
}
```

### List scheduled pushes

List the project's scheduled push notifications with when each goes out and who it goes to.

**Inputs**

- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 1000.

**Outputs**

- `count` (number): How many are listed
- `schedules` (list): The scheduled pushes
- `total` (number): How many the project has

**Example output**

```json
{
  "count": 1,
  "schedules": [
    {
      "audience": "tag earlyBirds",
      "message": "Good Day Sunshine",
      "name": "Morning People",
      "paused": false,
      "platforms": [
        "ios",
        "android"
      ],
      "push_ids": [
        "83046227-9b06-4114-9f23-0df349792bbd"
      ],
      "recurring": false,
      "schedule_id": "eac2ace6-349a-41a2-b874-5496d7bf0100",
      "send_at": "2026-12-03T09:15:00",
      "timing": "exact",
      "url": "https://go.urbanairship.com/api/schedules/eac2ace6-349a-41a2-b874-5496d7bf0100"
    }
  ],
  "total": 1
}
```

### List segments

List the project's segments with when each was made and last changed.

**Inputs**

- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 1000.

**Outputs**

- `count` (number): How many are listed
- `segments` (list): The segments

**Example output**

```json
{
  "count": 1,
  "segments": [
    {
      "created_at": "2012-08-29T14:00:22Z",
      "name": "A segment",
      "segment_id": "00c0d899-a595-4c66-9071-bc59374bbe6b",
      "updated_at": "2012-08-29T14:00:22Z"
    }
  ]
}
```

### List static lists

List the project's static lists with their status and size.

**Inputs**: None.

**Outputs**

- `count` (number): How many there are
- `lists` (list): The static lists

**Example output**

```json
{
  "count": 1,
  "lists": [
    {
      "channel_count": 1000,
      "created": "2020-04-08T20:41:06",
      "description": "loyalty program platinum members",
      "error_path": "",
      "extra": {
        "key": "value"
      },
      "last_updated": "2020-05-01T18:00:27",
      "name": "platinum_members",
      "status": "ready"
    }
  ]
}
```

### Remove channel from named user

Unlink a channel (a device) or an email address from a named user, such as when someone signs out.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.
- Channel ID (`channel_id`, text): The channel to unlink, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5. Give this or an email address.
- Email address (`email_address`, text): An email address registered in Airship, to unlink instead of a channel.
- Platform (`platform`, text): The channel's platform. Only needed for a channel registered in the last few minutes. One of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browser), `email`, `sms`, `open` (Open channel).

**Outputs**

- `channel_id` (text): The channel unlinked; empty when an email address was
- `disassociated` (true/false): True once Airship accepted it; it applies in moments
- `email_address` (text): The email address unlinked; empty when a channel was
- `named_user_id` (text): The named user

**Example output**

```json
{
  "channel_id": "dceafd02-b852-4305-83df-98b65fa40dd4",
  "disassociated": true,
  "email_address": "",
  "named_user_id": "customer-42"
}
```

### Replace static list members

Replace everyone on a static list with these named users and channels. Airship processes the upload in a few moments.

**Inputs**

- Static list (`static_list`, text, required): The list to fill, or its name.
- Named users (`named_users`, list): The named users on the list, one per row.
- Channel IDs (`channel_ids`, list): Channels on the list, one per row, all on one platform.
- Channels' platform (`channel_platform`, text): The platform the channel IDs are on. One of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browser), `email`, `sms`, `open` (Open channel).

**Outputs**

- `channels` (number): How many channels were uploaded
- `name` (text): The list
- `named_users` (number): How many named users were uploaded
- `status` (text): processing: Airship reads the upload in the background

**Example output**

```json
{
  "channels": 0,
  "name": "platinum_members",
  "named_users": 2,
  "status": "processing"
}
```

### Schedule push notification

Schedule a push notification for a moment, or for a time of day in each device's own time zone, with the same choices as 'Send push notification'.

**Inputs**

- Name (`name`, text): A name to find it by in Airship, such as Weekly digest.
- When (`timing`, text): One moment for everyone, or a time of day in each device's own time zone. One of: `exact` (At one moment everywhere), `local` (At a time of day in each device's own time zone). Default: `exact`.
- Send at (`send_at`, date and time): When to send it. It must be in the future. Only when When is At one moment everywhere.
- Day (`local_date`, date): The day to send it on, in each device's time zone. Only when When is At a time of day in each device's own time zone.
- Time of day (`local_time`, time): The time of day it arrives on each device, such as 09:00. Only when When is At a time of day in each device's own time zone.
- Send to (`audience_type`, text): Who gets it. Defaults to a named user. One of: `named_user` (A named user), `channel` (One channel (a device)), `tag` (Everyone with a tag), `segment` (A segment), `static_list` (A static list), `all` (Everyone). Default: `named_user`.
- Named user (`named_user`, text): The named user's ID, such as customer-42. Every device linked to them gets it. Only when Send to is A named user.
- Channel ID (`channel_id`, text): The channel's ID, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5: one iOS, Android, Fire OS or web device. Only when Send to is One channel (a device).
- Tag (`tag`, text): Everyone with this tag gets it, such as vip. Only when Send to is Everyone with a tag.
- Tag group (`tag_group`, text): The tag's group key, such as loyalty. Leave blank for a device's own tags. Only when Send to is Everyone with a tag.
- Segment (`segment`, text): The segment, from the project's segments, or its ID. Only when Send to is A segment.
- Static list (`static_list`, text): The static list, or its name. Only when Send to is A static list.
- Message (`alert`, text, required): The notification's text.
- Title (`title`, text): A title shown above the text, on each platform that shows one.
- When tapped (`on_tap`, text): What tapping the notification opens. Defaults to the app. One of: `app` (Open the app), `deep_link` (Open a deep link in the app), `url` (Open a web page). Default: `app`.
- Link (`link`, text): The deep link, such as myapp://orders/1234, or the web page, such as https://example.com/sale. Only when When tapped is Open a deep link in the app or Open a web page.
- Platforms (`platforms`, list): The platforms to build it for. Leave blank for iOS and Android, or the channel's own platform. One or more of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browsers).
- Extra data (`extra`, object): Names and values the app receives with it, such as {"order_id": "1234"}.

**Outputs**

- `audience` (text): Who it goes to, such as tag vip
- `message` (text): The notification's text
- `name` (text): Its name; empty if it has none
- `operation_id` (text): Airship's ID for the request, for its support team
- `paused` (true/false): True when a repeating schedule is paused
- `platforms` (list): The platforms it is built for
- `push_ids` (list): The push IDs Airship gave it
- `recurring` (true/false): True for a schedule that repeats
- `schedule_id` (text): The schedule's ID
- `send_at` (text): When it goes out (UTC, or each device's local time for a local one); a day for best_time
- `timing` (text): How it is timed: exact (one moment), local (each device's time of day), best_time or recurring
- `url` (text): Its address in Airship's API

**Example output**

```json
{
  "audience": "tag earlyBirds",
  "message": "Good Day Sunshine",
  "name": "Morning People",
  "operation_id": "df6a6b50-9843-0304-d5a5-743f246a4946",
  "paused": false,
  "platforms": [
    "ios",
    "android"
  ],
  "push_ids": [
    "83046227-9b06-4114-9f23-0df349792bbd"
  ],
  "recurring": false,
  "schedule_id": "eac2ace6-349a-41a2-b874-5496d7bf0100",
  "send_at": "2026-12-03T09:15:00",
  "timing": "exact",
  "url": "https://go.urbanairship.com/api/schedules/eac2ace6-349a-41a2-b874-5496d7bf0100"
}
```

### Send custom event

Record something a person did outside the app, such as a purchase, for a named user or a channel. Airship's automations and journeys can start on it.

**Inputs**

- Event name (`event_name`, text, required): What happened, such as purchased. It is sent in lower case.
- Named user (`named_user`, text): The named user's ID: the ID your app gives the person in Airship, such as customer-42.
- Channel ID (`channel_id`, text): The channel it happened on, instead of a named user.
- Value (`value`, number): An amount for the event, such as 49.99.
- Properties (`properties`, object): Details messages can use, such as {"product": "Sneakers", "size": 42}.
- Happened at (`occurred_at`, date and time): When it happened, within the last 90 days. Defaults to now.
- Transaction (`transaction`, text): An ID tying several events together, such as an order number.

**Outputs**

- `event_name` (text): The event's name, in lower case as Airship keeps it
- `operation_id` (text): Airship's ID for the request, for its support team
- `sent` (true/false): True once Airship accepted it
- `user` (text): Who it happened to, such as named user customer-42

**Example output**

```json
{
  "event_name": "purchased",
  "operation_id": "8c61c0c4-95b0-45a6-bc38-733f7fcb8979",
  "sent": true,
  "user": "named user hugh.manbeing"
}
```

### Send push notification

Send a push notification now to a named user, a channel, everyone with a tag, a segment, a static list or everyone, with a title, what a tap opens and extra data for the app.

**Inputs**

- Send to (`audience_type`, text): Who gets it. Defaults to a named user. One of: `named_user` (A named user), `channel` (One channel (a device)), `tag` (Everyone with a tag), `segment` (A segment), `static_list` (A static list), `all` (Everyone). Default: `named_user`.
- Named user (`named_user`, text): The named user's ID, such as customer-42. Every device linked to them gets it. Only when Send to is A named user.
- Channel ID (`channel_id`, text): The channel's ID, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5: one iOS, Android, Fire OS or web device. Only when Send to is One channel (a device).
- Tag (`tag`, text): Everyone with this tag gets it, such as vip. Only when Send to is Everyone with a tag.
- Tag group (`tag_group`, text): The tag's group key, such as loyalty. Leave blank for a device's own tags. Only when Send to is Everyone with a tag.
- Segment (`segment`, text): The segment, from the project's segments, or its ID. Only when Send to is A segment.
- Static list (`static_list`, text): The static list, or its name. Only when Send to is A static list.
- Message (`alert`, text, required): The notification's text.
- Title (`title`, text): A title shown above the text, on each platform that shows one.
- When tapped (`on_tap`, text): What tapping the notification opens. Defaults to the app. One of: `app` (Open the app), `deep_link` (Open a deep link in the app), `url` (Open a web page). Default: `app`.
- Link (`link`, text): The deep link, such as myapp://orders/1234, or the web page, such as https://example.com/sale. Only when When tapped is Open a deep link in the app or Open a web page.
- Platforms (`platforms`, list): The platforms to build it for. Leave blank for iOS and Android, or the channel's own platform. One or more of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browsers).
- Extra data (`extra`, object): Names and values the app receives with it, such as {"order_id": "1234"}.

**Outputs**

- `audience` (text): Who it went to, such as named user customer-42
- `operation_id` (text): Airship's ID for the request, for its support team
- `platforms` (list): The platforms it was built for, such as ios
- `push_id` (text): The push's ID, for its report; the first if Airship made several
- `push_ids` (list): Every push ID Airship made for this send

**Example output**

```json
{
  "audience": "named user customer-42",
  "operation_id": "df6a6b50-9843-0304-d5a5-743f246a4946",
  "platforms": [
    "ios",
    "android"
  ],
  "push_id": "9d78a53b-b16a-c58f-b78d-181d5e242078",
  "push_ids": [
    "9d78a53b-b16a-c58f-b78d-181d5e242078"
  ]
}
```

### Set named user attributes

Set or remove a named user's attributes, such as first_name or loyalty_points. Each must be added under Audience > Attributes first.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.
- Attributes to set (`attributes`, object): Attribute IDs and values, such as {"first_name": "Ada", "loyalty_points": 120}. Give dates as 2026-11-30.
- Attributes to remove (`remove_attributes`, list): Attribute IDs to clear.

**Outputs**

- `named_user_id` (text): The named user
- `removed` (list): The attribute IDs removed
- `set` (list): The attribute IDs set
- `warnings` (list): Airship's warnings, such as an attribute the project doesn't have; empty when every change applied

**Example output**

```json
{
  "named_user_id": "customer-42",
  "removed": [],
  "set": [
    "first_name",
    "loyalty_points"
  ],
  "warnings": []
}
```

### Update channel tags

Add or remove a channel's tags in one tag group, or replace the group's tags. Tags in the device group can be overwritten by the app itself.

**Inputs**

- Channel ID (`channel_id`, text, required): The channel's ID, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5.
- Tag group (`tag_group`, text, required): The tag group's key, from Audience > Tags > Tag Groups, such as loyalty.
- Tags to add (`add_tags`, list): Tags to add to the group. Others stay.
- Tags to remove (`remove_tags`, list): Tags to take out of the group.
- Replace the group's tags with (`replace_tags`, list): Every tag the group should have; the rest are removed. Not with tags to add or remove.
- Platform (`platform`, text): The channel's platform. Leave blank to have Airship look it up. One of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browser), `email`, `sms`, `open` (Open channel).

**Outputs**

- `added` (list): The tags added
- `channel_id` (text): The channel
- `platform` (text): Its platform
- `removed` (list): The tags removed
- `replaced_with` (list): The tags the group was set to, when it was replaced
- `tag_group` (text): The tag group changed
- `warnings` (list): Airship's warnings, such as a tag group that doesn't exist; empty when every change applied

**Example output**

```json
{
  "added": [
    "gold"
  ],
  "channel_id": "9c36e8c7-5a73-47c0-9716-99fd3d4197d5",
  "platform": "ios",
  "removed": [],
  "replaced_with": [],
  "tag_group": "loyalty",
  "warnings": []
}
```

### Update named user tags

Add or remove a named user's tags in one tag group, or replace the group's tags. The tag group must exist in the project.

**Inputs**

- Named user (`named_user`, text, required): The named user's ID: the ID your app gives the person in Airship, such as customer-42.
- Tag group (`tag_group`, text, required): The tag group's key, from Audience > Tags > Tag Groups, such as loyalty.
- Tags to add (`add_tags`, list): Tags to add to the group. Others stay.
- Tags to remove (`remove_tags`, list): Tags to take out of the group.
- Replace the group's tags with (`replace_tags`, list): Every tag the group should have; the rest are removed. Not with tags to add or remove.

**Outputs**

- `added` (list): The tags added
- `named_user_id` (text): The named user
- `removed` (list): The tags removed
- `replaced_with` (list): The tags the group was set to, when it was replaced
- `tag_group` (text): The tag group changed
- `warnings` (list): Airship's warnings, such as a tag group that doesn't exist; empty when every change applied

**Example output**

```json
{
  "added": [
    "gold"
  ],
  "named_user_id": "customer-42",
  "removed": [
    "silver"
  ],
  "replaced_with": [],
  "tag_group": "loyalty",
  "warnings": []
}
```

### Validate push notification

Have Airship check a push notification exactly as 'Send push notification' would build it, without sending it to anyone.

**Inputs**

- Send to (`audience_type`, text): Who gets it. Defaults to a named user. One of: `named_user` (A named user), `channel` (One channel (a device)), `tag` (Everyone with a tag), `segment` (A segment), `static_list` (A static list), `all` (Everyone). Default: `named_user`.
- Named user (`named_user`, text): The named user's ID, such as customer-42. Every device linked to them gets it. Only when Send to is A named user.
- Channel ID (`channel_id`, text): The channel's ID, such as 9c36e8c7-5a73-47c0-9716-99fd3d4197d5: one iOS, Android, Fire OS or web device. Only when Send to is One channel (a device).
- Tag (`tag`, text): Everyone with this tag gets it, such as vip. Only when Send to is Everyone with a tag.
- Tag group (`tag_group`, text): The tag's group key, such as loyalty. Leave blank for a device's own tags. Only when Send to is Everyone with a tag.
- Segment (`segment`, text): The segment, from the project's segments, or its ID. Only when Send to is A segment.
- Static list (`static_list`, text): The static list, or its name. Only when Send to is A static list.
- Message (`alert`, text, required): The notification's text.
- Title (`title`, text): A title shown above the text, on each platform that shows one.
- When tapped (`on_tap`, text): What tapping the notification opens. Defaults to the app. One of: `app` (Open the app), `deep_link` (Open a deep link in the app), `url` (Open a web page). Default: `app`.
- Link (`link`, text): The deep link, such as myapp://orders/1234, or the web page, such as https://example.com/sale. Only when When tapped is Open a deep link in the app or Open a web page.
- Platforms (`platforms`, list): The platforms to build it for. Leave blank for iOS and Android, or the channel's own platform. One or more of: `ios`, `android`, `amazon` (Fire OS (Amazon)), `web` (Web browsers).
- Extra data (`extra`, object): Names and values the app receives with it, such as {"order_id": "1234"}.

**Outputs**

- `audience` (text): Who it would go to, such as named user customer-42
- `platforms` (list): The platforms it was built for, such as ios
- `valid` (true/false): True when Airship accepted the push as it would send it

**Example output**

```json
{
  "audience": "named user customer-42",
  "platforms": [
    "ios",
    "android"
  ],
  "valid": true
}
```
