Skip to main content

Overview

The Doss API uses Laravel Passport for authentication. After a successful login, the server returns an access_token. Include this token in the Authorization header of every subsequent request:
Authorization: Bearer {access_token}
Base URL: https://your-domain.com/api

GET /check-login-via

Returns how login is configured on this instance — email only, phone only, or either.

Response fields

status
number
HTTP status code. 200 on success.
loginVia
string
One of email_only, phone_only, or email_or_phone.
curl --request GET \
  --url https://your-domain.com/api/check-login-via

POST /login

Authenticates a user and returns a Passport Bearer token.

Request parameters

email
string
required
The user’s email address. When loginVia is phone_only, pass the phone number here instead.
password
string
required
The user’s plaintext password.

Response fields

response
object

Error responses

StatusReason
401Invalid credentials or user not found
201Email not yet verified — activation link has been resent
200 with user-status: InactiveAccount is inactive
curl --request POST \
  --url https://your-domain.com/api/login \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "user@example.com",
    "password": "secret"
  }'

GET /check-user-status

Checks whether a specific user account is active, inactive, or suspended. This endpoint does not require an Authorization header.

Request parameters

user_id
number
required
The ID of the user to check.

Response fields

status
number
200 on success.
user-status
string
Account status: Active, Inactive, or Suspended.
curl --request GET \
  --url 'https://your-domain.com/api/check-user-status?user_id=42'

POST /logout

Revokes the current user’s Passport access token. No request body is required — the token is identified from the Authorization header.
Requires Authorization: Bearer {token} header.

Response fields

status
number
200 on success.
message
string
Confirmation message.
curl --request POST \
  --url https://your-domain.com/api/logout \
  --header 'Authorization: Bearer {token}'

Build docs developers (and LLMs) love