Skip to content
Menu
All API groups

Auth

Dashboard sign-in: password, magic link, TOTP.

17 endpoints.

POST/v1/auth/signup

Create a user and a store (14-day trial)

No key needed

Request body application/json SignupRequest

NameTypeRequiredDescription
emailstring (email)yes
namestringyesmax length 200
passwordstring | nullnoOmit to use magic links.min length 12 · max length 200
store_namestring | nullnoThe new store's name. Required unless invite_token is given.max length 200
locale"en" | "ar"noDashboard language.default "en"
invite_tokenstring | nullnoSign up from a team invite: join that store (the email must match the invite); no new store.max length 200

Responses

POST/v1/auth/login

Email + password

No key needed

Request body application/json LoginRequest

NameTypeRequiredDescription
emailstring (email)yes
passwordstringyesmax length 200

Responses

POST/v1/auth/mfa/verify

Second step: TOTP or recovery code

Needs a key or a dashboard session

Request body application/json MfaVerifyRequest

NameTypeRequiredDescription
codestringyes6-digit TOTP code or a recovery code.pattern ^(\d{6}|[a-z0-9]{10})$

Responses

POST/v1/auth/logout

Auth Logout

Needs a key or a dashboard session

Responses

GET/v1/auth/me

Auth Me

Needs a key or a dashboard session

Responses

POST/v1/auth/verify-email

Auth Verify Email

No key needed

Request body application/json TokenRequest

NameTypeRequiredDescription
tokenstringyesmin length 20 · max length 200

Responses

POST/v1/auth/password/forgot

Auth Password Forgot

No key needed

Request body application/json MagicLinkRequest

NameTypeRequiredDescription
emailstring (email)yes
locale"en" | "ar"noLanguage of the email.default "en"

Responses

POST/v1/auth/password/reset

Auth Password Reset

No key needed

Request body application/json PasswordResetRequest

NameTypeRequiredDescription
tokenstringyesmin length 20 · max length 200
passwordstringyesmin length 12 · max length 200

Responses

POST/v1/auth/password/change

Change the password (needs the current one; ends your other sessions)

Needs a key or a dashboard session

Request body application/json PasswordChangeRequest

NameTypeRequiredDescription
current_passwordstringyesmax length 200
new_passwordstringyesmin length 12 · max length 200

Responses

POST/v1/auth/totp/setup

Auth Totp Setup

Needs a key or a dashboard session

Responses

POST/v1/auth/totp/enable

Auth Totp Enable

Needs a key or a dashboard session

Request body application/json TotpEnableRequest

NameTypeRequiredDescription
codestringyespattern ^\d{6}$

Responses

POST/v1/auth/totp/disable

Auth Totp Disable

Needs a key or a dashboard session

Request body application/json MfaVerifyRequest

NameTypeRequiredDescription
codestringyes6-digit TOTP code or a recovery code.pattern ^(\d{6}|[a-z0-9]{10})$

Responses

GET/v1/auth/sessions

Auth Sessions List

Needs a key or a dashboard session

Responses

DELETE/v1/auth/sessions/{session_id}

Auth Sessions Revoke

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
session_idpathstringyes

Responses

GET/v1/whoami

Who these credentials are (Test connection)

Needs a key or a dashboard session

Responses

Data shapes on this page

SignupRequest

NameTypeRequiredDescription
emailstring (email)yes
namestringyesmax length 200
passwordstring | nullnoOmit to use magic links.min length 12 · max length 200
store_namestring | nullnoThe new store's name. Required unless invite_token is given.max length 200
locale"en" | "ar"noDashboard language.default "en"
invite_tokenstring | nullnoSign up from a team invite: join that store (the email must match the invite); no new store.max length 200

LoginResult

On success the API sets the `sg_session` cookie (HttpOnly, Secure, SameSite=Lax) and returns the CSRF token, which the web app sends back as `X-CSRF-Token` on every write.

NameTypeRequiredDescription
status"ok" | "mfa_required" | "email_sent"yes
userUserOut | nullno
csrf_tokenstring | nullno
weak_passwordbooleannoPassword sign-in only: the password is on the breached-password list or no longer meets the rules. Sign-in still works; ask the user to change it (POST /v1/auth/password/change).default false

UserOut

NameTypeRequiredDescription
idstringyes
emailstringyes
namestring | nullyes
locale"en" | "ar"yes
email_verifiedbooleanyes
totp_enabledbooleanyes
is_superadminbooleanyes
membershipsMembershipOut[]yes

MembershipOut

NameTypeRequiredDescription
idstringyes
tenant_idstringyes
tenant_namestringyes
tenant_slugstringyes
role"owner" | "admin" | "editor" | "viewer"yes

LoginRequest

NameTypeRequiredDescription
emailstring (email)yes
passwordstringyesmax length 200

MagicLinkRequest

NameTypeRequiredDescription
emailstring (email)yes
locale"en" | "ar"noLanguage of the email.default "en"

TokenRequest

NameTypeRequiredDescription
tokenstringyesmin length 20 · max length 200

MfaVerifyRequest

NameTypeRequiredDescription
codestringyes6-digit TOTP code or a recovery code.pattern ^(\d{6}|[a-z0-9]{10})$

Accepted

NameTypeRequiredDescription
acceptedbooleannodefault true
jobJob | nullno

Job

A row of the shared `jobs` table. Poll GET /v1/jobs/{id} until status is terminal.

NameTypeRequiredDescription
idstringyes
kind"reindex" | "import" | "sync" | "translate_backfill" | "translate_writeback" | "export" | "data_export" | "data_delete" | "embed" | "synonym_mining"yes
status"queued" | "running" | "succeeded" | "failed" | "canceled"yes
progressnumbernodefault 0 · min 0 · max 1
created_atstring (date-time)yes
started_atstring (date-time) | nullno
finished_atstring (date-time) | nullno
resultobject | nullno
errorstring | nullno

PasswordResetRequest

NameTypeRequiredDescription
tokenstringyesmin length 20 · max length 200
passwordstringyesmin length 12 · max length 200

PasswordChangeRequest

Signed-in password change. The new password follows the sign-up rules (12+ characters, not on the breached-password list, not built from the email or name).

NameTypeRequiredDescription
current_passwordstringyesmax length 200
new_passwordstringyesmin length 12 · max length 200

TotpSetup

NameTypeRequiredDescription
secretstringyes
otpauth_urlstringyes

TotpEnableRequest

NameTypeRequiredDescription
codestringyespattern ^\d{6}$

RecoveryCodes

NameTypeRequiredDescription
codesstring[]yesShown once. 10 single-use codes.

SessionOut

NameTypeRequiredDescription
idstringyes
created_atstring (date-time)yes
last_seen_atstring (date-time)yes
user_agentstring | nullyes
currentbooleanyes

Deleted

NameTypeRequiredDescription
deletedbooleannodefault true
idstringyes

WhoAmI

What the current credentials are (connectors use it for 'Test connection').

NameTypeRequiredDescription
tenant_idstringyes
auth"public_key" | "secret_key" | "session"yes
key_idstring | nullno
user_idstring | nullno
role"owner" | "admin" | "editor" | "viewer" | nullno
scopesstring[]yes