SMS

Register SMS channel

Changed on

Create an SMS channel. If the channel has not opted in yet (the request did not contain opted_in), Airship creates the channel with opt_in set to false and the user receives a message prompting them to complete the opt-in flow; you can assign tags and organize pending channels before the user has finished the opt-in process, but you cannot send messages to channels until they opt in to your audience.

SMS notifications require a sender - a number that recipients will receive SMS notifications from. Contact Airship Sales or your Account Manager to provision your project for SMS notifications and complete the configuration.

post/api/channels/sms

Request

Request body

attributesobject

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

locale_countrystring

The ISO 3166 two-character country code. The value for this field becomes a tag in the ua_locale_country tag group.

locale_languagestring

The ISO 639-1 two-character language code. The value for this field becomes a tag in the ua_locale_language tag group.

msisdnstring required

The mobile phone number you want to register as an SMS channel (or send a request to opt-in). Must be numeric characters only, without leading zeros.

opted_instring date-time

The date-time that represents the date and time when explicit permission was received from the user to receive messages.

senderstring required

A long or short code the app is configured to send from. For example, 12345.

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.

timezonestring

The IANA identifier for a time zone, e.g., America/Los_Angeles. The value in this field becomes a tag in the timezone tag group.

Response

A channel with this msisdn/sender combination already exists.

OR

Changes

    • breaking

      added to the response body oneOf list for the response status

    • breaking

      added to the response body oneOf list for the response status

    • info

      removed subschema #1: New channel with opt-in subschema #2: New channel without opt-in from the response body oneOf list for the response status

    • info

      removed subschema #1: New channel with opt-in subschema #2: New channel without opt-in from the response body oneOf list for the response status

    This list may be incomplete.

    • warning

      removed the request property

    • info

      added the new optional request property

    This list may be incomplete.