# Register devices in Pushwoosh and sync data with the platform

To effectively target and engage users through Pushwoosh, it's crucial to ensure that user devices are properly registered and your data is synchronized. There are several methods for registering devices and synchronizing data with Pushwoosh, depending on your specific needs.

## Pushwoosh SDK 

### Mobile 

For mobile apps, Pushwoosh SDK integration is the recommended method for seamless device registration and data synchronization between the app, Pushwoosh systems, and, optionally, third-party systems that customers may use for specific data pipelines or workflows.

By integrating the SDK, you can automate the process of registering devices and handling their push tokens. The SDK internally calls the registerDevice API method, ensuring that every device is registered and synchronized with Pushwoosh without requiring any manual intervention.

Additionally, the Pushwoosh SDK allows registering phone numbers for SMS and WhatsApp notifications. You can use the following methods:

#### Register an SMS number

#####  iOS 

```
- (void)registerSmsNumber:(NSString * _Nonnull)number;
```

**Example**

```
Pushwoosh.sharedInstance().registerSmsNumber(@"+0000000000");
```

Replace `+0000000000` with the actual phone number in **E.164 format** (including the “+” sign and country code).

#####  Android 

```
Pushwoosh.getInstance().registerSmsNumber(String number);
```

**Example**

```
Pushwoosh.getInstance().registerSmsNumber("+0000000000");
```

Replace `+0000000000` with the user’s actual phone number in E.164 format, including the “+” and country code.

####  Register a WhatsApp number

#####  iOS

```
- (void)registerWhatsappNumber:(NSString * _Nonnull)number;
```

**Example**

```
Pushwoosh.sharedInstance().registerWhatsappNumber(@"+0000000000");
```

Replace `+0000000000` with the actual phone number in **E.164 format** (including the “+” sign and country code).

#####  Android

To register a user’s phone number for WhatsApp on Android, use the following method:

```
Pushwoosh.getInstance().registerWhatsappNumber(String number);
```

**Example**

```
Pushwoosh.getInstance().registerWhatsappNumber("+0000000000");
```

Replace `+0000000000` with the user’s actual phone number in E.164 format, including the “+” and country code.


### Web 

To register devices for web pushes, use the [Web Push SDK](/developer/pushwoosh-sdk/web-push-notifications/web-push-sdk-30/).

<Aside type="tip">
To allow your website visitors to opt-in for push notifications, set up either a custom or default [Subscription Prompt](/developer/guides/messaging-channels/subscription-prompt/) on your site. This prompt triggers the browser’s native subscription request, where users can choose to enable or block web push notifications for your site. 
</Aside>
<video src="/start-with-your-project-subscribe-users-1.webm" title="Web push subscription prompt example showing browser notification permission request" autoplay loop muted playsinline />

[Learn more about Pushwoosh SDK](/developer/pushwoosh-sdk/pushwoosh-sdk-overview)

## Pushwoosh API

Also, you can use the **Pushwoosh API** to register devices and synchronize data. The API provides full flexibility for more advanced scenarios. 

### Mobile

