Short-lived access token for authenticated requests
refresh_token
string
Long-lived token for obtaining new access tokens
email
string
User's email address
first_name
string
User's first name
last_name
string
User's last name
status
string
Account status (e.g., active)
is_email_verified
boolean
Whether the user's email is verified
Failure (401)
{"error":{"code":"INVALID_CREDENTIALS","message":"Invalid email or password","details":"The provided credentials do not match any account","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Sign Up
Creates a new user account.
HTTP request
POST https://api.darukaa.com/api/v1/auth/signup
Request body
The request body contains data with the following structure:
Bad Request - Invalid input data or email already exists
Response body
Success (201)
"Please verify your email to complete signup"
Failure (400)
{"error":{"code":"EMAIL_ALREADY_EXISTS","message":"An account with this email already exists","details":"Please use a different email address or try logging in","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Refresh Token
Obtains a new access token when the current one expires.
New short-lived access token to use for authenticated requests
refresh_token
string
(Optional) A rotated/renewed refresh token. If your implementation rotates refresh tokens, return the new one
email
string
User email associated with tokens
first_name
string
User's first name
last_name
string
User's last name
status
string
Account status
is_email_verified
boolean
Whether the user's email is verified
Failure (401)
{"error":{"code":"INVALID_REFRESH_TOKEN","message":"Invalid or expired refresh token","details":"Please login again to obtain a new refresh token","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Get Current User
Retrieves information about the currently authenticated user.
{"error":{"code":"UNAUTHORIZED","message":"Invalid or missing access token","details":"Please provide a valid Bearer token in the Authorization header","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Update Current User
Updates information for the currently authenticated user.
HTTP request
PUT https://api.darukaa.com/api/v1/auth/user
Headers
Header
Value
Required
Authorization
Bearer
Yes
Request body
The request body contains data with the following structure:
{"error":{"code":"UNAUTHORIZED","message":"Invalid or missing access token","details":"Please provide a valid Bearer token in the Authorization header","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
{"error":{"code":"INVALID_REFRESH_TOKEN","message":"Invalid or expired refresh token","details":"The refresh token provided is not valid","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}