> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/tools/custom-lists/add-entity-to-custom-list.md). Agents can also search and read this documentation through its [MCP server](https://docs.complycube.com/documentation/~gitbook/mcp).

# Add entity to custom list

### URL

<mark style="color:green;">**POST**</mark> `https://api.complycube.com/v1/customLists/:id/records`

Adds an entity (**person** or **company**) to the specified custom list.

### Headers

| Name                                              | Type   | Description                                                |
| ------------------------------------------------- | ------ | ---------------------------------------------------------- |
| `Content-Type`<mark style="color:red;">\*</mark>  | string | The content-type must always be set to `application/json`. |
| `Authorization`<mark style="color:red;">\*</mark> | string | The API `live` or `test` key.                              |

### Path parameters

| Name                                   | Type   | Description                |
| -------------------------------------- | ------ | -------------------------- |
| `id`<mark style="color:red;">\*</mark> | string | The ID of the custom list. |

### Body

| Name                                           | Type    | Description                                                                                                                                                                  |
| ---------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entityType`<mark style="color:red;">\*</mark> | string  | <p>The type of entity. Valid values are:<br>1. <code>person</code><br>2. <code>company</code></p>                                                                            |
| `names`<mark style="color:red;">\*</mark>      | array   | An array of `name` objects that contain all known aliases for the entity. Also, see the [names object](#the-name-object) below.                                              |
| `active`                                       | boolean | Indicates whether the entity is active or not.                                                                                                                               |
| `gender`                                       | string  | <p>The gender. Only applicable when entity type is <code>person</code>. Valid values include:<br>1. <code>male</code><br>2. <code>female</code><br>3. <code>other</code></p> |
| `countries`                                    | array   | An array of value pair objects covering known associated `countries` for entity. Also, see the [countries object](#the-countries-object) below.                              |
| `dates`                                        | array   | An array of value pair objects covering important dates associated with the entity. Also, see the [dates object](#the-dates-object) below.                                   |
| `images`                                       | array   | An array of strings that contain URIs of images for the entity.                                                                                                              |

#### The `name` object

| Attribute     | Type   | Description                                                                                                                                                                                                                                            |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `firstName`   | string | The entity's first name. This is **required** when the entity type is `person`. (Optional)                                                                                                                                                             |
| `middleName`  | string | The entity's middle name. (Optional)                                                                                                                                                                                                                   |
| `lastName`    | string | The entity's last name. This is **required** when the entity type is `person`. (Optional)                                                                                                                                                              |
| `companyName` | string | The entity's company name. This is **required** when the entity type is `company`. (Optional)                                                                                                                                                          |
| `type`        | string | <p>The entity's name type. Valid values include:</p><ol><li><code>primary</code></li><li><code>alias</code></li><li><code>maiden\_name</code></li><li><code>localised\_name</code></li><li><code>low\_quality\_alias</code></li></ol><p>(Optional)</p> |

#### The `countries` object

| **Attribute** | **Type** | **Description**                                                                                                                                                                                                  |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `country`     | `string` | The [two-letter country ISO code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). (**Required**)                                                                                                              |
| `type`        | `string` | <p>The entity's country type. Valid string values include:</p><ol><li>"Jurisdiction"</li><li>''Resident of''</li><li>"Citizenship"</li><li>"Country of Registration"</li></ol><p>(<strong>Required</strong>)</p> |

#### The `dates` object

| **Attribute** | **Type** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `date`        | `object` | <p>The date in a structured format. The date object has the following attributes:</p><ol><li><code>day</code>: The day of the month. Value range "01" to "31", passed as <strong>string</strong>.</li><li><code>month</code>: The month. Value range "1" to "12", passed as <strong>string</strong>.</li><li><code>year</code>: The year, in YYYY format, passed as <strong>string</strong>.</li></ol><p>(<strong>Required</strong>)</p> |
| `type`        | `string` | <p>The entity's date type. Valid string values include:</p><ol><li>"Date of Birth"</li><li>''Date of Registration''</li></ol><p>(<strong>Required</strong>)</p>                                                                                                                                                                                                                                                                          |

### Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/customLists/{:customListId}/records \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
            "entityType": "person",
            "names": [
              {
                "type": "primary",
                "firstName": "John",
                "lastName": "Smith"
              },
              {
                "type": "alias",
                "firstName": "John",
                "lastName": "Smyth"
              }
            ],
            "active": true,
            "gender": "male",
            "countries": [
              {
                "type": "Jurisdiction",
                "country": "US"
              },
              {
                "type": "Resident of",
                "country": "GB"
              }
            ],
            "dates": [
              {
                "type": "Date of Birth",
                "date": {
                  "day": "01",
                  "month": "01",
                  "year": "1987"
                }
              }
            ],
            "images": [
              "https://www.example.com/johnDoe.jpg"
            ]
      }'
```

{% endtab %}
{% endtabs %}

### Example response

{% tabs %}
{% tab title="Success (200)" %}

```json
{}
```

{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.complycube.com/documentation/api-reference/tools/custom-lists/add-entity-to-custom-list.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
