> For the complete documentation index, see [llms.txt](https://doc.youverify.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.youverify.co/api-reference-sdk/api-reference/entity-management/create-entity.md).

# Create Entity

This endpoint allows you to create an new entity using PII (Personally Identifiable Information), this can either be a business or an individual.

<mark style="color:green;">`POST`</mark> `{{baseurl}}/v2/api/entities`

#### Headers

| Name                                    | Type   | Description      |
| --------------------------------------- | ------ | ---------------- |
| token<mark style="color:red;">\*</mark> | String | API secret token |

#### Request Body

| Field                                              | Type    | Description                                                                                                                                                                            |
| -------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| entityType<mark style="color:red;">\*</mark>       | String  | <p>Type of entity being verified.</p><p>Allowed values: <mark style="color:$danger;"><code>"individual"</code></mark>, <mark style="color:$danger;"><code>"business"</code></mark></p> |
| isSubjectConsent<mark style="color:red;">\*</mark> | Boolean | <p>Must always be true; indicates subject consent was obtained.</p><p>Allowed values: <mark style="color:$danger;"><code>true</code></mark></p>                                        |
| incorporationNumber                                | String  | Registration/Incorporation number, Required if entityType is "business".                                                                                                               |
| incorporationName                                  | String  | Registered Name of business, Required if entityType is "business".                                                                                                                     |
| incorporationCountry                               | String  | 2-letter country code; allowed only for businesses.                                                                                                                                    |
| incorporationDate                                  | String  | Incorporation date in <mark style="color:$danger;">`YYYY-MM-DD`</mark> format; allowed only for businesses.                                                                            |
| businessType                                       | String  | Business type; allowed only for businesses.                                                                                                                                            |
| address                                            | String  | Business address; allowed only for businesses.                                                                                                                                         |
| docLink                                            | String  | Certificate of incorporation or business registration document; allowed only for businesses.                                                                                           |
| firstName                                          | String  | Individual's first name(Required for individual entity).                                                                                                                               |
| lastName                                           | String  | Individual's last name(Required for individual entity).                                                                                                                                |
| phone                                              | String  | Individual's phone number(Required for individual entity).                                                                                                                             |
| email                                              | String  | Individual's email                                                                                                                                                                     |
| gender                                             | String  | Individual's gender.                                                                                                                                                                   |
| dateOfBirth                                        | String  | Individual's date of birth in <mark style="color:$danger;">`YYYY-MM-DD`</mark> format(Required for individual entity).                                                                 |
| nationality                                        | String  | 2-letter country code(Required for individual entity).                                                                                                                                 |
| imageUrl                                           | String  | Link to uploaded image                                                                                                                                                                 |
| verifiedBy                                         | String  | <p>Flag to ensure customer attests to validity of provided records.</p><p>Allowed values: <mark style="color:$danger;"><code>"client"</code></mark></p>                                |

{% tabs %}
{% tab title="Create New Entity Sample Request (Individual)" %}

```json
{
    "entityType": "individual",
    "isSubjectConsent": true,
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "phone": "+2348012345678",
    "gender": "male",
    "dateOfBirth": "1990-01-01",
    "nationality": "NG",
    "imageUrl": "http://someimage",
    "verifiedBy": "client"
}
```

{% endtab %}

{% tab title="Create New Entity Sample Request (Business)" %}

```json
{
  "entityType": "business",
  "isSubjectConsent": true,
  "incorporationNumber": "RC123456",
  "incorporationName": "Acme Ltd.",
  "incorporationCountry": "NG",
  "incorporationDate": "2010-05-15",
  "businessType": "Retail",
  "address": "23 Ikoyi Crescent, Lagos"
  "regDocLink": "https://example.com/regdoc.pdf",
  "verifiedBy": "client"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Success Response" %}

```json
{
  "success": true,
  "status_code": 201,
  "message": "Entity created successfully.",
  "data": {
     "id": "ent_684f5cc5a47a3926763b83a7",
        "businessId": "61d880f1e8e15aaf24558f1a",
        "createdBy": {
            "firstName": "Timothy",
            "lastName": "Akinyelu",
            "middleName": "",
            "id": "61f162ec1fd251c3a63f31c2"
        }
  }
}
```

{% endtab %}

{% tab title="Error Response" %}

```json
HTTP/1.1 404 NotFound
{
  "success": false,
  "statusCode": 404,
  "message": "You have attempted to get a resource that does not exist.",
  "name": "ResourceNotFoundError",
  "data": {}
}
```

{% endtab %}
{% endtabs %}


---

# 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://doc.youverify.co/api-reference-sdk/api-reference/entity-management/create-entity.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.