To register mobile devices, use the [`registerDevice`](/developer/api-reference/device-api/#registerdevice) API method.

### Email

Pushwoosh provides built-in subscription forms that you can embed on your website to collect email signups. Learn how to [create and embed a form](/product/audience-data-and-segmentation/subscription-forms/create-subscription-forms/#how-to-build-a-form) and [customize the widget](/product/audience-data-and-segmentation/subscription-forms/customize-widget/#customize-colors). 

After collecting emails, use the [`registerEmail`](/developer/api-reference/email-api#registeremail) API method to register email devices. Alternatively, you can use [`registerDevice`](/developer/api-reference/device-api#registerdevice).

<Aside type="note">
Please note that the [`registerEmailUser`](/developer/api-reference/email-api#registeremailuser) request does not register an email address in your user base; it should be used only to assign User IDs to emails already registered by the registerEmail call.
</Aside>

To associate your app users or site visitors with their email addresses, use the [User IDs](/developer/pushwoosh-knowledge-hub/users-userids/users-userids). That allows you to build cross-channel Customer Journeys and send emails based on user's actions in your app or on the website. The User ID will also allow you to view the user's message and event history in User Explorer.

**1**. **Get the User ID.**

Each device registered for your Pushwoosh project has its User ID; by default, it's equal to the device hardware ID (HWID) and is retrieved by the [`registerDevice`](/developer/api-reference/device-api#registerdevice) API request.

To set a custom User ID, call the [`registerUser`](/developer/api-reference/user-centric-api#registeruser) method.

**2. Assign the User ID to an email address.**

Use the [`registerEmail`](/developer/api-reference/email-api#registeremail) or [`registerEmailUser`](/developer/api-reference/email-api#registeremailuser) API method to associate the User ID with an email address.

[Learn more about User IDs](/developer/pushwoosh-knowledge-hub/users-userids/users-userids)

### SMS

To register SMS devices in Pushwoosh, you can use either the [`registerDevice`](/developer/api-reference/device-api#registerdevice) API method or the [`createSMSMessage`](/developer/api-reference/sms#createsmsmessage) API method. When using the latter, make sure to set the `use_auto_registration` parameter to `true` in order to automatically register the phone number as an SMS device. [Learn more](/developer/api-reference/sms#createsmsmessage)

### WhatsApp 

To register WhatsApp devices in Pushwoosh, you can use either the [`registerDevice`](/developer/api-reference/device-api#registerdevice) API method or the [`createWhatsAppMessage`](/developer/api-reference/whatsapp) API method. When using the latter, make sure to set the `use_auto_registration` parameter to `true` in order to automatically register the phone number as a WhatsApp device.

## Importing your existing user base

If you're working with large sets of pre-existing data, you can import this data into Pushwoosh.

### Mobile 

To migrate your Mobile push subscribers base, please contact us via the [Contact Us form](https://help.pushwoosh.com/hc/en-us/requests/new) and provide a sample of your user base. Our team will review the data format and assess whether the migration is feasible.

### Web 

Web users cannot be imported due to technical limitations. Different push providers use varying payload formats and platform configurations, making importing web users ineffective. As a result, the imported user base would either be invalidated or receive incorrect or blank content.

However, web users who have already given permission to receive push notifications for your website can be resubscribed. [Learn more](https://help.pushwoosh.com/hc/en-us/articles/360018326111-Migrate-your-userbase-to-Pushwoosh/?utm_content=docs&utm_term=post&utm_campaign=migrate-your-userbase-to-pushwoosh)

### Email

To [import your email subscriber database](/product/messaging-channels/emails/get-email-subscribers/#import-email-list), upload a **.csv** file with the email addresses. The emails imported will be registered as subscribers on the email platform. You can also submit additional data for each email address, such as the recipient’s name, gender, or location, to better segment and personalize your email communications.

[Import emails](https://app.pushwoosh.com/applications/AEE06-2F522/import-csv/import-emails)

### SMS

Import a **.csv** file with phone numbers for SMS subscribers. You can provide additional data, such as the recipient’s name, gender, or location, to further segment and personalize your SMS communications.

[Import SMS contacts](https://app.pushwoosh.com/applications/AEE06-2F522/import-csv/import-sms)

### WhatsApp

To import your WhatsApp contacts, upload a .csv file with WhatsApp contacts. You can also provide extra details, such as the recipient's name, gender, or location, to customize your WhatsApp messages.

[Import WhatsApp contacts](https://app.pushwoosh.com/applications/AEE06-2F522/import-csv/import-whatsapp)

### Viber

To import your Viber contacts, upload a .csv file with Viber contacts. You can also provide extra details, such as the recipient's name, gender, or location, to customize your Viber messages.

[Import Viber contacts](https://app.pushwoosh.com/applications/AEE06-2F522/import-csv/import-viber)

## Using 3rd-party integrations to transfer data

In addition to the SDK and API, Pushwoosh offers several third-party integrations to help you synchronize and transfer data from other platforms, making it easier to manage users and data across multiple systems. 

[Explore all available integrations](/product/integrations/)