Back to API List
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-contactsContent-Type application/jsonAuthorization auth: {{JWT}} See How to generate the JWT Token API Scope Configuration
Path Parameters
Parameter Description Type hostEnvironment URL, for example, https://platform.kore.ai string, required botIdBotId or StreamId. You can get it from the App Settings page. string, required contactsContact details. For example, firstName, salutation, cellPhoneNumber, cellPhoneCountryCode, cellPhoneExtension. string, required
Sample CSV File
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"'
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.
Body Parameters
Parameter Description Type firstNameThe first name of the contact. string, required lastNameThe last name of the contact. string, required salutationThe salutation (Mr. or Mrs.) of the contact. string, required cellPhoneNumberThe phone number of the contact. string, required cellPhoneCountryCodeThe country code of the contact. string, required cellPhoneExtensionThe 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"
}
]