User Registration & Auth

Each Partner API user is a Qwik-managed identity scoped to your organization. A user registered under your org cannot sign into the Qwik consumer app, and Qwik consumers cannot use your endpoints. An email/phone already registered on the main Qwik app is rejected.

POST/partner/auth/register

๐Ÿ”‘ Org key + secret
FieldTypeRequiredNotes
emailstringโœ…Valid email.
phone_numberstringโœ…Min 10 chars, E.164 recommended (+1555โ€ฆ).
first_namestringโœ…
last_namestringโœ…
passwordstringโœ…Min 6 chars.
ssnstringโœ…Normalized server-side; 123-45-6789 or 123456789.
date_of_birthstringโ€”YYYY-MM-DD.
addressobjectโ€”{ line1, line2, city, state, zipcode, country } (all optional).
secondary_addressobjectโ€”Same shape.
metadataobjectโ€”Arbitrary key/values you want stored on the user.
201 ยท Response
{ "userId": "firebase-uid", "email": "john@example.com", "phone_number": "+15551234567", "first_name": "John", "last_name": "Doe" }

POST/partner/auth/login

๐Ÿ”‘ Org key + secret

Verifies the password, then sends a one-time code to the matching email/phone. Does not return a session yet.

Body: password (required) + either email or phone_number.

200 ยท Response
{
  "message": "OTP sent",
  "userId": "..."
}

POST/partner/auth/verify-otp

๐Ÿ”‘ Org key + secret

Exchanges the OTP for a session token.

Body: code (required, โ‰ฅ4 chars) + either email or phone_number.

200 ยท Response
{
  "sessionToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
  "expiresAt": 1750000000000,
  "user": { "id": "...", "email": "...", "phone_number": "...", "first_name": "John", "last_name": "Doe", "kyc_status": "pending" }
}

POST/partner/auth/forgot-password/send-otp

๐Ÿ”‘ Org key + secret

Body: email or phone_number. Always returns the same generic message (to avoid leaking which accounts exist):

200 ยท Response
{
  "message": "If an account exists for that contact, a password reset OTP has been sent."
}

POST/partner/auth/forgot-password/reset

๐Ÿ”‘ Org key + secret

Body: (email or phone_number) + code (โ‰ฅ4) + new_password (โ‰ฅ6).

200 ยท Response
{
  "message": "Password updated successfully"
}

POST/partner/auth/change-password

๐Ÿ”‘ Org key + secret๐Ÿ‘ค User session

Body: current_password, new_password (โ‰ฅ6, must differ from current).

200 ยท Response
{
  "message": "Password updated successfully"
}

POST/partner/auth/logout

๐Ÿ”‘ Org key + secret๐Ÿ‘ค User session

Revokes the current session.

200 ยท Response
{
  "message": "Logged out successfully"
}