> For the complete documentation index, see [llms.txt](https://developers.copyfactory.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.copyfactory.io/api/contacts/create-contact.md).

# Create contact

{% hint style="info" %}
Contacts with emails that already exist for the target sequence will now be processed as they are duplicates. You will receive a success message however.
{% endhint %}

## Create a new contact in Copyfactory

<mark style="color:green;">`POST`</mark> `https://app.copyfactory.io/api/v2/contact/`

Create a new contact in Copyfactory.

#### Headers

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

#### Request Body

| Name                                           | Type   | Description                                                                                                                                                                |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email<mark style="color:red;">\*</mark>        | String | The contacts email.                                                                                                                                                        |
| sequence\_id<mark style="color:red;">\*</mark> | int    | The ID of the sequence to add the contact to.                                                                                                                              |
| playbook\_id<mark style="color:red;">\*</mark> | int    | The ID of the playbook you want to run for the contact.                                                                                                                    |
| linkedin\_handle                               | String | The LinkedIn handle of the contact. Required if using data enrichment.                                                                                                     |
| do\_enrichment                                 | Bool   | True/False as to enrich the contact.                                                                                                                                       |
| custom\_fields                                 | Object | Custom fields you wish to add for the contact where the key is the name of the custom field in Copyfactory and the value is the value you want to associate to that field. |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    'data': {'status': 'Contact successfully queued.'}
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location --request POST 'https://app.copyfactory.io/api/v2/contact/' \
--header 'Authorization: API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": 'email@email.com',
    "sequence_id": 0,
    "linkedin_handle": 'https://www.linkedin.com/in/my-handle/',
    "playbook_id": 0,
    "do_enrichment": False,
    "custom_fields": {'custom_field':'Custom value'},
}'
```

{% endtab %}

{% tab title="Python" %}

```
import requests
import json

url = "https://app.copyfactory.io/api/v2/contact/"

payload = json.dumps({
    "email": 'email@email.com',
    "sequence_id": 0,
    "linkedin_handle": 'https://www.linkedin.com/in/my-handle/',
    "playbook_id": 0,
    "do_enrichment": False,
    "custom_fields": {'custom_field':'Custom value'},
})

headers = {
  'Authorization': 'API-KEY',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}
{% endtabs %}
