mobile_push notifications to every active token on the account.
Operation Type (for Signing)
Request Body
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | User’s wallet address | 42trU9A5… |
“signature” | string | required | Cryptographic signature | 5j1Vy9Uq… |
“timestamp” | integer | required | Current timestamp in milliseconds | 1716200000000 |
”expo_push_token” | string | required | Expo push token from the Expo SDK. It must have the form ExponentPushToken[…] or ExpoPushToken[…], and up to 512 characters | ExponentPushToken[xxxx] |
“platform” | string | required | ”ios” or “android” | ios |
”device_id” | string | required | Secret installation key that your app generates once and keeps. 16 to 256 characters | b7f3c1a9… |
“expiry_window” | integer | optional | Signature expiry in milliseconds | 30000 |
device_id identifies one installation of your app. Generate at least 128 random bits on the first install, and keep them in the device’s secure storage. Don’t use a hardware ID or a user ID. The length check doesn’t make a weak key safe.
- When you register again with the same
device_id, Pacifica refreshes the registration. If the token changed, Pacifica turns off the old token. - A token belongs to one installation. If a different
device_idalready holds the token, the request fails with status 409. This is also true after that installation unregisters the token. - If the same installation registers under another account, the token moves to that account. The previous account stops sending to it.
mobile_push with Set notification master preference and Set notification preference.
Response
- Status 200: Device registered
| Field | Type | Description |
|---|---|---|
”expo_push_token” | string | Registered Expo push token |
”platform” | string | ”ios” or “android" |
"device_id” | string | Installation key that holds the token |
”enabled” | boolean | true when Pacifica sends to this token |
- Status 400: Invalid request parameters or signature. A bad token returns
error_idinvalid_expo_push_token. A missing or baddevice_idreturnsinvalid_notification_device_id - Status 403: The account doesn’t exist. An account exists after its first deposit
- Status 409: Another installation holds this token
- Status 429: Rate limit exceeded
- Status 500: Internal server error