Part of Customer Authentication.
POST /api/v1/orgs/{org_slug}/auth/forgot-password
Issue a password-reset token stored on the customer metadata.
Always returns success to avoid email enumeration.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
email |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/login
Password sign-in with an email address or a username.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
identifier |
string or null |
no |
email |
string or null |
no |
username |
string or null |
no |
password |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/logout
Revoke the current access token (and its refresh twin if present).
| 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}/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. |
Fields of a 200 response:
| Field |
Type |
id |
integer |
org_id |
integer |
email |
string |
first_name |
string or null |
last_name |
string or null |
chat_handle |
string or null |
chat_handle_locked_for |
integer |
company |
string or null |
phone |
string or null |
status |
string |
credit_balance |
string |
currency |
string |
country_code |
string or null |
currency_source |
string |
custom_fields |
object or null |
last_login_at |
string (date-time) or null |
created_at |
string (date-time) or null |
updated_at |
string (date-time) or null |
has_password |
boolean |
staff_member |
boolean |
email_verified |
boolean |
avatar_url |
string or null |
PATCH /api/v1/orgs/{org_slug}/auth/me
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
first_name |
string or null |
no |
last_name |
string or null |
no |
chat_handle |
string or null |
no |
company |
string or null |
no |
phone |
string or null |
no |
password |
string or null |
no |
current_password |
string or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field |
Type |
id |
integer |
org_id |
integer |
email |
string |
first_name |
string or null |
last_name |
string or null |
chat_handle |
string or null |
chat_handle_locked_for |
integer |
company |
string or null |
phone |
string or null |
status |
string |
credit_balance |
string |
currency |
string |
country_code |
string or null |
currency_source |
string |
custom_fields |
object or null |
last_login_at |
string (date-time) or null |
created_at |
string (date-time) or null |
updated_at |
string (date-time) or null |
has_password |
boolean |
staff_member |
boolean |
email_verified |
boolean |
avatar_url |
string or null |
GET /api/v1/orgs/{org_slug}/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. |
POST /api/v1/orgs/{org_slug}/auth/mfa/disable
Turn the factor off with a current code, and with the password when the
account has one. Refused while the brand requires a factor of everyone.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
password |
string or null |
no |
code |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/mfa/enable
| 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}/auth/mfa/recovery-codes
| 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}/auth/mfa/setup
| 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}/auth/mfa/verify
| 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. |
GET /api/v1/orgs/{org_slug}/auth/oauth/connections
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A 200 response is a list; each item has these fields:
| Field |
Type |
[].provider |
string |
[].provider_username |
string or null |
[].provider_email |
string or null |
[].provider_avatar |
string or null |
[].created_at |
string (date-time) or null |
DELETE /api/v1/orgs/{org_slug}/auth/oauth/connections/{provider}
| Name |
In |
Type |
Required |
provider |
path |
string |
yes |
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}/auth/oauth/providers
Public: which social providers are configured for storefront login.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field |
Type |
providers |
array of string |
POST /api/v1/orgs/{org_slug}/auth/oauth/set-password
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
password |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/auth/oauth/{provider}/authorize
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
provider |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/auth/oauth/{provider}/callback
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
provider |
path |
string |
yes |
code |
query |
string or null |
no |
state |
query |
string or null |
no |
error |
query |
string or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/refresh
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field |
Type |
access_token |
string |
refresh_token |
string |
token_type |
string |
expires_in |
integer |
scopes |
array of string or null |
POST /api/v1/orgs/{org_slug}/auth/register
Self-service customer signup for the org storefront.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
email |
string |
yes |
password |
string |
yes |
username |
string or null |
no |
first_name |
string or null |
no |
last_name |
string or null |
no |
company |
string or null |
no |
phone |
string or null |
no |
turnstile_token |
string or null |
no |
| Status |
Meaning |
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/resend-verification
Send another confirmation link to the signed-in customer's own address.
Authenticated rather than taking an email in the body: an anonymous version
would let anyone post mail to any address on this org's behalf, and there is
nothing to gain from it when the customer can already sign in.
| 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}/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}/auth/sessions
Where this account is currently signed in.
The token row already records the address and user agent it was issued to,
so a customer can see a session they do not recognise without us keeping a
second log of it. Tokens are never returned, only the hash we match the
caller's own session on. country_code is where the address places
(see _session_countries), or null when nothing can place it, so the
page can say "Germany · 203.0.113.9" rather than an address alone.
Support sessions are labelled rather than hidden. An admin looking at an
account shows up here as a sign-in from an address the customer will not
recognise, and the honest answer to that is to say what it is.
| 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}/auth/sessions/revoke-others
Sign out everywhere except here.
The one action worth having after a shared or stolen laptop, and it must
not log the customer out of the browser asking for it, so the presented
token is the one row left alone.
| 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}/auth/username-available
Whether a username can be taken at signup, and why not when it cannot.
Public, because the signup form asks while somebody is still typing and has
no session yet. It gives away nothing the community pages do not: a handle
is the name everyone already sees above every message its owner posts.
Answers rather than raising, so a 422 per keystroke is not the shape of it.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
username |
query |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/auth/verify-email
Confirm an address from an emailed link.
Public, because the customer may follow the link in a browser that is not
signed in. The token is the credential, and it only ever sets a flag
nothing reads for access.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
customer_id |
integer |
yes |
token |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |