Import Phone Numbers

How to add Phone Numbers to use OneSignal SMS feature

Import User Options

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.
Import Phone Numbers via APIUse 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.
Import Phone Numbers via SDKCan 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

Steps:

Navigate to Audience > All Users > Update/Import Users

74757475

Select Upload CSV next to "Import Phone Numbers"

74757475

Import Phone Number csv must contain the following fields/columns:

  • phone_number (compulsory field) - must be in the E.164 format
  • external_user_id (compulsory field) - identifier that can be used to uniquely identify a user

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

Note: The first row should have the column labels exactly matching the above field names.

271271

Example CSV

932932

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. For example, "SMS_Subscriber_Test_List" in the above image.

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

📘

You cannot have multiple phone numbers associated with an external_user_id. If the external_user_id exists, then we will replace the old phone number with the new one.

You cannot have the same phone number associated with multiple external_user_id. Only the last provided external_user_id will be linked with the phone number.

Please reach out to OneSignal support if you prefer to have multiple phone numbers for a given external_user_id.

Update User Records

To add or update custom attributes for the Phone Number records, follow these detailed steps on how to update your subscribers.

Create Segment for SMS Subscribers

If you have already imported phone numbers and added data tags to those numbers then Create a New Segment using SMS subscribers before sending a message. You must

  • Add device type filter set to SMS to send to all phone numbers. OR
  • Use Data Tags linked specifically to phone number records