# Migrate from OneSignal

Keep your REST payloads and SDK method names. Point them at PushGenius, import your player export, and keep sending. Stock OneSignal SDKs will not work here — their hosts are hardcoded — so you swap the package for the PushGenius SDK, which already points at `https://api.pushgeni.us`.

[Create a PushGenius app](https://app.pushgeni.us/signup)

## 1. Create the app and credentials

1. Sign up in the [dashboard](https://app.pushgeni.us) and create an app.
2. Add your APNs key and FCM service account under settings. You already own these; paste the same files.
3. Copy the REST API key. Server calls use `Authorization: Key …` against `https://api.pushgeni.us`.

## 2. Export your OneSignal audience

In OneSignal, export players (CSV or GZip). PushGenius import understands the usual columns: `id`, `identifier` (push token), `external_user_id`, `device_type`, `tags`, `onesignal_id`, language, timezone, and country.

Tokens, external IDs, and tags become users and subscriptions. You can optionally create a segment from the import.

## 3. Import into PushGenius

1. Open the app in the dashboard → Import.
2. Upload or paste the CSV (up to about 1 MB per upload — split larger exports into several files).
3. Optionally name a segment (for example "Imported audience").

Invalid tokens are skipped. You can import more than once; aliases and tokens merge where they match.

## 4. Switch the mobile SDK

Replace the OneSignal package with the PushGenius SDK for your platform and rename `OneSignal` to `BigBrain` at your call sites. The namespaces and method names otherwise stay the same.

```
BigBrain.initialize("YOUR_PUSHGENIUS_APP_ID");
BigBrain.login("user-123");
BigBrain.User.addTag("plan", "pro");
```

Use the new PushGenius app ID, not the OneSignal app ID. Ship this in an app update so new sessions register against PushGenius. Already-imported tokens can still receive until devices upgrade.

Packages: [iOS](https://github.com/PushGenius/ios-sdk), [Android](https://github.com/PushGenius/android-sdk), [React Native](https://github.com/PushGenius/react-native-sdk), [Flutter](https://github.com/PushGenius/flutter-sdk), [Ionic](https://github.com/PushGenius/ionic-sdk). See [SDK docs](https://pushgeni.us/docs/sdks.md).

## 5. Point your backend

Change the API base URL to `https://api.pushgeni.us` and the REST key to the PushGenius key. `POST /notifications` targeting is the same: `included_segments`, `filters`, `include_aliases`, `include_subscription_ids` / `include_player_ids`.

User lookups such as `/apps/:app_id/users/by/external_id/:id` and `/users/by/onesignal_id/:id` work after import if those IDs were in the CSV.

Full reference: [REST API](https://pushgeni.us/docs/api.md).

## 6. Cut over

1. Send a test to a known device from the dashboard.
2. Release the app with the PushGenius SDK.
3. Move production `POST /notifications` traffic to PushGenius.

## What migrates

- iOS and Android push tokens
- Web push subscribers, if you can bring the VAPID key pair they were created with (otherwise they re-subscribe silently on their next visit; see [Web push](https://pushgeni.us/docs/web.md))
- External IDs / login identity
- Tags and optional import segments
- REST notification targeting fields for basic push

## What does not

- Email, SMS, in-app, journeys, live activities, and A/B tests (not in v1)
- OneSignal dashboard history, templates, and IAM
- Unmodified OneSignal SDK binaries — you must swap the package

Source: https://pushgeni.us/docs/migrate
