Die API-Referenz ist auf Englisch.
Fox Login Management API
Everything a tenant can do in the dashboard, it can do with this API: create and delete applications, find, export and erase users, set labels, read event logs and manage webhooks.
Erzeugt aus openapi.yaml · 51 EndpunkteOpenAPI herunterladen
Basis-URL
https://api.foxlogin.app/v1
Regions
Management requests (this API) go to one base URL,
https://api.foxlogin.app/v1, in Germany. End-user sign-in traffic
(sign-up, sign-in, codes, Google sign-in, token refresh, sign-out) goes
from the Fox Login SDKs and the user's browser directly to the user's
region host (eu.auth.foxlogin.app, tr.auth.foxlogin.app); tenants
never pick a host. Personal data is
stored in the region assigned to the user's country (EU or TR at launch;
all other countries are stored in EU). IDs carry the region as a hint:
usr_tr_8f2c91a7 lives in TR. Every user object includes region.
Each application is single-region at launch: all its users are stored
in the application's region.
Session tokens
End-user session tokens are JWTs signed with
EdDSA (Ed25519) by the user's region. Verify them locally with the keys
from GET /.well-known/jwks.json. Claims are described in the
SessionTokenClaims schema: sub (user ID), rgn (region), app,
labels, iat, exp (short lifetime, for example 10 minutes) and
iss.
Errors
Every 4xx and 5xx response uses one envelope (Error):
{ "error": { "code", "message", "region", "retryable", "details" } }.
When a region cannot answer, the response is 503 region_unavailable
with Retry-After.
Authentication
Send one of these keys as a Bearer token
(Authorization: Bearer …). Each endpoint lists the scope it needs in
x-scopes.
| Key | Format | Reaches | Scopes |
|---|---|---|---|
| Secret key | sk_live_eu_…, sk_live_tr_… |
its own application only | from the key's role |
| Organization API key | fk_live_… |
every application of the organization, and creating applications | the key's scopes |
Use a secret key when your server works with one application. Every
application gets one secret key with the admin role when it is
created, and you can create more and give each one a role:
| Role | Label | Scopes |
|---|---|---|
admin |
Full access | applications:read, applications:write, users:read, users:write, events:read |
editor |
Read and write users | applications:read, users:read, users:write, events:read |
viewer |
Read only | applications:read, users:read, events:read |
A secret key gets 404 not_found for every other application and
403 secret_key_not_allowed on POST /applications and the
/api_keys endpoints. Keep it on your server, for example in the
FOXLOGIN_SECRET_KEY environment variable. The publishable key
(pk_live_…) does not work here; it only identifies the application
to the End-user API.
Rate limits
100 requests/second per key. 429 responses include
Retry-After.
Store only the user ID
You do not need to copy email addresses,
names or phone numbers into your own database. Save the Fox Login user
ID (usr_tr_8f2c91a7) next to your own records. When you need people,
ask us with a filter, for example "name contains a and email contains
b", using POST /applications/{app_id}/users/search. When you need
to show data for IDs you already have, send those IDs in filter.ids
and ask only for the fields you will display. Personal data then stays
in its region and you have nothing to erase when a user asks to be
forgotten.
Endpunkte
Applications
- GET
/v1/applicationsList applications - POST
/v1/applicationsCreate an application - GET
/v1/applications/{app_id}Get an application - PATCH
/v1/applications/{app_id}Update an application - DELETE
/v1/applications/{app_id}Delete an application - GET
/v1/applications/{app_id}/providers/{provider}Get a social login provider - PUT
/v1/applications/{app_id}/providers/{provider}Configure a social login provider
Secret keys
Secret keys (sk_live_eu_…, sk_live_tr_…) let your server call this
API for one application. One key is enough. You can also create
several keys, for example one per server or job, and give each the
role it needs:
| Role | Label | Scopes |
|---|---|---|
admin |
Full access | applications:read, applications:write, users:read, users:write, events:read |
editor |
Read and write users | applications:read, users:read, users:write, events:read |
viewer |
Read only | applications:read, users:read, events:read |
applications:write on a secret key reaches only its own
application: its settings (PATCH /applications/{app_id}) and its
webhooks. No role has keys:write, so only
dashboard owners and admins, or an organization API key with
keys:write, create and revoke secret keys. The creator needs every
scope of the role it gives. The full key is shown once, when it is
created; only its SHA-256 hash is stored.
Users
Keep the user ID in your system, not the user's personal data.
| You want to | Call |
|---|---|
| Find people by name, email, phone, label, region, status or date | POST /users/search with a filter |
| Show names or emails for IDs you already store | POST /users/search with filter.ids and fields |
| Read one user | GET /users/{user_id}?fields=… |
| Export everything for a data access request | GET /users/{user_id}/export |
Search results contain only id and region unless you ask for more
with fields.
- GET
/v1/applications/{app_id}/usersList users - POST
/v1/applications/{app_id}/usersCreate a user - POST
/v1/applications/{app_id}/users/searchSearch users with a filter - POST
/v1/applications/{app_id}/invitationsInvite a user with labels - GET
/v1/applications/{app_id}/users/{user_id}Get a user - PATCH
/v1/applications/{app_id}/users/{user_id}Update a user - DELETE
/v1/applications/{app_id}/users/{user_id}Delete user data - GET
/v1/applications/{app_id}/users/{user_id}/exportExport all user data - POST
/v1/applications/{app_id}/users/{user_id}/email/verifyMark an email as verified - PUT
/v1/applications/{app_id}/users/{user_id}/labelsSet labels - POST
/v1/applications/{app_id}/users/{user_id}/lockLock or unlock a user - POST
/v1/applications/{app_id}/users/{user_id}/moveMove a user to another country
Labels
Logs & webhooks
Dashboard
Used by the Fox Login dashboard itself, not by tenant backends: who is signed in, their tenants, and organization API keys.
Authenticate with a dashboard session token (Authorization: Bearer,
an end-user session token of the dashboard's own Fox Login
application) instead of a tenant API key. GET /me and
POST /me/tenants need only that token. Every other Dashboard and
Management endpoint also needs X-Fox-Tenant: <tenant_id>; access
then follows the signed-in person's role in that tenant:
| Role | Scopes |
|---|---|
| owner, admin | applications:read, applications:write, users:read, users:write, events:read, keys:write |
| developer | applications:read, applications:write, users:read, users:write, events:read |
| (any other member) "viewer" | applications:read, users:read, events:read |
End-user API (SDK)
Called by the Fox Login SDKs and hosted pages directly from the
user's device or browser — never through api.foxlogin.app and
never with a tenant API key. Authenticate with the application's
publishable key (X-Fox-Publishable-Key); after sign-in, the MFA
and sign-out endpoints take the session's access or refresh token
instead.
Served by each region host (https://eu.auth.foxlogin.app,
https://tr.auth.foxlogin.app); the SDK calls the host of the
application's region. /internal/v1/* is a separate, gateway-only
API on the same hosts and is not part of this surface.
Responses never reveal whether an email address has an account:
sign_up and the two code-request endpoints always answer 202.
Google sign-in is a browser redirect flow, so its first step takes
the publishable key as a query parameter: send the browser to
GET /v1/oauth/google/start, and Fox Login brings it back to one of
the application's redirect_urls with a one-time fox_code, which
POST /v1/client/oauth/token exchanges for a session. The SDKs have
no Google method yet; call these endpoints directly.
- POST
/v1/client/sign_upSign up - POST
/v1/client/sign_up/verifyConfirm the sign-up code and sign in - POST
/v1/client/sign_inSign in with a password - POST
/v1/client/sign_in/email_codePasswordless sign-in, step 1: email a code - POST
/v1/client/sign_in/email_code/verifyPasswordless sign-in, step 2: verify the code - GET
/v1/oauth/google/startGoogle sign-in, step 1: send the browser to Google - POST
/v1/client/oauth/tokenGoogle sign-in, step 2: exchange the code for a session - POST
/v1/client/oauth/completeGoogle sign-in, step 2 for a new user: set the country - POST
/v1/client/sign_in/mfaSecond sign-in step: complete the TOTP or recovery-code challenge - POST
/v1/client/password_resetPassword reset, step 1: email a code - POST
/v1/client/password_reset/confirmPassword reset, step 2: set the new password and sign in - POST
/v1/client/tokenRefresh the session - POST
/v1/client/sign_outSign out - POST
/v1/client/mfa/totp/setupStart TOTP setup - POST
/v1/client/mfa/totp/enableEnable TOTP - POST
/v1/client/mfa/totp/disableDisable TOTP