> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Bulk Contacts API

<Badge icon="arrow-left" color="gray">[Back to API List](/ai-for-service/apis/contact-center/api-list)</Badge>

Use this API to create bulk contacts from a CSV file with the given stream ID.

| **Method**        | POST                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **Endpoint**      | `https://{host}/agentassist/api/v1/public/{{botId}}/contacts/import-contacts`                                                  |
| **Content-Type**  | `application/json`                                                                                                             |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token) |
| **API Scope**     | Configuration                                                                                                                  |

## Path Parameters

| **Parameter** | **Description**                                                                                                 | **Type**         |
| ------------- | --------------------------------------------------------------------------------------------------------------- | ---------------- |
| `host`        | Environment URL, for example, `https://platform.kore.ai`                                                        | string, required |
| `botId`       | BotId or StreamId. You can get it from the App Settings page.                                                   | string, required |
| `contacts`    | Contact details. For example, firstName, salutation, cellPhoneNumber, cellPhoneCountryCode, cellPhoneExtension. | string, required |

## Sample CSV File

<img src="https://mintcdn.com/koreai/uOHa4KyjBsfDPFD4/ai-for-service/apis/contact-center/images/sample-csv-file.png?fit=max&auto=format&n=uOHa4KyjBsfDPFD4&q=85&s=c3621c131474dd81a320852d25e01306" alt="Sample CSV File" width="1062" height="108" data-path="ai-for-service/apis/contact-center/images/sample-csv-file.png" />

## Sample Request

```
curl --location --request POST
     'https://{{host}}/agentassist/api/v1/public/{{IID}}/contacts/import-contacts' \
      --header 'authority: smartassist.kore.ai' \
      --header 'accept: application/json, text/plain, */*' \
      --header 'accountid: 63c7ebae6a2aef36de8fxxxx' \
      --header 'content-type: application/json;charset=UTF-8' \
      --header 'auth: <token>' \
      --form 'result_file=@"/home/johnsmith/Documents/john/sample.csv"'
```

<Note>
  Saving contacts through the public API allows duplicate names with different numbers but prevents the same number from being associated with different or identical names. Backward compatibility to delete existing duplicate numbers will not be provided.
</Note>

## Body Parameters

| **Parameter**          | **Description**                              | **Type**         |
| ---------------------- | -------------------------------------------- | ---------------- |
| `firstName`            | The first name of the contact.               | string, required |
| `lastName`             | The last name of the contact.                | string, required |
| `salutation`           | The salutation (Mr. or Mrs.) of the contact. | string, required |
| `cellPhoneNumber`      | The phone number of the contact.             | string, required |
| `cellPhoneCountryCode` | The country code of the contact.             | string, required |
| `cellPhoneExtension`   | The extension of the contact.                | string, required |

## Sample Response

```
[
  {
    "status": "ACTIVE",
    "firstName": "john",
    "lastName": "doe",
    "salutation": "Mr",
    "accountId": "63ab016b0d909c22b2daxxxx",
    "orgId": "o-dd99e2e4-476f-5aa6-90ad-bd7a0b9bxxxx",
    "createdBy": "u-79cda73a-5947-536f-a1cc-3e939e84xxxx",
    "cellPhone": {
          "phoneNumber": "+9198765xxxxx",
          "countryCode": "+91",
          "extension": "+"
        },
        "fullName": "john doe",
        "address": [],
        "twitterDetails": [],
        "createdAt": "2023-01-18T10:53:35.622Z",
        "updatedAt": "2023-01-18T10:53:35.622Z",
        "id": "63c7cfaf196ce928529bxxxx"
  },
  {
    "status": "ACTIVE",
    "firstName": "jane",
    "lastName": "doe",
    "salutation": "Mrs",
    "accountId": "63ab016b0d909c22b2daxxxx",
    "orgId": "o-dd99e2e4-476f-5aa6-90ad-bd7a0b9bxxxx",
    "createdBy": "u-79cda73a-5947-536f-a1cc-3e939e84xxxx",
    "cellPhone": {
       "phoneNumber": "+9112345xxxxx",
       "countryCode": "+91",
       "extension": "91"
   },
   "fullName": "jane doe",
   "address": [],
   "twitterDetails": [],
   "createdAt": "2023-01-18T10:53:35.622Z",
   "updatedAt": "2023-01-18T10:53:35.622Z",
   "id": "63c7cfaf196ce928529bxxxx"
  }
]
```
