Skip to main content

Scope

This guide covers authentication and onboarding-related API routes for user-facing flows.

Endpoint map

  • Auth: /api/auth/native-token, /api/auth/validate, /api/logout
  • Mobile auth: /api/mobile/start, /api/mobile/callback, /api/mobile/exchange, /api/mobile/verify, /api/mobile/version, /api/mobile/wallet-callback
  • Invites: GET/POST /api/invites/me, GET /api/invites/{code}, POST /api/invites/{code}/redeem
  • Support: GET/POST /api/user/support/tickets, GET/POST /api/user/support/tickets/{id}/messages
  • User profile/onboarding: /api/user, /api/user/profile, /api/user/onboarding, /api/user/sync-clerk, /api/user/isOnboarded
  • Handle check: GET /api/user/check-username?username= (public; { available: boolean })
  • Settings: GET/PATCH /api/user/settingsprivateProfile mirrors User.isPrivate. Persist notifyTeams, notifyMilestones, and notifyCommunity as separate booleans.
Favorite teams on the user profile are capped at 5. d-sports and house-of-doge do not count toward that cap. GET /api/user includes claimedRewardsCount. POST /api/user/onboarding returns { completed, freePackId }. freePackId is the granted PackPurchase.id, or null if the grant degraded. See generated endpoint pages in the Endpoints section for full request/response schemas.

Mobile exchange contract

  • POST /api/mobile/exchange is public. Body { token } or Authorization: Bearer <token>.
  • Token must be a 128-character hex string (/^[0-9a-f]{128}$/i).
  • Success returns { ticket, expiresAt }. Native creates a Clerk session from the ticket.
  • Errors: 400 VALIDATION_ERROR, 401 UNAUTHORIZED, 500 INTERNAL_ERROR.

Deep-dive documentation