# Contacts

The contact's APIs are primarily used to interact with the BoldSign application to create, update, delete and get contact details. This section demonstrates how to create contact, update contact details, delete contact details, get contact details and get contact list from your Organizations.
## Create contact

{% post /%}
{% path text="/v1/contacts/create" /%}

The create contact API is used to add contact details for adding signer details while creating document in BoldSign Application with their unique email address.

### Code snippet

{% codetab %}

cURL

```shell
curl -X POST 'https://api.boldsign.com/v1/contacts/create' \
-H 'accept: */*' \
-H 'X-API-KEY: {your API key}' \
-H 'Content-Type: application/json' \
-d '[
    {
        "Email": "luthercooper@cubeflakes.com",
        "Name": "LutherCooper",
        "PhoneNumber": {
             "CountryCode": "+1",
             "Number": "2015550123"
        },
        "JobTitle": "Developer",
        "CompanyName": "CubeFlakes"
    },
    {
        "Email": "hankwhite@cubeflakes.com",
        "Name": "HankWhite",
        "PhoneNumber": {
             "CountryCode": "+1",
             "Number": "2015550124"
        },
        "JobTitle": "Manager",
        "CompanyName": "CubeFlakes"
    }
]'
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var contactClient = new ContactClient(apiClient);

var contactDetails = new List<ContactDetails>()
{
    new ContactDetails()
    {
        Email = "luthercooper@cubeflakes.com",
        Name = "LutherCooper"
    },
};

var contactCreated = contactClient.CreateContact(contactDetails);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    contacts_api = boldsign.ContactsApi(api_client)
	
    contact_details = boldsign.ContactDetails(
        email="luthercooper@cubeflakes.com",
        name="LutherCooper")
    
    contact_created = contacts_api.create_contact([contact_details])
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\ContactsApi;
use BoldSign\Model\{ContactDetails, PhoneNumber};

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$contacts_api = new ContactsApi($config);

$create_contact = new ContactDetails();
$create_contact->setEmail('luthercooper@cubeflakes.com');
$create_contact->setName('LutherCooper');
$contact_details = array($create_contact);

$contact_created = $contacts_api->createContact($contact_details);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
            
ContactsApi contactsApi = new ContactsApi(client);

ContactDetails contactDetails = new ContactDetails();
contactDetails.setEmail("luthercooper@cubeflakes.com");
contactDetails.setName("LutherCooper");

CreateContactResponse contactCreated = contactsApi.createContact(Arrays.asList(contactDetails));
```

NodeJS

```js
import { ContactsApi, ContactDetails } from "boldsign";

const contactsApi = new ContactsApi("https://api.boldsign.com");
contactsApi.setApiKey("YOUR_API_KEY");

const contactDetails = new ContactDetails();
contactDetails.name = "LutherCooper";
contactDetails.email = "luthercooper@cubeflakes.com";

const contactCreated = contactsApi.createContact([contactDetails]);
```

{% /codetab %}

### Request body

{% nestedtable %}

- {% arguments name="Email" /%}{% batch datatype="string" /%}{% required /%}
- The email address of the user.

---

- {% arguments name="Name" /%}{% batch datatype="string" /%}{% required /%}
- The name of the user

---

- {% arguments name="PhoneNumber" /%}{% batch datatype="object" /%}
- The Phone Number of user
  {% nestedtable %}

    - {% arguments name="CountryCode" /%}{% batch datatype="string" /%}
    - This property represents the country code associated with the phone number.

  ---

    - {% arguments name="Number" /%}{% batch datatype="string" /%}
    - This property represents the actual phone number.

  {% /nestedtable %}

---

- {% arguments name="JobTitle" /%}{% batch datatype="string" /%}
- The jobTitle of the user

---

- {% arguments name="CompanyName" /%}{% batch datatype="string" /%}
- The companyName of the user

{% /nestedtable %}

### Example response

**_200 Success_**

```json
{
  "contacts": [
    {
      "id": "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_ErZHN",
      "email": "luthercooper@cubeflakes.com"
    },
    {
      "id": "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_GsSVP",
      "email": "hankwhite@cubeflakes.com"
    }
  ]
}
```
