Auth API
Sign in
13 endpoints.
/api/v1/auth/codeSend Sign In Code
Send a code to sign in with, by email or to an account's proven phone, and when another may be asked for. The same answer whether or not an account has it; a phone's send that failed is refused, and one too soon (for the destination, or past the requesting IP's hourly limit) is 429 ``cooldown_active`` with ``retry_in_seconds``.
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonSignInCodeRequest| Field | Type | Description |
|---|---|---|
email | string (email) | null | |
phone | string | null |
Responses
200Successful Responseapplication/jsonCodeSent| Field | Type | Description |
|---|---|---|
message | string | default "ok" |
resend_in_secondsrequired | integer |
4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/code/verifySign In With Code
Sign in by the code sent to an email or an account's phone, which proves the phone. 400 INVALID_OTP otherwise.
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonSignInWithCodeRequest| Field | Type | Description |
|---|---|---|
email | string (email) | null | |
phone | string | null | |
coderequired | string |
Responses
/api/v1/auth/forgot-passwordForgot Password
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonForgotPasswordRequest| Field | Type | Description |
|---|---|---|
emailrequired | string (email) |
Responses
200Successful Responseapplication/jsonany4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/loginLogin
OAuth2 compatible token login, get an access token for future requests.
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/x-www-form-urlencodedBody_login_api_v1_auth_login_post| Field | Type | Description |
|---|---|---|
grant_type | string | null | |
usernamerequired | string | |
passwordrequired | string (password) | |
scope | string | default "" |
client_id | string | null | |
client_secret | string | null |
Responses
/api/v1/auth/logoutLogout
Authentication
Authorization: Bearer <token>.
Request bodyrequired
application/jsonLogoutRequest| Field | Type | Description |
|---|---|---|
refresh_tokenrequired | string |
Responses
200Successful Responseapplication/jsonany4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/refreshRefresh Token
Rotate refresh token.
Authentication
No credential.
Request bodyrequired
application/jsonRefreshTokenRequest| Field | Type | Description |
|---|---|---|
refresh_tokenrequired | string |
Responses
200Successful Responseapplication/jsonToken| Field | Type | Description |
|---|---|---|
access_tokenrequired | string | |
token_typerequired | string | |
refresh_tokenrequired | string |
4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/resend-verificationResend Verification
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonResendVerificationRequest| Field | Type | Description |
|---|---|---|
emailrequired | string |
Responses
200Successful Responseapplication/jsonany4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/reset-passwordReset Password
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonResetPasswordRequest| Field | Type | Description |
|---|---|---|
token | string | null | |
email | string (email) | null | |
otp | string | null | |
new_passwordrequired | string |
Responses
200Successful Responseapplication/jsonany4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/signupCreate User
Create a new user (201) from the email alone; an email that already has an account, verified or not, is 400.
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonUserCreate| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
first_name | string | null | |
last_name | string | null | |
is_active | boolean | null | default true |
password | string | null | |
invite_id | string | null |
Responses
201Successful Responseapplication/jsonUserResponse| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
first_name | string | null | |
last_name | string | null | |
is_active | boolean | null | default true |
idrequired | string (uuid) | |
role_idrequired | integer | |
created_atrequired | string (date-time) | |
updated_atrequired | string (date-time) | |
phone | string | null | |
phone_verified_at | string (date-time) | null | |
pending_email | string | null | |
pending_phone | string | null | |
avatar_url | string | null |
4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/token/exchangeExchange Token
A copy of the caller's own access token bound to one service (``aud``), which that service alone accepts: this service and sor refuse it. It lives at most 15 minutes and never past the token presented, and carries the person's name and avatar as they stand now (``name``: first and last name, else email; ``avatar_url`` only when they have one). 400 UNSUPPORTED_AUDIENCE for any service but ``workflow-engine``; 401 for a missing, expired or invalid token, a bound copy included.
Authentication
Authorization: Bearer <token>.
Request bodyrequired
application/jsonTokenExchangeRequest| Field | Type | Description |
|---|---|---|
audiencerequired | string |
Responses
200Successful Responseapplication/jsonBoundAccessToken| Field | Type | Description |
|---|---|---|
access_tokenrequired | string | |
expires_inrequired | integer |
4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/verify-emailVerify Email Token
Authentication
No credential.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tokenrequired | query | string |
Responses
200Successful Responseapplication/jsonany4XXRefused: `code` says why5XXFailed: `code` says why
Error bodies: ErrorBody. See Errors.
/api/v1/auth/verify-emailVerify Email Otp
Verify by the emailed six-digit code and sign the user in. 409 ALREADY_VERIFIED for a verified account, 401 ACCOUNT_INACTIVE for an inactive one, 400 INVALID_OTP otherwise.
Authentication
X-Recaptcha-Token header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonVerifyEmailOtpRequest| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
otprequired | string |
/api/v1/auth/socialSocial Login
Social Login (Google). Verifies ID Token, finds/creates user, issues JWTs.
Authentication
No credential.
Request bodyrequired
application/jsonSocialLoginRequestproviderrequiredstringtokenrequiredstringResponses
200Successful Responseapplication/jsonTokenToken, expanded above.
4XXRefused: `code` says why5XXFailed: `code` says whyError bodies:
ErrorBody. See Errors.