API reference
These are the calls your backend makes. You create clients and their keys yourself in the Portal; that isn't part of this API. See Get your credentials.
Conventions
- Base URL:
https://<authgate-host>, which you get with your credentials. - Auth: send
x-internal-access-key: <accessKey>on every call except the public key set. Without a valid key, the answer is401 {"error":"unauthorized"}. - Bodies: JSON, at most 1 MiB. Unknown fields are ignored.
- Ids:
subjectId,purposeand ids in paths are 1 to 256 bytes with no#. Anything else gets400 invalid_id. AsubjectIdused with passkeys must be at most 64 bytes, or registration also answers400 invalid_id. Prefer letters, digits,-and_forsubjectId, and encode ids when you put them in a URL. - Times: RFC 3339 strings, in UTC.
- Rate limit: every call with a valid key counts toward your client's limit. Over it, any of
these calls can answer
429 {"error":"rate_limited"}withRetry-Afterin whole seconds. The public key set isn't limited. - Errors: a status plus
{"error": "<code>"}. Any call can also answer500 internal. Each code is explained in Errors.
Factors
POST /api/factors/pin
Sets or replaces the subject's PIN and clears any lockout.
- Request:
{subjectId, pin} - Success:
201 {} - Errors:
invalid_json,invalid_id,pin_rejected
DELETE /api/factors/pin/{subjectId}
Removes the subject's PIN.
- Success:
204, also when there was no PIN - Errors:
invalid_id
GET /api/factors/{subjectId}
Lists what the subject has enrolled. An unknown subject gets pin: false and an empty list.
- Success:
200
{
"pin": true,
"webauthn": [
{ "credentialId": "base64url", "createdAt": "2026-11-06T10:00:00Z", "lastUsedAt": null }
]
}- Errors:
invalid_id
Passkey registration
POST /api/webauthn/registrations
Starts a registration, valid for five minutes.
- Request:
{subjectId, displayName?}.displayNamedefaults tosubjectId, andsubjectIdis sent to the browser asuser.nameeither way. - Success:
201 {registrationId, publicKey}.publicKeyholds the options fornavigator.credentials.create, with binary values as base64url. The subject's existing passkeys are inexcludeCredentials. - Errors:
invalid_json,invalid_id
POST /api/webauthn/registrations/{registrationId}
Finishes a registration. The first call with a well-formed body uses it up, even if it fails.
- Request:
{credential}, the browser's response with binary values as base64url - Success:
201 {credentialId} - Errors:
invalid_json,invalid_id,registration_failed,challenge_gone
DELETE /api/webauthn/credentials/{credentialId}?subjectId={subjectId}
Removes one passkey. subjectId is required.
- Success:
204, also when there was no such passkey - Errors:
invalid_id
Challenges
POST /api/challenges
Opens a single-use challenge, valid for five minutes.
- Request:
{subjectId, purpose, factor}.factorispinorwebauthn. - Success:
201 {challengeId, expiresAt, publicKey?}.publicKeyis present only forwebauthnand holds the options fornavigator.credentials.get, with binary values as base64url. - Errors:
invalid_json,invalid_id,wrong_factor,factor_not_found,locked
POST /api/challenges/{challengeId}/verify
Checks the answer and, if it is right, issues a token. A PIN challenge allows maxAttempts from
your PIN policy, and a passkey challenge allows three attempts.
- Request: exactly one of
{pin}and{credential} - Success:
200 {token, expiresAt, factor}. See Verify the token. - Errors:
invalid_json,invalid_id,verification_failed,wrong_factor,factor_not_found,locked,challenge_gone
Public keys
GET /.well-known/jwks.json
The keys that verify tokens. No credential needed.
- Success:
200 {keys: [...]}, withCache-Control: public, max-age=300. Each key hasktyEC,crvP-256,algES256,usesig,kid,xandy.