Auth
Start an OAuth sign-in: where to send the browser, and the state to keep.
A GET that writes, which is the one thing to know about it. It records the authorization it is about to start (the state's hash, the PKCE verifier the exchange will need, and the digest of a flow secret it sets as an HttpOnly cookie) so the callback has something to check against, and that record is the whole reason the callback can refuse a code this deployment never asked for, or one presented from a browser other than the one that asked.
Still safe to repeat: each call mints its own state, and only the one the browser kept is the one it sends back. The rows the others leave expire on their own and are swept by the next call. The cookie is reused when the browser already holds one, so a second tab does not break the first.
Which OAuth provider to sign in with.
^(github|google)$Successful Response
Where to send the browser, and the state to check when it comes back.
The provider consent screen to navigate to.
An opaque CSRF value to keep for the length of the redirect, compare against the 'state' the provider returns, and send back with the authorization code. A callback whose state does not match the one held by the browser that started the flow should be abandoned by the client rather than sent here; one that does is checked again against this deployment's own record of it. The response also sets an HttpOnly cookie that the callback requires, so the exchange can only be completed from the browser this call was made from.
Validation Error
GET /api/v1/auth/oauth/{provider}/authorize HTTP/1.1
Accept: */*
{
"authorization_url": "text",
"state": "text"
}Exchange an authorization code and set the HttpOnly session cookie.
The session is bound to the identity the provider's account resolves to, exactly as a password sign-in binds one to the identity that authenticated, so every request it later authenticates resolves the same caller.
A refusal is counted like the other sign-in failures (record_auth_failure) and rendered by the tenancy error handler. Like the passkey route there is no separate post-failure throttle: this route is throttled unconditionally on the way in, because there is no legitimate caller here whose correct credential must never be blocked. An authorization code is single-use and minted by a redirect, not something a person retries by hand.
Maintenance mode freezes this the way it freezes the other two sign-ins. The freeze is on starting a session, not on a credential, so an OAuth sign-in has to answer to it or the switch is bypassable by anybody holding a Google account. Refused before the exchange, so a frozen deployment makes no outbound call, spends nobody's authorization code, and counts no auth failure: nobody failed to authenticate, the gateway declined to try.
A sign-in that created the account, or is the first way in to one, is reported to GrowthSignalPort as a signup once it has committed. Where the deployment publishes terms, that sign-in is refused with terms_not_accepted unless the body carries terms_accepted, and nothing it would have created is kept.
Which OAuth provider to sign in with.
^(github|google)$The authorization code a provider handed the browser.
No redirect_uri: this deployment derives its own from public_base_url
so the URI used to build the authorization request and the one sent with the
exchange are the same string by construction, and a browser cannot choose
what this server sends to a provider.
state is required, and is what binds this callback to an authorization
request this deployment actually made: it is claimed from
oauth_pending_state before the code is sent anywhere, and the row it
claims is what carries the PKCE verifier the exchange needs. The flow
cookie /authorize set travels alongside and binds it to the browser.
The authorization code from the provider's redirect.
The 'state' from the provider's redirect, as issued by /authorize.
Whether the person accepted this deployment's terms before going to the provider. Required where the bootstrap reports a terms_url and the sign-in creates the account, or is the first way in to one nobody has claimed yet; ignored otherwise.
falseSuccessful Response
A dashboard session minted by an OAuth sign-in (the token travels only in the cookie).
The same three fields POST /api/v1/auth/session answers, deliberately: the
dashboard's sign-in path does not care which credential got it here.
The organization that identity is acting in, which scopes every tenancy surface. Null when it is an active member of none, as an invitee who has not accepted yet is not.
When the session cookie stops being accepted.
Whether this sign-in removed a password the account held: the first provider sign-in on an address nobody had proven removes the password set before then. The person can set a new one from Account settings.
falseThe identity this session speaks for.
Validation Error
POST /api/v1/auth/oauth/{provider}/callback HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"code": "text",
"state": "text",
"terms_accepted": false
}{
"active_organization_id": "123e4567-e89b-12d3-a456-426614174000",
"expires_at": "2026-01-01T00:00:00.000Z",
"password_removed": false,
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}Set or change the password the caller signs in to the dashboard with.
Always the caller's own identity. Supply email when it has no sign-in address yet, which is the state first boot leaves the operator in, and current_password when it already has a password and the request is authenticated by the session cookie. The master key in a header is what excuses current_password, which is how a forgotten password is recovered; it does not excuse email, because an identity with no address has nothing to sign in with whoever is asking. The operator setting a password for the first time retires master-key sign-in on this deployment.
With the master key the caller is the deployment's operator, so an email sent then is the operator's own sign-in address: on an unclaimed deployment it claims the deployment with that address. This never sets another account's password; an address another account holds is refused with 409. To help a member who forgot their password, send them a link with POST /api/v1/admin/users/{user_id}/password-link.
Every other session this identity holds ends, the caller's own excepted, so a cookie stolen before the change does not outlive it.
Enter your API key here (sent as Otari-Key header).
Set or change the signed-in identity's password.
The example is the first-boot claim, because that is the call an operator
makes first and the one whose required fields are not obvious from the
schema: email is optional here in general and required when the
identity has no address yet. Without it the generated Postman body carries
only new_password, which is the one shape that cannot complete the flow
the docs walk through.
The password being replaced. Required when the identity already has one and the request is authenticated by the session cookie; ignored when the master key is sent in a header, which needs no proof of the old password (it still needs email when the identity has no sign-in address yet).
The address to sign in with. Required when the identity has none, which is the state first boot leaves the operator in, including when the master key is what authenticates the call. Resubmitting the address the identity already holds is accepted and ignored; only a different address is refused, because changing one is not supported yet. It is always the caller's own address, the operator's when the master key authenticates the call, and never names another account.
The password to sign in with from now on. At least 8 characters, and at most 72 bytes, which is bcrypt's ceiling.
Successful Response
What the identity signs in with now.
The address this identity signs in with.
Whether POST /api/v1/auth/session has stopped accepting the master key as a dashboard login. True once the operator identity has a password, which is what claiming the deployment means; a member setting their own password leaves an unclaimed deployment on the master key. Either way the master key stays the credential for the management API.
Validation Error
PUT /api/v1/auth/password HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"email": "operator@example.com",
"new_password": "a-real-password"
}{
"email": "text",
"master_key_sign_in_retired": true
}Mail a password-reset link, or do nothing: the response never says which.
The address to send a reset link to.
Successful Response
The same message whether or not a link was sent.
Validation Error
POST /api/v1/auth/password/reset HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"email": "text"
}{
"message": "text"
}Complete a password reset, or choose a first password. Single-use: the token stops working after this.
Not throttled with the address-bearing routes, for the reason the verification route gives: the token is the proof.
The password to sign in with from now on. At least 8 characters, at most 72 bytes.
Whether the caller accepted this deployment's terms. Required where the bootstrap reports a terms_url and the account has not accepted them yet.
falseThe token from the reset link.
Successful Response
No content
Validation Error
POST /api/v1/auth/password/reset/confirm HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"new_password": "text",
"terms_accepted": false,
"token": "text"
}No content
Say whether a password reset link can still be used, without using it.
Enter your API key here (sent as Otari-Key header).
A token from a verification or password reset link.
The token from the link.
Successful Response
Whether the link can still be used. Checking it does not use it.
valid, expired, or invalid. invalid covers a link that was never issued, one already used, and one whose account was deactivated.
Validation Error
POST /api/v1/auth/password/reset/validate HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"token": "text"
}{
"status": "valid"
}Report who the caller is, whether or not they belong to an organization.
The same shape GET /api/v1/organizations/me carries as caller, for an identity that context cannot describe because it has no active membership.
Enter your API key here (sent as Otari-Key header).
Successful Response
Who the caller is, as against what they may do.
The account control at the foot of the dashboard's sidebar draws a person, and no authenticated route reported the caller's own name or address, so it drew a role for everybody who could reach it: "Operator", which is not a name and on a multi-tenant deployment was not even true (mozilla-ai/otari#832).
Carried on the membership context for the reason deployment_operator is:
the shell reads that context before it paints, so an identity taken from it
needs no request of its own and cannot arrive a beat after the chrome it
names. Publishing it costs nothing either, since it is the caller's own
identity and they are holding the credential that resolved to it.
email and full_name are nullable for opposite reasons. A local
operator identity has no address, because first boot provisions it with a
name and nothing to sign in with but the master key; a member added by
address has no name until they claim the identity and supply one. So a shell
has to be ready to draw either one alone.
Whether setting this identity's password claims the deployment, which stops the master key signing in to the dashboard. True for the deployment's operator until it holds a password, whether or not it already has an address; false for everybody else.
Whether this identity holds a dashboard password. False for one that signs in only through an OAuth provider or a passkey, and for a roster entry nobody has claimed yet. PUT /api/v1/auth/password requires current_password from a cookie-authenticated caller exactly while this is true.
GET /api/v1/auth/profile HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
Successful Response
{
"claims_deployment": true,
"email": "text",
"full_name": "text",
"has_password": true,
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}Change the name the caller is known by on this deployment.
Always the caller's own identity. The same shape GET /api/v1/organizations/me carries as caller comes back, so a client can seat the answer where it read the old value rather than refetch the whole membership context.
Enter your API key here (sent as Otari-Key header).
The caller's own display name, or null to go back to having none.
The name to be known by on this deployment, or null to have none. Whitespace is collapsed, and a value with nothing else in it is stored as null, which leaves every surface naming this identity by its address again.
Successful Response
Who the caller is, as against what they may do.
The account control at the foot of the dashboard's sidebar draws a person, and no authenticated route reported the caller's own name or address, so it drew a role for everybody who could reach it: "Operator", which is not a name and on a multi-tenant deployment was not even true (mozilla-ai/otari#832).
Carried on the membership context for the reason deployment_operator is:
the shell reads that context before it paints, so an identity taken from it
needs no request of its own and cannot arrive a beat after the chrome it
names. Publishing it costs nothing either, since it is the caller's own
identity and they are holding the credential that resolved to it.
email and full_name are nullable for opposite reasons. A local
operator identity has no address, because first boot provisions it with a
name and nothing to sign in with but the master key; a member added by
address has no name until they claim the identity and supply one. So a shell
has to be ready to draw either one alone.
Whether setting this identity's password claims the deployment, which stops the master key signing in to the dashboard. True for the deployment's operator until it holds a password, whether or not it already has an address; false for everybody else.
Whether this identity holds a dashboard password. False for one that signs in only through an OAuth provider or a passkey, and for a roster entry nobody has claimed yet. PUT /api/v1/auth/password requires current_password from a cookie-authenticated caller exactly while this is true.
Validation Error
PATCH /api/v1/auth/profile HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"full_name": "Ada Lovelace"
}{
"claims_deployment": true,
"email": "text",
"full_name": "text",
"has_password": true,
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}Mail a fresh verification link, or do nothing: the response never says which.
The address to resend a verification link to.
Successful Response
The same message whether or not the address has anything to verify.
Validation Error
POST /api/v1/auth/resend-verification HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"email": "text"
}{
"message": "text"
}Verify a sign-in credential and set the HttpOnly session cookie.
The session is bound to the identity that authenticated, so every request it later authenticates resolves a user and that user's active organization rather than only "a credential was presented once". The response names both, so a client knows who it is signed in as without a second call.
The rate-limit check deliberately runs only after a failed verification, not before it: a pre-verification gate can't know whether this attempt would have succeeded, so once an IP has used up its failure quota it would end up blocking that IP's legitimate owner too, not just further attackers. Running after verification also means the throttle bounds how many verdicts an IP gets, not how much work it can cause: a password attempt pays for a bcrypt verification (cost 12, on the order of 200ms of CPU, and one is burned against a stand-in hash even for an address nobody holds) before the limit is consulted, so a 429 costs the same as a 401. A gateway exposed to the internet should rate-limit this path at the proxy as well.
The maintenance-mode check runs before either credential is verified, and refuses both. Before, because a frozen deployment should not spend a bcrypt verification per attempt and the refusal is not about the credential anyway; both, because the way back out is the master key against PATCH /api/v1/settings/maintenance-mode through the header, which never passes through this door. That is what keeps the way back out off the frozen path, and it is why no identity needs an exemption here; an operator who no longer holds the master key recovers by setting OTARI_MASTER_KEY and restarting, which is a restart rather than a click. It leaks nothing either: GET /api/v1/bootstrap already publishes the same flag unauthenticated, so the sign-in screen can render the right page.
Sign in to the dashboard with exactly one credential.
A flat body with an optional field per credential, rather than a tagged union: it is one extra key on the wire, it generates a client type a hand-written form can fill in, and the validator below makes the two forms exclusive anyway.
The example carries one credential, because a generated example is a body somebody will post: the schema alone would produce every field at once, which is the one shape the validator below refuses.
The identity's sign-in address.
The gateway master key; verified once and never stored by the browser. Accepted only while the operator identity has no password, which is to say while nobody has claimed this deployment (see GET /api/v1/bootstrap).
The identity's password.
Successful Response
A freshly minted dashboard session (the token travels only in the cookie).
The organization that identity is acting in, which scopes every tenancy surface. Null when it is an active member of none, as an invitee who has not accepted yet is not.
When the session cookie stops being accepted.
The identity this session speaks for.
Validation Error
POST /api/v1/auth/session HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"email": "operator@example.com",
"password": "a-real-password"
}{
"active_organization_id": "123e4567-e89b-12d3-a456-426614174000",
"expires_at": "2026-01-01T00:00:00.000Z",
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}Sign out: revoke the cookie's session server-side and expire the cookie.
Deliberately unauthenticated and idempotent: it only ever revokes the session named by the caller's own cookie, and the dashboard calls it on the 401-bounce path where no valid credential exists anymore. Unlike the read path in deps.py it applies no Sec-Fetch-Site check: SameSite=Strict already keeps cross-site requests from carrying the cookie, and the worst a forged call could do is sign the operator out.
Successful Response
No content
DELETE /api/v1/auth/session HTTP/1.1
Accept: */*
Successful Response
No content
Claim a roster identity, register a new one, or do nothing: the response never says which.
Which of the three this deployment will do is open_signup, published in the bootstrap so the page can say so before anyone types an address.
No session is minted. A newly claimed or registered identity is hard-blocked from signing in until it verifies, so there is nothing yet to sign it into.
Refused with a 400 where the deployment publishes terms and terms_accepted is not set, whatever the address.
Set a password for an address, claiming or registering it.
The address to sign in with. An address an admin added or invited where this deployment keeps signup closed; any address where the bootstrap reports open_signup.
Filled in only if not already set.
The password to sign in with once verified. At least 8 characters, at most 72 bytes.
Whether the caller accepted this deployment's terms. Required where the bootstrap reports a terms_url.
falseSuccessful Response
The same message whether or not the address had anything to claim.
What the caller should do next.
Validation Error
POST /api/v1/auth/signup HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"email": "text",
"full_name": "text",
"password": "text",
"terms_accepted": false
}{
"message": "text"
}Confirm an address from its verification link and the password chosen at signup, lifting the sign-in gate.
One refusal for a link that is unknown, expired or spent and for a password that does not match, and a refusal consumes nothing. Refusals are counted per client IP and answer 429 once over the limit, so a held link cannot be used to guess its password; a verification that succeeds is never counted.
The password chosen at signup. The link verifies the address only together with it, so a link that reaches someone who did not sign up verifies nothing.
The token from the verification link.
Successful Response
The address that is now verified.
Validation Error
POST /api/v1/auth/verify-email HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"password": "text",
"token": "text"
}{
"email": "text"
}Say whether an email verification link can still be used, without using it.
Verifying still needs the password chosen at signup, which this does not check.
Enter your API key here (sent as Otari-Key header).
A token from a verification or password reset link.
The token from the link.
Successful Response
Whether the link can still be used. Checking it does not use it.
valid, expired, or invalid. invalid covers a link that was never issued, one already used, and one whose account was deactivated.
Validation Error
POST /api/v1/auth/verify-email/validate HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"token": "text"
}{
"status": "valid"
}Verify an assertion and set the HttpOnly session cookie.
The session is bound to the identity whose passkey signed, exactly as a password sign-in binds one to the identity that authenticated, so every request it later authenticates resolves the same caller.
A refusal is counted like the other sign-in failures (record_auth_failure) and answered as a 401 by the tenancy error handler. Unlike the password path there is no separate post-failure throttle: this route is throttled unconditionally on the way in, because unlike a password there is no legitimate caller here whose correct credential must never be blocked (a passkey ceremony is one round trip a browser drives, not something a person retries by hand).
Maintenance mode freezes this the way it freezes the password sign-in. The freeze is on starting a session, not on a credential, so a passkey has to answer to it or the switch is bypassable by anybody holding one, which is the whole population it exists to hold off during a redeploy. Refused before the assertion is verified, so a frozen deployment does no crypto and counts no auth failure: nobody failed to authenticate, the gateway declined to try.
A completed sign-in ceremony.
Successful Response
A dashboard session minted by a passkey (the token travels only in the cookie).
The same three fields POST /api/v1/auth/session answers, deliberately: the
dashboard's sign-in path does not care which credential got it here.
The organization that identity is acting in, which scopes every tenancy surface. Null when it is an active member of none, as an invitee who has not accepted yet is not.
When the session cookie stops being accepted.
The identity this session speaks for.
Validation Error
POST /api/v1/auth/webauthn/authenticate HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"credential": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}{
"active_organization_id": "123e4567-e89b-12d3-a456-426614174000",
"expires_at": "2026-01-01T00:00:00.000Z",
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}Start a passkey sign-in. Public, throttled, and names no credentials.
The options carry no allowCredentials, so this publishes nothing about who holds a passkey here; see webauthn_service.begin_authentication.
Successful Response
The PublicKeyCredentialCreationOptions/RequestOptions a browser needs.
Passed through as an opaque object rather than modeled field by field. The
shape is the W3C's, the browser is the only consumer, and it is what
navigator.credentials is handed verbatim after the two base64url fields
are decoded. Restating it here would produce a second, slightly wrong copy
of a spec this deployment does not own, and every field the library adds
later would have to be added again to keep the client from dropping it.
POST /api/v1/auth/webauthn/authenticate/options HTTP/1.1
Accept: */*
Successful Response
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}The caller's own passkeys. Never anybody else's, and never key material.
Deliberately not behind require_passkey_support, and not filtered to the current relying-party ID. A deployment that has changed or lost that ID still holds the rows registered under the old one, and refusing to list them would leave somebody looking at an empty page with no way to clean up and no hint as to why. Each row carries is_usable instead, so an orphan is visible, explained, and deletable.
Enter your API key here (sent as Otari-Key header).
Successful Response
GET /api/v1/auth/webauthn/credentials HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
Successful Response
{
"count": 1,
"data": [
{
"backed_up": true,
"created_at": "2026-01-01T00:00:00.000Z",
"credential_id": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_usable": true,
"last_used_at": "2026-01-01T00:00:00.000Z",
"name": "text",
"rp_id": "text",
"transports": [
"text"
]
}
]
}Relabel one of the caller's passkeys, which is all that is editable.
Ungated like the list, and for the same reason: naming an orphan before deleting it is not something a lost relying-party ID should prevent.
Enter your API key here (sent as Otari-Key header).
Renaming a passkey, which is the only thing about one that is editable.
Everything else on the row is what the authenticator asserted, so there is nothing else a person could correct.
Successful Response
A passkey as the settings page lists it.
Carries no key material. credential_id is here because the browser needs
it to tell the passkey it just used from the others in the list, and it is
a public identifier the authenticator hands to any site that asks: it is
what allowCredentials publishes to an unauthenticated caller during a
ceremony.
Validation Error
PATCH /api/v1/auth/webauthn/credentials/{credential_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"backed_up": true,
"created_at": "2026-01-01T00:00:00.000Z",
"credential_id": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_usable": true,
"last_used_at": "2026-01-01T00:00:00.000Z",
"name": "text",
"rp_id": "text",
"transports": [
"text"
]
}Remove one of the caller's passkeys.
Removing the last one is allowed: an email and password is still this deployment's login, so this is not a lockout, and refusing would strand whoever lost the authenticator.
Enter your API key here (sent as Otari-Key header).
Successful Response
No content
Validation Error
DELETE /api/v1/auth/webauthn/credentials/{credential_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
No content
Verify a registration ceremony and store the passkey it produced.
Enter your API key here (sent as Otari-Key header).
A completed registration ceremony, with the label to file it under.
What to call this passkey in the credential list. Optional: an unnamed one is numbered rather than refused, so a browser that offers no prompt still works.
Successful Response
A passkey as the settings page lists it.
Carries no key material. credential_id is here because the browser needs
it to tell the passkey it just used from the others in the list, and it is
a public identifier the authenticator hands to any site that asks: it is
what allowCredentials publishes to an unauthenticated caller during a
ceremony.
Validation Error
POST /api/v1/auth/webauthn/register HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"credential": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"name": "text"
}{
"backed_up": true,
"created_at": "2026-01-01T00:00:00.000Z",
"credential_id": "text",
"id": "123e4567-e89b-12d3-a456-426614174000",
"is_usable": true,
"last_used_at": "2026-01-01T00:00:00.000Z",
"name": "text",
"rp_id": "text",
"transports": [
"text"
]
}Start registering a passkey for the signed-in identity.
A POST rather than a GET even though it reads like one: it issues a server-side challenge and writes it, so it is not safe to repeat, cache, or prefetch.
Enter your API key here (sent as Otari-Key header).
Successful Response
The PublicKeyCredentialCreationOptions/RequestOptions a browser needs.
Passed through as an opaque object rather than modeled field by field. The
shape is the W3C's, the browser is the only consumer, and it is what
navigator.credentials is handed verbatim after the two base64url fields
are decoded. Restating it here would produce a second, slightly wrong copy
of a spec this deployment does not own, and every field the library adds
later would have to be added again to keep the client from dropping it.
POST /api/v1/auth/webauthn/register/options HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
Successful Response
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Last updated
Was this helpful?
