Users & Profile
Register a device's Expo push token
POST
Access: Bearer token required.
Registers the device's Expo push token for the signed-in user so push notifications reach it. It is an upsert, so the app can call it on every launch: an existing entry for the same token is refreshed rather than duplicated. A token belongs to one account at a time, so registering it first removes it from any other account that had it (for example the previous user of the phone). Only the 10 most recently registered devices are kept per account.
bearerAuthheader
AuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
application/json- body
token*stringExpo push token, in the form ExponentPushToken[...] or ExpoPushToken[...].
Match
^Expo(nent)?PushToken\[.+\]$platform*stringDevice platform: ios or android.
Value in
"ios""android"deviceName?stringOptional human-readable device name, up to 100 characters.
Length
length <= 100Token registered or refreshed
application/json- response
status*integersuccess*booleanmessage*stringdata*unknowncurl -X POST 'http://localhost:4000/api/v1/user/push-tokens' \ -H 'Content-Type: application/json' \ -d '{ "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]", "platform": "ios", "deviceName": "Adaeze'\''s iPhone 15"}'Example Response
{ "status": 200, "success": true, "message": "Push token registered.", "data": null}