/api/v1/client-credentials Create a client credential
A focused map of every Streakline endpoint. Scan the surface here, download the source, or launch the full interactive explorer when you need schemas and examples.
Server/BFF calls use a project- and environment-bound OAuth M2M token. Mobile calls use a short-lived, user-bound client credential minted by your trusted backend.
Each OAuth M2M client is bound to one project and environment. Request only the scopes that integration needs; a token cannot act outside that binding.
Use a dedicated ingestion OAuth client, bound to the target project and environment, with only events:write. Keep its ID and secret on your server; use the response’s access_token as $INGESTION_OAUTH_ACCESS_TOKEN only for direct server ingestion.
curl -X POST https://api.streakline.dev/api/auth/oauth2/token \
-u "$INGESTION_CLIENT_ID:$INGESTION_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "resource=https://api.streakline.dev" \
--data "scope=events:write"Use a separate, bound BFF issuer OAuth client with only client_credentials:issue. Keep its credentials on the BFF, set $BFF_OAUTH_ACCESS_TOKEN to this response’s access_token, then use that token only to mint mobile credentials. Derive user_id from your authenticated session and entitlement checks—never trust a value supplied by the mobile app.
curl -X POST https://api.streakline.dev/api/auth/oauth2/token \
-u "$BFF_CLIENT_ID:$BFF_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "resource=https://api.streakline.dev" \
--data "scope=client_credentials:issue"curl -X POST https://api.streakline.dev/api/v1/client-credentials \
-H "Authorization: Bearer $BFF_OAUTH_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":"server-derived-user-id"}'Return the structured response to the signed-in client and use its access token for mobile model, event, and current-profile routes. Never embed an OAuth M2M client secret in a mobile or other public client.
curl https://api.streakline.dev/api/v1/sdk/model \
-H "Authorization: Bearer $CLIENT_CREDENTIAL"Short-lived mobile authorization
/api/v1/client-credentials Create a client credential
Model data consumed by client SDKs
/api/v1/sdk/model Get the SDK scoring model
Track what users do
/api/v1/events/batch Batch mobile events
/api/v1/events/batch/server Batch trusted server events
/api/v1/events Track a trusted server event
Read gamification state
/api/v1/me/profile Get the current mobile user's profile
/api/v1/users/{userId}/profile Get a user's profile server-side
/api/v1/users/{userId}/profile Import an existing user profile
/api/v1/users/{userId} Erase a user
/api/v1/users/{userId}/events List authoritative scored events
/api/v1/users/{userId}/achievements List unlocked achievements server-side
Purchase released economy items
/api/v1/store/purchases Purchase a released store item
Loading the explorer…
Fetching the full schema tools and request examples.