Create or retrieve a user
Creates a new end user for the authenticated client. If a user with the same email
already exists, the existing record is returned along with a confirmation message.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Create (or retrieve) an end user under the authenticated client for identity-verification tracking. The user's email is matched case-insensitively: if a user with the same email already exists for your client, the existing record is returned unchanged; otherwise a new user is created with no verification yet. Returns the user record and a message indicating whether it was created or already existed.
Authentication & access
- Requires a client API token:
Authorization: Bearer <token>. - The caller must hold the
kyc.users.writepermission and have the OWNER or OPERATIONS role.
Request body
| Field | Required | Notes |
|---|---|---|
email | yes | The user's email address. Normalized (trimmed and lowercased) and used as the per-client uniqueness key. |
full_name | no | The user's full name. |
verification_mode | no | Per-user verification mode: urbanpayx_kyc (UrbanPayX-managed verification) or external_attestation (you attest the user's status yourself). When omitted, the client's default verification mode is applied. |
Create vs. retrieve
- New email — a user is created with
kyc_status = none,external_verification_status = pending, andverification_source = none. The responsemessageisUser created successfully. - Existing email — the stored record is returned as-is and
messageisUser already exists. This call never mutates an existing user. - Mode conflict — if you pass
verification_modeexplicitly and it differs from the existing user's mode, the request is rejected with409. UsePATCH /api/v1/kyc/users/USER_ID/verification-modeto change the mode of an existing user.
Response
200 — returns the user record:
id— unique user ID.email,full_name.kyc_status— one ofnone,pending,approved,rejected,on_hold.verification_mode— the mode assigned to this user.external_verification_status—pending,verified, orrejected(relevant in external-attestation mode).verification_source—none,urbanpayx, orexternal.created_at— creation timestamp.message—User created successfullyorUser already exists.
Error responses
| Status | When |
|---|---|
409 | An explicit verification_mode was supplied that conflicts with the existing user's mode |
422 | Request body failed validation (e.g. missing or malformed email, unsupported verification_mode value) |
500 | User creation failed unexpectedly during a concurrent insert; retry the request |
Standard 401 (authentication), 403 (insufficient permission or role), and 429 (rate limit) responses apply to every endpoint and are documented in the Error reference.