> For the complete documentation index, see [llms.txt](https://docs-vnext.kiflo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-vnext.kiflo.com/developers/api-reference/customers/create-customer.md).

# Create customer

Create a new customer and optionnaly associate it with an existing partner.

**Examples:**\
To associate the customer with the partner ID 42, set the `partnerId` property to be:\
`"partnerId": 42`

If the customer comes from your website via a referral link shared by a partner and you want to associate it with the correct partner, use the HTTP header:\
`Kiflo-Tracking-Code: AABBCCDDEEFF+=`\
The \*\* tracking code\*\* can be retrieved in javascript from your website using the JS SDK. Please referer to the[JS SDK documentation](https://docs.kiflo.com/category/26-js-sdk).

```json
{"openapi":"3.0.1","info":{"title":"Kiflo Public API v3","version":"v3"},"security":[{"oauth2":["Customer.Create","Api"]}],"components":{"securitySchemes":{},"schemas":{"CustomerCreateRequestDto":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":{"nullable":true},"nullable":true},"partnerId":{"type":"integer","format":"int32","nullable":true},"source":{"$ref":"#/components/schemas/CustomerSource"},"status":{"$ref":"#/components/schemas/CustomerStatus"}},"additionalProperties":false},"CustomerSource":{"enum":["Unknown","OnlineReferral","Lead","Deal"],"type":"string"},"CustomerStatus":{"enum":["Unknown","New","Paying","Canceled"],"type":"string"},"CustomerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"creationDate":{"type":"string","format":"date-time"},"properties":{"type":"object","additionalProperties":{"nullable":true},"nullable":true},"sourcePartnerId":{"type":"integer","format":"int32","nullable":true},"sourceLeadId":{"type":"integer","format":"int32","nullable":true},"status":{"$ref":"#/components/schemas/CustomerStatus"},"source":{"$ref":"#/components/schemas/CustomerSource"},"isDeleted":{"type":"boolean"},"deletionDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}},"paths":{"/v3/customers":{"post":{"tags":["Customers"],"summary":"Create customer","description":" Create a new customer and optionnaly associate it with an existing partner.  \r\n \r\n **Examples:**  \r\n To associate the customer with the partner ID 42, set the `partnerId` property to be:  \r\n `\"partnerId\": 42`    \r\n  \r\n If the customer comes from your website via a referral link shared by a partner and you want to associate it with the correct partner, use the HTTP header:  \r\n `Kiflo-Tracking-Code: AABBCCDDEEFF+=`  \r\nThe ** tracking code** can be retrieved in javascript from your website using the JS SDK. Please referer to the[JS SDK documentation](https://docs.kiflo.com/category/26-js-sdk).","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CustomerCreateRequestDto"}},"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreateRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/CustomerCreateRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CustomerCreateRequestDto"}}}},"responses":{"200":{"description":"Customer created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDto"}}}},"400":{"description":"Invalid request"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-vnext.kiflo.com/developers/api-reference/customers/create-customer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
