Register a device for push notifications
Stores the caller's Expo push token for an installation and activates it, first revoking any other active row holding the same installation id or token so a device can move between accounts. Naturally idempotent: re-registering the same installation refreshes the existing row rather than adding one. Requires a Clerk session with a synced profile, and the token must be a well-formed Expo push token.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
application/json- body
installationId*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$uuidtoken*string^(?:Expo|Exponent)PushToken\[[A-Za-z0-9_-]+\]$length <= 512platform*string"ios""android"appId*string1 <= length <= 200projectId*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$uuidSuccess
application/json- response
data*curl -X PUT 'https://api.snoze.dev/v1/me/push-devices' \ -H 'Content-Type: application/json' \ -d '{ "installationId": "7a1bf939-4d70-4439-9ced-a3dbbce12bd7", "token": "string", "platform": "ios", "appId": "string", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8"}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "installationId": "7a1bf939-4d70-4439-9ced-a3dbbce12bd7", "platform": "ios", "appId": "string", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "tokenFingerprint": "string", "registeredAt": "string" }}Read the caller's push registration for an installation
Returns the caller's active push registration for one app installation — platform, app and project ids, a fingerprint of the token, and when it was last registered — or null when none is active. The raw Expo token is never returned. Requires a Clerk session with a synced profile; API keys are rejected.
Revoke a device's push registration
Marks the caller's active registration for one installation revoked so it stops receiving push notifications, and reports whether a row was actually revoked. Naturally idempotent: a second call reports `revoked: false`. Requires a Clerk session with a synced profile.