Skip to content
Coritan Docs

Organization API: Customer Authentication: Staff

The 19 Organization API operations for staff.

View as Markdown

Part of Customer Authentication.

Method Path Summary
POST /api/v1/orgs/{org_slug}/staff/auth/change-password Change your own password
POST /api/v1/orgs/{org_slug}/staff/auth/customer-session A fresh storefront session for the member's own customer account
POST /api/v1/orgs/{org_slug}/staff/auth/forgot-password Staff forgot password
POST /api/v1/orgs/{org_slug}/staff/auth/login Staff login
POST /api/v1/orgs/{org_slug}/staff/auth/logout Staff logout
GET /api/v1/orgs/{org_slug}/staff/auth/me Staff me
PATCH /api/v1/orgs/{org_slug}/staff/auth/me Staff patch me
GET /api/v1/orgs/{org_slug}/staff/auth/mfa Staff MFA status
POST /api/v1/orgs/{org_slug}/staff/auth/mfa/disable Turn the factor off: password and a current code, both
POST /api/v1/orgs/{org_slug}/staff/auth/mfa/enable Confirm the code from the freshly scanned secret
POST /api/v1/orgs/{org_slug}/staff/auth/mfa/recovery-codes A new set of recovery codes against a current code; the old set is void
POST /api/v1/orgs/{org_slug}/staff/auth/mfa/setup Start (or restart) enrolment: a fresh secret, the otpauth URI and the QR code for it
POST /api/v1/orgs/{org_slug}/staff/auth/mfa/verify The second step of signing in
POST /api/v1/orgs/{org_slug}/staff/auth/reauth Prove it is still you
POST /api/v1/orgs/{org_slug}/staff/auth/refresh Staff refresh
POST /api/v1/orgs/{org_slug}/staff/auth/reset-password Staff reset password
GET /api/v1/orgs/{org_slug}/staff/auth/sessions Staff my sessions
POST /api/v1/orgs/{org_slug}/staff/auth/sessions/revoke-others Staff end other sessions
DELETE /api/v1/orgs/{org_slug}/staff/auth/sessions/{token_id} Staff end my session

POST /api/v1/orgs/{org_slug}/staff/auth/change-password

Change your own password. Every other session you have is ended; the one making this request stays signed in.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
current_password string yes
new_password string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

A fresh storefront session for the member's own customer account

Section titled A fresh storefront session for the member's own customer account

POST /api/v1/orgs/{org_slug}/staff/auth/customer-session

A fresh storefront session for the member's own customer account. The console restores it after a support session ends, or mints one when the member opens the storefront and has none.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/forgot-password

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
email string yes
turnstile_token string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/login

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
email string yes
password string yes
turnstile_token string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/logout

End this console session and every storefront session it minted for the member, so signing out of the console signs them out of the site.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/staff/auth/me

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

PATCH /api/v1/orgs/{org_slug}/staff/auth/me

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
name string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/staff/auth/mfa

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Turn the factor off: password and a current code, both

Section titled Turn the factor off: password and a current code, both

POST /api/v1/orgs/{org_slug}/staff/auth/mfa/disable

Turn the factor off: password and a current code, both. Refused when the brand requires a second factor of everyone; in that case an admin resets it from the team page instead, and the member enrols again.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
password string yes
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Confirm the code from the freshly scanned secret

Section titled Confirm the code from the freshly scanned secret

POST /api/v1/orgs/{org_slug}/staff/auth/mfa/enable

Confirm the code from the freshly scanned secret. Turns the factor on, hands out the recovery codes once and, when the caller was a pending enrolment session, issues the full session too.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

A new set of recovery codes against a current code; the old set is void

Section titled A new set of recovery codes against a current code; the old set is void

POST /api/v1/orgs/{org_slug}/staff/auth/mfa/recovery-codes

A new set of recovery codes against a current code; the old set is void.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Start (or restart) enrolment: a fresh secret, the otpauth URI and the QR code for it

Section titled Start (or restart) enrolment: a fresh secret, the otpauth URI and the QR code for it

POST /api/v1/orgs/{org_slug}/staff/auth/mfa/setup

Start (or restart) enrolment: a fresh secret, the otpauth URI and the QR code for it. Nothing is enforced until enable confirms a code. Refused while a factor is already on; disable that one first.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/mfa/verify

The second step of signing in. Bearer is the pending token from login; a right code (or a recovery code) retires it and issues the full session. A session that is already full gets its step-up stamp refreshed instead, which is what reauth with a code does too.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/reauth

Prove it is still you. A password, or a code when two-factor is on (the code is preferred and required once the factor exists, so a stolen password alone never reaches the step-up routes).

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
password string or null no
code string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/refresh

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
refresh_token string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/reset-password

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
token string yes
password string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/staff/auth/sessions

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/staff/auth/sessions/revoke-others

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/staff/auth/sessions/{token_id}

Name In Type Required
token_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.