Import Phone Numbers
Guide to importing phone numbers into OneSignal.
This guide explains how to upload a CSV list of phone numbers through the dashboard or manually add phone numbers if needed. Other options include:
- Mobile SDK SMS Methods and Web SDK SMS Methods
- Create user or Create subscription APIs.
- Email & Phone Number Web Prompt - Allows a user to include their own phone numbers through your website.
Duplicate Phone Number Records
OneSignal will automatically remove duplicate sms subscriptions. If the sms subscription is marked as unsubscribed, it will continue to be marked unsubscribed unless updated.
Dashboard CSV Upload
Requirements
- Must have
phone_number
column with lower-case spelling. (All property headers need to have the same case as indicated on the import page. e.g., must use "phone_number" and not "Phone_Number") - Limited to UTF-8 encoding.
- Columns must be unique.
- No quotes.
- Commas only, no semi-colons.
- No Data Tags.
Data Tag Uploads
It is recommended to upload your sms and/or email subscriptions with the
external_id
first. Then use the Update data tags CSV.
CSV Column Options
These are the available properties you can set in the first row of your CSV.
Column Headers | Description |
---|---|
phone_number | Required The phone number to be imported. Must be in the E.164 format |
external_id | Required The user ID for identifying the owner of the phone number. See Aliases & External ID for details. |
subscribed | Whether the phone number is opted-in to receive sms. Values can be yes or no . If column is not present, all phone numbers default to being opted-in (yes ). |
country | The ISO 3166-2 country code of the user. 2 characters, all caps. |
timezone_id | The timezone of the user in IANA TZ format. |
language | The language code of the user in ISO 639-1 format |
Example CSV Column Headers:
phone_number,external_id,subscribed,language,timezone_id,country
CSV Upload Steps
Navigate to Audience > Subscriptions > Update/Import Users.
Under "Import/Update phone_numbers" select Upload CSV. There is also an Example CSV template you can download to check your format.
After uploading check for any errors. You may need to fix the CSV then upload again if you have any errors.
Advanced Settings
If you want to create a segment to send messages to this list, toggle on the Automatically create a segment for this import to set a new tag and create a segment for these users.
Manually Add Phone Numbers
Navigate to Audience > Subscriptions > Arrow next to Update/Import Users > Manually Add Phone Numbers to open a new modal where you can add an individual user's phone number.
Done!
Once you've imported your phone numbers, go back to SMS Quickstart to determine if you have any steps left.
Updated 4 months ago