> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.liquifyfin.in/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.liquifyfin.in/_mcp/server.

# Create a customer on your partner book

POST https://a7.liquifyfin-uat.in/v1/customers
Content-Type: application/json

The PAN is established ONE of two ways:

- **Liquify verified it** — send `verification_id` from `POST /v1/pan-verifications`.
- **You verified it** — send `pan_verified: true` with `name_as_per_pan`, `dob` and `gender`
  exactly as the PAN record states them. Individual (fourth character `P`), adult PANs only.
  If Liquify already holds a verification of this PAN, Liquify's record wins and `dob` must
  equal it.

`consent` must grant `KYC_PAN`. Retrying a create that succeeded answers the same
`customer_id` with `created: false`.


Reference: https://docs.liquifyfin.in/api-reference/liquify-vendor-api/customer-onboarding/create-customer

## Authentication

- `Authorization` header (bearer token, required) — The token Liquify issued your organisation. Shown once; rotate it from Liquify if it is exposed.

## Request

### Body (application/json)

This endpoint expects a CustomerCreateRequest.

- `mobile` (string, required) — Ten digits, no country code.
- `pan` (string, required)
- `consent` (ConsentEvidence, required)
- `verification_id` (string, optional) — From `POST /v1/pan-verifications`.
- `pan_verified` (boolean, optional) — `true` when you verified the PAN yourself.
- `name_as_per_pan` (string, optional) — With `pan_verified`. As the PAN record states it; letters, spaces, `.`, `'` and `-`.
- `dob` (date, optional) — With `pan_verified`. 18 or over.
- `gender` (enum, optional) — With `pan_verified`.
  - Allowed values: `M`, `F`, `T`

## Response

### 200

The customer — new, or the one this PAN and mobile already are.

- `data` (Customer, required)
- `meta` (Meta, required)

## Errors

### 400 Bad Request Error

`VALIDATION_FAILED` — the request breaks a rule in this spec.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 401 Unauthorized Error

`AUTH_INVALID_TOKEN` — no token, an unknown token, or your access is switched off.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 403 Forbidden Error

`ACCESS_DENIED` — this API is not switched on for you; `CONSENT_REQUIRED` — the customer has not granted (or withdrew) a purpose this call needs.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 404 Not Found Error

`NOT_FOUND` — not a customer on your book, or (create) an unknown verification.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 409 Conflict Error

`STATE_CONFLICT`, `PORTFOLIO_NOT_SYNCED`, `PORTFOLIO_SYNC_INCOMPLETE` — the customer is not in a state this call can act on.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 422 Unprocessable Entity Error

`KYC_REQUIRED` — not an individual's PAN, under 18, or the PAN did not verify; `MF_SYNC_CONTACT_NOT_LINKED` — the folios are registered to another e-mail or mobile.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 429 Too Many Requests Error

Rate limited. Liquify's limits answer a problem (`MF_SYNC_RATE_LIMITED` is the customer's sync cooldown); the edge's per-caller limit answers with NO body. Either way, wait `Retry-After` seconds.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

### 503 Service Unavailable Error

`PROVIDER_UNAVAILABLE` / `MF_SYNC_PROVIDER_UNAVAILABLE` — a provider did not answer. Retry after `Retry-After` seconds.

- `type` (string, required) — `about:blank` — `code` carries the meaning.
- `title` (string, required)
- `status` (integer, required)
- `detail` (string, optional)
- `instance` (string, optional)
- `code` (string, optional)
- `errors` (list of string, optional) — One entry per field that failed validation.
- `request_id` (string, optional) — Quote it to Liquify support.
- `trace_id` (string, optional)

## Types

### ConsentEvidence

- `purposes` (list of enum, required) — Only the purposes the customer ticked.
  - Allowed values: `KYC_PAN`, `MF_HOLDINGS`, `PARTNER_SHARE`
- `granted` (boolean, required) — `false` relays a withdrawal.
- `captured_at` (datetime, required) — When the customer agreed. Not in the future; relayed within 24 hours.
- `ip` (string, required) — The customer's IP address when they agreed.
- `consent_text_version` (string, required) — The version of Liquify's consent text you showed. Wording you wrote yourself is refused.
- `device` (string, optional) — The customer's user agent or device.

### Customer

