v2

latestOpenAPI 3.1.02026-07-267085761.0 MB
Auth

Auth User

Authenticates a user and returns a response.

This function checks if the user exists in the database, sends an OTP to the user's phone number, and creates a new user if the user does not exist.

Args: user (UserCreate): The user to be authenticated. db (AsyncSession): The database session.

Returns: CommonResponse: A response indicating the success or failure of the authentication.

post/api/v1/auth/

Request body

platform_idinteger
namestring nullable
pay_tagstring nullable
emailstring nullable
phone_country_codestring nullable
phonestring nullable
kyc_status'PENDING' | 'APPLIED' | 'APPROVED' | 'REJECTED' | 'FAILED' | 'COMPLETED' | 'IN_REVIEW' | 'PW_ACCOUNT'
kyb_status'PENDING' | 'APPLIED' | 'APPROVED' | 'REJECTED' | 'FAILED' | 'COMPLETED' | 'IN_REVIEW' | 'PW_ACCOUNT'
is_merchantboolean
is_affiliateboolean
is_usage_limitedboolean
contains_affiliateboolean
is_scheduled_to_deleteboolean
scheduled_to_delete_atstring date-time nullable
user_type'REGULAR' | 'REQUESTED' | 'PAYER_ADDED' | 'PAYEE_ADDED' | 'PLATFORM' | 'QB' | 'INTERNAL'
m_pinstring nullable
persona_idstring nullable
is_verifiedboolean

Response

Successful Response

successboolean

Indicates whether the request was processed successfully.

messagestring

A short, human-readable message describing the result of the request.

{"stackTrail":"components:schemas:CommonResponse:properties:data:anyOf","oasType":"schema","type":"unknown","title":"Data","description":"The main response payload, if applicable","nullable":true}
queryGeneratedTimenumber nullable

The Unix timestamp (in seconds) indicating when the response was generated.

Example response

{
  "success": true,
  "message": "Operation completed.",
  "queryGeneratedTime": 1718006400
}