POST
cURL

Authorizations

Authorization
string
header
required

JWT bearer token. App-user tokens are issued by POST /auth/token (the partner backend calls it as its platform service account); admin and dashboard tokens are issued via OIDC login.

Body

application/json
id_proof
object
required
phone_country_code
string
required
Example:

"+91"

phone_number
string
required
address

A user-submitted address as captured: either the structured form, a single free-text string, or both (the original text plus whatever was structured from it). #[serde(untagged)] keeps the wire shape natural — a bare object or a bare string — so existing structured clients are unaffected.

raw is Secret because a free-text address is PII (it embeds the same data masked elsewhere as line1 / pincode).

dob
string | null
Example:

"2000-01-15"

email
string | null
first_name
string | null
gender
null | enum<string>

User gender.

Available options:
MALE,
FEMALE,
OTHER
last_name
string | null

Response

Token issued

access_token
string
required
user_id
string
required

A validated 12-digit numeric user identifier.

Every external entry point validates:

  • JSON Deserialize runs [UserId::parse] (outer whitespace trimmed, length and digit-only enforced) via #[serde(try_from = "String")].
  • DB FromSql runs [UserId::parse] on every row read.

Display / Deref<Target = str> / AsRef<str> / Into<String> are derived via derive_more — the inner String is pass-through for every read-only borrow, display, and move-out.

Example:

"012345678901"