Email

Replace email channel

Changed on

Creates a new email channel in place of the provided channel. You may use this endpoint to change a contact's email address. When called with an email channel, this endpoint will:

  • Register a new channel
  • Associate the new email channel with the same user as the source channel
  • Uninstall the source channel
post/api/channels/email/replace/{channel_id}

Request

Path parameters

channel_idstring required
Example:251d3318-b3cb-4e9f-876a-ea3bfa6e47bd

The email channel_id you want to modify.

Request body

attributesobject

An optional object containing the customer-provided attributes associated with the email.

opt_in_mode'classic' | 'double'

The opt-in mode for registering the channel. classic is the default when unspecified, double creates a double_opt_in event.

propertiesobject

An object containing event properties. You can use these properties to filter the double opt-in event and reference them in your message content by using handlebars. Items in the properties object are limited to a 255-character maximum string length.

tag_operationsTagGroupObject

Tag groups appear within the tags object for a named user or the tag_groups object for a channel.

ua_ is a reserved prefix for Airship-specific tag groups. See Device property tags.

Example request

{
  "channel": {
    "address": "name@example.com",
    "locale_country": "US",
    "locale_language": "en",
    "timezone": "America/Los_Angeles",
    "type": "email"
  },
  "opt_in_mode": "double",
  "properties": {
    "interests": "newsletter"
  }
}

Response

The operation was successful.

Changes

    • warning

      removed the request property

    • info

      added the new optional request property

    This list may be incomplete.