Skip to content

Me API

Current principal.

14 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes

GET/me

The authenticated user and principal

Response 200 · OK · application/json
MeBody
  • createdAtstring (date-time)required
  • emailstringrequired
  • idstringrequired
  • instanceAdminbooleanrequired
    The first user: manages instance settings
  • namestringrequired
  • PrincipalBodyrequired
  • workspaceIdstringrequired
Errors
  • 401Unauthorized
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

PATCH/me

Update the signed-in user's profile

Request body · application/json · required
UpdateMeInputBody
  • namestringrequired
Response 200 · OK · application/json
MeBody
  • createdAtstring (date-time)required
  • emailstringrequired
  • idstringrequired
  • instanceAdminbooleanrequired
    The first user: manages instance settings
  • namestringrequired
  • PrincipalBodyrequired
  • workspaceIdstringrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/2fa/disable

Turn 2FA off (needs a code, and the password when the account has one)

Request body · application/json · required
TotpDisableInputBody
  • codestringrequired
    A current authenticator code or a recovery code
  • passwordstring
    Required when the account has a password
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/2fa/enable

Confirm the authenticator and turn 2FA on

Returns the 10 single-use recovery codes once. This session counts as second-factor verified afterwards.

Request body · application/json · required
TotpEnableInputBody
  • codestringrequired
Response 200 · OK · application/json
RecoveryCodesOutputBody
  • recoveryCodesstring[] | nullrequired
    Single-use codes; shown once
Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/2fa/recovery-codes

Replace the recovery codes (needs a current code)

Invalidates every previous code and returns 10 new ones, shown once.

Request body · application/json · required
RegenerateRecoveryCodesInputBody
  • codestring
    A current authenticator code or an unused recovery code
  • passwordstring
    Instead of a code, for an account that uses passkeys and no authenticator app
Response 200 · OK · application/json
RecoveryCodesOutputBody
  • recoveryCodesstring[] | nullrequired
    Single-use codes; shown once
Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/2fa/setup

Generate a TOTP secret to add to an authenticator app

Replaces any unconfirmed secret. Confirm it with POST /me/2fa/enable. Returns 409 when 2FA is already on.

Response 200 · OK · application/json
TotpSetupOutputBody
  • secretstringrequired
    Base32 secret for manual entry
  • uristringrequired
    otpauth:// URI for authenticator apps
Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

DELETE/me/identities/{id}

Unlink a single-sign-on account

ParameterInTypeDescription
idrequiredpathstring
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/me/passkeys

The signed-in user's passkeys

Response 200 · OK · application/json
PasskeysOutputBody
  • PasskeyBody[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/passkeys

Finish adding a passkey

Counts as a second factor for the team 2FA requirement. When the account has no unused recovery code left, a fresh set is issued and returned once.

Request body · application/json · required
PasskeyRegisterFinishInputBody
  • credentialanyrequired
    The RegistrationResponseJSON of the authenticator (PublicKeyCredential.toJSON())
  • namestringrequired
    What to call this passkey, for example 'MacBook' or 'YubiKey'
Response 201 · Created · application/json
PasskeyRegisterFinishOutputBody
  • PasskeyBodyrequired
  • recoveryCodesstring[] | null
    Issued when the account had no unused recovery code left; single use, shown once
Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

PATCH/me/passkeys/{id}

Rename a passkey

ParameterInTypeDescription
idrequiredpathstring
Request body · application/json · required
PasskeyRenameInputBody
  • namestringrequired
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

DELETE/me/passkeys/{id}

Remove a passkey (needs the password when the account has one)

Fails with 409 last_sign_in_method when it is the account's only way to sign in.

ParameterInTypeDescription
idrequiredpathstring
Request body · application/json · required
PasskeyDeleteInputBody
  • passwordstring
    Required when the account has a password
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflictlast_sign_in_method
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/passkeys/options

Start adding a passkey

Returns the WebAuthn creation options for navigator.credentials.create; the answer goes to POST /me/passkeys. Needs the password again when the account has one. Passkeys are discoverable credentials with user verification required.

Request body · application/json · required
PasskeyRegisterStartInputBody
  • passwordstring
    Required when the account has a password
Response 200 · OK · application/json
any
Errors
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/me/password

Change the signed-in user's password

Request body · application/json · required
ChangePasswordInputBody
  • currentPasswordstringrequired
  • newPasswordstringrequired
Response 204 · No Content

No body.

Errors
  • 401Unauthorized
  • 403Forbidden
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/me/security

Two-factor and linked-account status of the signed-in user

Response 200 · OK · application/json
SecurityBody
  • enrollmentNeededbooleanrequired
    The current team requires 2FA and this account has not enrolled; everything else is blocked until it does
  • hasPasswordbooleanrequired
  • IdentityBody[] | nullrequired
  • isInstanceAdminbooleanrequired
  • PasskeyBody[] | nullrequired
  • passkeysUnavailablestring
    Why passkeys cannot be used at this address (it needs HTTPS and a domain name); absent when they can
  • recoveryCodesLeftinteger (int64)required
  • RequiredTeamBody[] | nullrequired
  • sessionMfabooleanrequired
    This session proved a second factor
  • totpEnabledbooleanrequired
  • totpPendingbooleanrequired
    A secret was generated but not confirmed yet
Errors
  • 401Unauthorized
  • 403Forbidden
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.