Auth model
Most non-admin API endpoints use Clerk-backed bearer authentication.- Send
Authorization: Bearer <token>for protected routes. - Public routes explicitly set no auth requirement.
- Webhook routes can use separate auth schemes (for example shared secrets).
Native mobile session exchange
Native OAuth does not always arrive with a Clerk JWT. The API can issue a one-timeMobileSession hex token (128 hex chars). Native prefers the URL fragment (#token=) over the query string, stashes it in memory, then redeems it:
GET /api/mobile/start— begin mobile OAuth (provider,redirect_uri).GET /api/mobile/callback— redirect back with token or error.POST /api/mobile/exchange— redeem{ token }(orAuthorization: Bearer <token>) for a Clerk sign-in ticket. No Clerk session is required. The mobile session is consumed.- Native calls
signIn.create({ strategy: 'ticket', ticket })thensetActive({ session }). GET /api/mobile/verify— verify a Bearer token from the native app after the Clerk session exists.
POST /api/auth/native-token remains the older ticket mint path. Prefer /api/mobile/exchange for the fragment-token flow.
The hex token is not a Clerk JWT. Treat it as a one-time credential. A second exchange of the same token fails.
In OpenAPI
The primary scheme isbearerAuth in api-reference/openapi.json.
Optional-auth operations declare both bearerAuth and an empty alternative so you can call them with or without a token. Marketplace list and detail GETs use that shape.
Use the Endpoints section in API Reference to verify per-route security requirements.
