---
title: "Create unity user"
method: POST
path: "/backend/{gatewayname}/v1/user"
---

# Create unity user

`POST /backend/{gatewayname}/v1/user`

A unity user is created before initiating the loan application journey. The API accepts a bunch of optional values like contact & bank details, date of birth, etc. that can be passed at the time of Unity User creation. These values will be later pre-populated in the LAMF journey for the user and improve the user experience.

## Path parameters

- `gatewayname` string, required

## Headers

- `x-gateway-secret` string, required
- `x-gateway-authtoken` string, required

## Request body

- object
  - `pan` string, required — Required | PAN of the user to be pre-filled in the LAMF or LAS journey
  - `authContact` object, required
    - `number` string, required — Required | 10-digits phone number
    - `countryCode` string, required — Required | Valid country code, e.g. "+91"
  - `referrer` string — Optional | Only if part of the LAMF or LAS referrer program
  - `dob` string — Optional | To pre-fill the date of birth in the LAMF or LAS journey (DD-MM-YYYY) format
  - `contacts` object[] — Optional | To pre-fill user's contact details in the LAMF or LAS journey
    - `type` 'PHONE' | 'EMAIL', required — Required | To set the type of the contact passed
    - `email` string — Required | If `contact.type` = "EMAIL"
    - `phone` object — Required | If `contact.type` = "PHONE"
      - `number` string, required — Required | Ten-digit phone number without the country code
      - `countryCode` string, required — Required | Country code of the phone number
  - `isLienMarkingMocked` boolean — Optional | If enabled then holdings will not be actually lien marked and the Unity user can be used for testing
  - `bankAccounts` object[] — Optional | To pre-fill user's bank account details in the LAMF or LAS journey
    - `accountNumber` string, required
    - `bankName` string, required
    - `ifscCode` string, required
    - `accountType` string, required
    - `primary` boolean, required — Required | Sets the bank account as primary in case there are multiple
  - `holdings` object[]
    - `repository` string, required — holdings repository (CAMS/KFIN)
    - `amcCode` string, required
    - `folio` string, required
    - `schemeCode` string, required
    - `schemeName` string, required
    - `isin` string, required
    - `schemeType` string, required
    - `dpID` string — 16 digit DP (Depository Participant) ID . Mandatory to be passed for a security with `"isDemat": true`
    - `units` number, double, required
    - `isDemat` boolean, required
    - `lockInUnits` number, double, required
    - `availableUnits` number, double
    - `folioMobile` string, required
    - `contact` object
      - `email` string, required
      - `phone` object, required
        - `number` string, required
        - `countryCode` string, required
  - `holdingsLastFetchedAt` string, date-time — Required if holdings array is passed
  - `opaqueId` string — Optional | To attribute your system identifier with the Unity user
  - `productType` string — Optional | Product type for the loan. Defaults to lamf (covers both LAMF and LAS)
  - `assetType` 'MUTUALFUND' | 'STOCKS' — Optional | Asset type for the loan. MUTUALFUND for LAMF (default), STOCKS for LAS
  - `name` string — Optional | To pre-fill user's name in the LAMF or LAS journey
  - `age` string — Optional | Used to pre-fill the user's age in the LAMF or LAS journey. If either DOB or age is provided, the user will not be prompted to enter it during the journey.
  - `isNri` boolean — Optional | Indicates whether the user is an NRI. Required for certain lenders in the LAMF or LAS journey

## Response `200`

200

- object
  - `code` integer
  - `data` object
    - `referrer` string
    - `unityUserId` string
    - `lender` string
  - `message` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/smallcase/apis/graph-performance-api.md) · [All operations](https://skmtc.net/smallcase/apis/graph-performance-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallcase/graph-performance-api/versions/6d2439eafede/schema)
