Upload attributes list
Upload a CSV to set Text, Number, or Date attribute values on the specified channels or named users.
CSV guidelines:
- The first entry in the uploaded CSV must be a header row. The first field must be one of the following identifier types: channel_id, msisdn, email_address, or named_user.
- Only one identifier type is allowed per file unless the identifier type name matches a custom attribute schema for the associated app key.
- You must include both msisdn and sms_sender columns when targeting SMS or MMS channel types. See example to the right.
- Uploads must be newline-delimited identifiers (text/CSV) as described in RFC 4180, with commas as the delimiter, optionally double-quoted values, UTF-8 encoded, and with CRLF or LF line separators.
Required column headers per identifier type:
| Target type | Required column headers |
|---|---|
| iOS | channel_id |
| Android | channel_id |
| Named user | named_user |
| Web | channel_id |
| email_address | |
| Open channel | channel_id |
| SMS | <ul><li>msisdn (numeric and no leading 0) </li><li>sms_sender (numeric, e.g., 1234)</li></ul> |
| MMS | <ul><li>msisdn (numeric and no leading 0) </li><li> sms_sender (numeric, e.g., 1234)</li></ul> |
Optional Fields: Opt-in and opt-out dates, tracking status, suppression state, and time zone can optionally be set for new or existing channels when the identifier is an email_address or msisdn.
| Target type | Optional column headers |
|---|---|
| SMS | ua_opted_in (UTC Timestamp) |
| MMS | ua_opted_in (UTC Timestamp) |
| <ul><li>ua_commercial_opted_in or ua_commercial_opted_out (UTC Timestamp)<sup>1</sup></li><li>ua_transactional_opted_in or ua_transactional_opted_out (UTC Timestamp)<sup>1</sup></li><li>ua_open_tracking_opted_in or ua_open_tracking_opted_out (UTC Timestamp)<sup>2</sup></li><li>ua_click_tracking_opted_in or ua_click_tracking_opted_out (UTC Timestamp)<sup>2</sup></li><li>ua_email_suppression_state (BOUNCE, SPAM_COMPLAINT, COMMERCIAL_SPAM_COMPLAINT, or IMPORTED)</li><li>timezone (IANA time zone database value, for example, America/Los_Angeles)</li></ul> |
<sup>1</sup> Opt-in and opt-out dates are mutually exclusive. Providing both in the same row is invalid.<br> <sup>2</sup> By default, new channels are opted in to open and click tracking. Opt out by setting an opt-out date. Opt back in with an opt-in date that is newer than the opt-out date. Providing both dates in the same row is invalid.
Request
- Base URLhttps://go.urbanairship.com
- Auth
- HTTP basic
- or HTTP bearer
- or OAuth 2Client credentialsToken URLhttp://oauth2.{domain}.com/tokenScopeslst
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body text/csv
Response
The request has been accepted for processing.
Changes
No recorded changes to this operation across all 9 revisions of this API.