Reference
View as MarkdownAuth API
Sessions.
21 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/auth-providersConfigured single-sign-on providers (instance admin)
Response 200 · OK · application/json
- ProviderBody[] | nullrequired
401Unauthorized403Forbidden500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth-providersAdd a single-sign-on provider (instance admin)
OIDC issuers are checked through discovery (/.well-known/openid-configuration) before saving.
Request body · application/json · required
- allowedDomainsstring[] | null
- clientIdstringrequired
- clientSecretstringWrite-only. Required on create; empty on update keeps the stored secret
- enabledboolean
- idstringCreate only: the ID the provider gets, so its callback URL (/api/v1/auth/oidc/{id}/callback) can be registered at the identity provider before saving. Generated when omitted; 409 provider_id_taken when in use
- issuerUrlstring
- kindenum: oidc | githubrequired
- namestringrequired
- scopesstring[] | null
- trustMfaboolean
Response 201 · Created · application/json
- allowedDomainsstring[] | nullrequiredEmpty allows any verified email
- clientIdstringrequired
- createdAtstring (date-time)required
- enabledbooleanrequired
- idstringrequired
- issuerUrlstringrequiredOIDC issuer; for GitHub an optional Enterprise Server base URL
- kindenum: oidc | githubrequired
- namestringrequired
- redirectUristringrequiredRegister this callback URL at the provider
- scopesstring[] | nullrequired
- trustMfabooleanrequiredSkip the local 2FA step when the provider asserts MFA (amr claim)
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth-providers/{id}Replace a single-sign-on provider's settings (instance admin)
| Parameter | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Request body · application/json · required
- allowedDomainsstring[] | null
- clientIdstringrequired
- clientSecretstringWrite-only. Required on create; empty on update keeps the stored secret
- enabledboolean
- idstringCreate only: the ID the provider gets, so its callback URL (/api/v1/auth/oidc/{id}/callback) can be registered at the identity provider before saving. Generated when omitted; 409 provider_id_taken when in use
- issuerUrlstring
- kindenum: oidc | githubrequired
- namestringrequired
- scopesstring[] | null
- trustMfaboolean
Response 200 · OK · application/json
- allowedDomainsstring[] | nullrequiredEmpty allows any verified email
- clientIdstringrequired
- createdAtstring (date-time)required
- enabledbooleanrequired
- idstringrequired
- issuerUrlstringrequiredOIDC issuer; for GitHub an optional Enterprise Server base URL
- kindenum: oidc | githubrequired
- namestringrequired
- redirectUristringrequiredRegister this callback URL at the provider
- scopesstring[] | nullrequired
- trustMfabooleanrequiredSkip the local 2FA step when the provider asserts MFA (amr claim)
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth-providers/{id}Remove a single-sign-on provider and its linked identities (instance admin)
| Parameter | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth-settingsInstance sign-in settings (instance admin)
Response 200 · OK · application/json
- allowOpenSignupbooleanrequiredLet anyone create an account through an identity provider without an invite (default off)
401Unauthorized403Forbidden500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth-settingsChange instance sign-in settings (instance admin)
Request body · application/json · required
- allowOpenSignupbooleanrequiredLet anyone create an account through an identity provider without an invite (default off)
Response 200 · OK · application/json
- allowOpenSignupbooleanrequiredLet anyone create an account through an identity provider without an invite (default off)
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/2faPublicWhat can finish the pending sign-in
Response 200 · OK · application/json
- passkeybooleanrequiredA passkey can finish the sign-in
- totpbooleanrequiredAn authenticator-app or recovery code can finish the sign-in
401Unauthorized500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/2faPublicFinish sign-in with a TOTP or recovery code
Follows a login that answered 401 two_factor_required (or a provider login that redirected to /login?step=2fa). The pending login expires after 5 minutes and after 5 wrong codes; limited to 10 attempts per minute per client IP.
Request body · application/json · required
- codestringrequiredA 6-digit authenticator code or a recovery code
Response 200 · OK · application/json
- createdAtstring (date-time)required
- emailstringrequired
- idstringrequired
- instanceAdminbooleanrequiredThe first user: manages instance settings
- namestringrequired
- PrincipalBodyrequired
- workspaceIdstringrequired
401Unauthorizedtwo_factor_required422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/2fa/passkeyPublicFinish sign-in with a passkey as the second factor
The pending login expires after 5 minutes and after 5 wrong answers; limited to 10 attempts per minute per client IP.
Request body · application/json · required
Response 200 · OK · application/json
- createdAtstring (date-time)required
- emailstringrequired
- idstringrequired
- instanceAdminbooleanrequiredThe first user: manages instance settings
- namestringrequired
- PrincipalBodyrequired
- workspaceIdstringrequired
401Unauthorized422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/2fa/passkey/optionsPublicAsk the account's passkeys to finish a pending sign-in
Follows a login that answered 401 two_factor_required. Returns the WebAuthn request options for navigator.credentials.get; the answer goes to POST /auth/2fa/passkey.
Response 200 · OK · application/json
401Unauthorizedtwo_factor_required409Conflict429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/loginPublicSign in with email and password (sets the session cookie)
Limited to 10 attempts per minute per client IP.
Request body · application/json · required
- emailstringrequired
- passwordstringrequired
Response 200 · OK · application/json
- createdAtstring (date-time)required
- emailstringrequired
- idstringrequired
- instanceAdminbooleanrequiredThe first user: manages instance settings
- namestringrequired
- PrincipalBodyrequired
- workspaceIdstringrequired
401Unauthorized422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/logoutPublicDestroy the current session
Response 204 · No Content
No body.
/auth/oidc/{providerId}/callbackPublicOAuth/OIDC redirect target of the identity provider
Completes the sign-in and redirects to / (or /login?step=2fa / /login?error=<code>).
| Parameter | In | Type | Description |
|---|---|---|---|
providerIdrequired | path | string | |
code | query | string | |
state | query | string | |
error | query | string |
Response 302 · Found
No body.
/auth/oidc/{providerId}/startPublicRedirect to the identity provider
| Parameter | In | Type | Description |
|---|---|---|---|
providerIdrequired | path | string | |
invite | query | string | Team invite token that authorises sign-up of a new account |
Response 302 · Found
No body.
404Not Found422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/passkey/loginPublicFinish a passwordless sign-in with a passkey (sets the session cookie)
A passkey verified on the authenticator (PIN or biometric) counts as two factors: the session is second-factor verified and no code is asked for.
Request body · application/json · required
Response 200 · OK · application/json
- createdAtstring (date-time)required
- emailstringrequired
- idstringrequired
- instanceAdminbooleanrequiredThe first user: manages instance settings
- namestringrequired
- PrincipalBodyrequired
- workspaceIdstringrequired
401Unauthorized422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/passkey/optionsPublicStart a passwordless sign-in with a passkey
Returns the WebAuthn request options for navigator.credentials.get; the answer goes to POST /auth/passkey/login. The options expire after 5 minutes. Limited to 10 attempts per minute per client IP.
Response 200 · OK · application/json
422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/password-resetPublicWhether password reset by email is available
Response 200 · OK · application/json
- availablebooleanrequiredWhether the login page may offer Forgot password: an email can be sent and the control plane has a public URL
/auth/password-reset/confirmPublicSet a new password with a reset link
Single use. Ends every session of the account; two-factor authentication still applies at the next sign-in. 400 invalid_reset_token for an unknown, expired or used link; limited to 10 attempts per minute per client IP.
Request body · application/json · required
- passwordstringrequired
- tokenstringrequired
Response 204 · No Content
No body.
400Bad Requestinvalid_reset_token422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/password-reset/requestPublicEmail a password reset link
Answers 202 whether or not the account exists, so it cannot be used to find out which emails are registered; accounts that sign in only through an identity provider get no email. The link works once and expires after 30 minutes. Limited to 10 requests per hour per client IP and 3 per hour per email address. 503 password_reset_unavailable when the instance has no SMTP relay or team email channel, or no public URL.
Request body · application/json · required
- emailstringrequired
Response 202 · Accepted · application/json
- statusenum: requestedrequiredAlways 'requested': the answer is the same whether or not the account exists
422Unprocessable Entity429Too Many Requests500Internal Server Error503Service Unavailablepassword_reset_unavailable
Errors are RFC 9457 application/problem+json with a stable code field.
/auth/providersPublicEnabled single-sign-on providers for the login page
Response 200 · OK · application/json
- PublicProviderBody[] | nullrequired
/instance/sign-in-providers/testTest an OpenID Connect issuer without saving it (instance admin)
Reads /.well-known/openid-configuration of the issuer the way saving a provider does and checks that the document names the same issuer and has the authorization endpoint, token endpoint and key set. Answers 200 either way: ok is false with a specific code and message when the issuer cannot be used.
Request body · application/json · required
- issuerUrlstringrequiredThe OIDC issuer to read the discovery document of
Response 200 · OK · application/json
- authorizationEndpointstringWhere people are sent to sign in (on success)
- codeenum: invalid_issuer | host_not_found | unreachable | timeout | tls_invalid | discovery_not_found | discovery_invalid | issuer_mismatch | discovery_incompleteWhy the issuer cannot be used (on failure)
- issuerstringThe issuer the provider reported (on success)
- messagestringWhat to fix (on failure)
- okbooleanrequiredThe issuer serves a usable OpenID configuration
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.