- `customer_id` (string, required) — Opaque. Use it on every other call about this customer.
- `created` (boolean, required) — `false` when this was a retry of a create that succeeded.
- `pan_verified_by` (enum, required)
  - Allowed values: `LIQUIFY`, `VENDOR_ATTESTED`

### Meta

- `request_id` (string, required) — Ties a call to Liquify's records; quote it to support.
- `ts` (datetime, required)

## Examples

**Request**

```json
{
  "mobile": "9876543210",
  "pan": "ABCPE1234F",
  "consent": {
    "purposes": [
      "KYC_PAN"
    ],
    "granted": true,
    "captured_at": "2024-01-15T09:30:00Z",
    "ip": "string",
    "consent_text_version": "LIQ-PARTNER-CONSENT-v1"
  }
}
```

**Response**

```json
{
  "data": {
    "customer_id": "string",
    "created": true,
    "pan_verified_by": "LIQUIFY"
  },
  "meta": {
    "request_id": "string",
    "ts": "2024-01-15T09:30:00Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://a7.liquifyfin-uat.in/v1/customers"

payload = {
    "mobile": "9876543210",
    "pan": "ABCPE1234F",
    "consent": {
        "purposes": ["KYC_PAN"],
        "granted": True,
        "captured_at": "2024-01-15T09:30:00Z",
        "ip": "string",
        "consent_text_version": "LIQ-PARTNER-CONSENT-v1"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://a7.liquifyfin-uat.in/v1/customers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mobile":"9876543210","pan":"ABCPE1234F","consent":{"purposes":["KYC_PAN"],"granted":true,"captured_at":"2024-01-15T09:30:00Z","ip":"string","consent_text_version":"LIQ-PARTNER-CONSENT-v1"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://a7.liquifyfin-uat.in/v1/customers"

	payload := strings.NewReader("{\n  \"mobile\": \"9876543210\",\n  \"pan\": \"ABCPE1234F\",\n  \"consent\": {\n    \"purposes\": [\n      \"KYC_PAN\"\n    ],\n    \"granted\": true,\n    \"captured_at\": \"2024-01-15T09:30:00Z\",\n    \"ip\": \"string\",\n    \"consent_text_version\": \"LIQ-PARTNER-CONSENT-v1\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://a7.liquifyfin-uat.in/v1/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"mobile\": \"9876543210\",\n  \"pan\": \"ABCPE1234F\",\n  \"consent\": {\n    \"purposes\": [\n      \"KYC_PAN\"\n    ],\n    \"granted\": true,\n    \"captured_at\": \"2024-01-15T09:30:00Z\",\n    \"ip\": \"string\",\n    \"consent_text_version\": \"LIQ-PARTNER-CONSENT-v1\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://a7.liquifyfin-uat.in/v1/customers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"mobile\": \"9876543210\",\n  \"pan\": \"ABCPE1234F\",\n  \"consent\": {\n    \"purposes\": [\n      \"KYC_PAN\"\n    ],\n    \"granted\": true,\n    \"captured_at\": \"2024-01-15T09:30:00Z\",\n    \"ip\": \"string\",\n    \"consent_text_version\": \"LIQ-PARTNER-CONSENT-v1\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://a7.liquifyfin-uat.in/v1/customers', [
  'body' => '{
  "mobile": "9876543210",
  "pan": "ABCPE1234F",
  "consent": {
    "purposes": [
      "KYC_PAN"
    ],
    "granted": true,
    "captured_at": "2024-01-15T09:30:00Z",
    "ip": "string",
    "consent_text_version": "LIQ-PARTNER-CONSENT-v1"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://a7.liquifyfin-uat.in/v1/customers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"mobile\": \"9876543210\",\n  \"pan\": \"ABCPE1234F\",\n  \"consent\": {\n    \"purposes\": [\n      \"KYC_PAN\"\n    ],\n    \"granted\": true,\n    \"captured_at\": \"2024-01-15T09:30:00Z\",\n    \"ip\": \"string\",\n    \"consent_text_version\": \"LIQ-PARTNER-CONSENT-v1\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "mobile": "9876543210",
  "pan": "ABCPE1234F",
  "consent": [
    "purposes": ["KYC_PAN"],
    "granted": true,
    "captured_at": "2024-01-15T09:30:00Z",
    "ip": "string",
    "consent_text_version": "LIQ-PARTNER-CONSENT-v1"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://a7.liquifyfin-uat.in/v1/customers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```