# 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

<table><thead><tr><th width="249">Name</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Content-Type</code><mark style="color:red;">*</mark></td><td>string</td><td>The content-type must always be set to <code>application/json</code>.</td></tr><tr><td><code>Authorization</code><mark style="color:red;">*</mark></td><td>string</td><td>The API <code>live</code> or <code>test</code> key.</td></tr></tbody></table>

### Path parameters

<table><thead><tr><th width="250">Name</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code><mark style="color:red;">*</mark></td><td>string</td><td>The ID of the custom list.</td></tr></tbody></table>

### Body

<table><thead><tr><th width="249">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>entityType</code><mark style="color:red;">*</mark></td><td>string</td><td>The type of entity. Valid values are: <br>1. <code>person</code><br>2. <code>company</code></td></tr><tr><td><code>names</code><mark style="color:red;">*</mark></td><td>array</td><td>An array of <code>name</code> objects that contain all known aliases for the entity. Also, see the <a href="#the-name-object">names object</a> below.</td></tr><tr><td><code>active</code></td><td>boolean</td><td>Indicates whether the entity is active or not.</td></tr><tr><td><code>gender</code></td><td>string</td><td>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></td></tr><tr><td><code>countries</code></td><td>array</td><td>An array of value pair objects covering known associated <code>countries</code> for entity. Also, see the <a href="#the-countries-object">countries object</a> below.</td></tr><tr><td><code>dates</code></td><td>array</td><td>An array of value pair objects covering important dates associated with the entity. Also, see the <a href="#the-dates-object">dates object</a> below.</td></tr><tr><td><code>images</code></td><td>array</td><td>An array of strings that contain URIs of images for the entity.</td></tr></tbody></table>

#### The `name` object&#x20;

<table><thead><tr><th width="251">Attribute</th><th width="106.06163021868787">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>firstName</code></td><td>string</td><td>The entity's first name. This is <strong>required</strong> when the entity type is <code>person</code>. (Optional)</td></tr><tr><td><code>middleName</code></td><td>string</td><td>The entity's middle name. (Optional)</td></tr><tr><td><code>lastName</code></td><td>string</td><td>The entity's last name. This is <strong>required</strong> when the entity type is <code>person</code>. (Optional)</td></tr><tr><td><code>companyName</code></td><td>string</td><td>The entity's company name. This is <strong>required</strong> when the entity type is <code>company</code>. (Optional)</td></tr><tr><td><code>type</code></td><td>string</td><td><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></td></tr></tbody></table>

#### The `countries` object&#x20;

<table data-header-hidden><thead><tr><th width="150">Attribute</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Attribute</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>country</code></td><td><code>string</code></td><td><p>The <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">two-letter country ISO code</a>. (<strong>Required</strong>)</p><p></p></td></tr><tr><td><code>type</code></td><td><code>string</code></td><td><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></td></tr></tbody></table>

#### The `dates` object&#x20;

<table data-header-hidden><thead><tr><th width="150">Attribute</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Attribute</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>date</code></td><td><code>object</code></td><td><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></td></tr><tr><td><code>type</code></td><td><code>string</code></td><td><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></td></tr></tbody></table>

### 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)" %}

```javascript
{}
```

{% endtab %}
{% endtabs %}
