> ## Documentation Index
> Fetch the complete documentation index at: https://docs.buzzkit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> BuzzKit is an open source notification orchestration layer. Send mobile push from a backend with one POST to /v1/messages, targeting a subscriber id, a topic, a saved segment or an inline expression. Subscribers are addressed by the caller's own user ids. Authenticate with a bearer API key from the dashboard; workspace keys pick a tenant with the BuzzKit-Tenant header. Every response is the envelope { success, data, error, metadata } and errors carry a stable snake_case code. iOS is the supported client SDK. The machine-readable API description is at https://buzzkit.dev/openapi.json.

# Firebase or your own backend

> When you sent push yourself, the tokens live in your database. Export them from there. Expo push tokens are the one kind that cannot move.

If you sent notifications straight through Firebase Cloud Messaging or APNs, there is no provider export. Firebase does not hold a list of your registration tokens; the [token management guidance](https://firebase.google.com/docs/cloud-messaging/manage-tokens) is that your server stores every token when the app registers it. Your database is the export.

## Export from your database

Write a query that yields one row per device:

```sql theme={null}
select
  user_id as external_id,
  fcm_token as token,
  platform,
  last_seen_at,
  app_version
from devices
where fcm_token is not null and disabled_at is null
```

Save it as CSV. Keep the Apple and Android rows in one file with the platform column, or write one file per platform.

## Map it in BuzzKit

| Pick                             | Column                                                |
| -------------------------------- | ----------------------------------------------------- |
| External id                      | `external_id`                                         |
| Token or address                 | `token`                                               |
| Column contents                  | Apple or Android device tokens, one file per platform |
| Keep other columns as attributes | On, if the query added columns you want as attributes |

Connect the same Firebase project and the same APNs key as credentials first. A token is only valid for the project or the app it was issued for.

## Expo push tokens

Tokens that look like `ExponentPushToken[...]` are Expo's own, issued by the Expo push service. They are not APNs or FCM tokens and cannot be imported. Switch the app to native device tokens with `getDevicePushTokenAsync`, register those with BuzzKit, and the audience rebuilds as users open the app. Expo's [guide on using other push services](https://docs.expo.dev/guides/using-push-notifications-services/) covers the switch.
