Import Phone Numbers

How to add Phone Numbers to use OneSignal SMS feature

๐Ÿšง

Caution when combining with User Model APIs

If you are using the User Model APIs or SDKs (Mobile SDKs 5 or higher, Web SDK 16 or higher), then we advise testing this feature before importing all data. There may be cases where the External ID set with the SDK and the External ID set with the CSV do not produce matching OneSignal IDs.

If you are using User Model SDKs (Mobile SDKs 5 or higher, Web SDK 16 or higher), you should consider using the Create user or Update user API.

OneSignal provides the following ways to add phone number records into your account:

Import OptionDetails
Dashboard UploadBest if you have a CSV list of phone numbers and want to upload through the dashboard without code.
API Add a deviceUse the Add a device endpoint to set the device_type = 14 and the identifier as the phone number in E.164 format. Any other data you want to add is optional.
SMS SDK MethodsCan be used for long-term implementation on the client side.
Email & Phone Number Web PromptA web prompt that allows user to include their own phone number and email address.

Import Phone Numbers through Dashboard

Navigate to Audience > Users > Update/Import Users

1576

Select Upload CSV next to "Import phone_number(s)".

Import Phone Number CSV columns

PropertyDetails
phone_numberRequired: must be in the E.164 format
external_user_idRequired: identifier that can be used to uniquely identify a user. See External User Ids for more details.
subscribednot required: will mark if the phone number is subscribed or unsubscribed from marketing messages.

If you need help ensuring your CSV is in the correct format, download our template using CSV Template download button.

Note: The first row should have the column labels exactly matching the above Property names. The order does not matter.

271

Example CSV

You can automatically create a new segment for the imported list. This adds a tag to the newly imported list and auto-creates a segment based on the input value.

Once you Confirm and Import, you will get an email with the results from the CSV Import.

FAQ

What happens if I upload the same phone_number but different external_user_id?

Uploading a list with the same phone_number but different external_user_id will only update the external_user_id, not the phone number.

How do I add or update custom attributes to the Phone Number records?

This can be done with Data Tags, keep the current CSV and add additional columns for tags. See Importing User Attributes or Tags for more details.


Whatโ€™s Next