Back to API List
Use this API to create a contact with the given stream ID.
Method POST Endpoint https://{host}/agentassist/api/v1/public/{{streamId}}/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 access it from the App Settings page of the bot. string, required accountIdYour Account ID. string, required contactsContact details, for example, firstName, salutation, phoneNumber, countryCode, extension. string, required
Sample Request
curl --location --request POST 'https://{{host}}/agentassist/api/v1/public/{{streamId}}/contacts' \
--header 'auth: {jwt-code}' \
--header 'accountId:123456789'
--header 'Content-Type: application/json' \
[
{
"firstName": "John",
"lastName": "Doe",
"salutation": "Mr",
"cellPhone": {
"phoneNumber": "98765xxxxx",
"countryCode": "+91",
"extension": "+"
}
}
]
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.
Header Description Required/Optional authJWT token for authentication. required accountIdThe account ID associated with the API request. required
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 cellPhone.phoneNumberThe phone number of the contact in numeric digits without any special characters or alphabets. string, required cellPhone.countryCodeThe country code of the contact. string, required cellPhone.extensionThe extension of the contact. string, required
Sample Response
[
{
"status": "ACTIVE",
"firstName": "John",
"lastName": "Doe",
"salutation": "Mr",
"cellPhone": {
"phoneNumber": "+9198765xxxxx",
"countryCode": "+91",
"extension": "+"
},
"createdBy": "u-5304b2ff-3647-53eb-9ef1-7ae63175xxxx",
"orgId": "o-acccb4e7-4378-564e-9822-3f5f8bf3xxxx",
"accountId": "635ba2bbec8cd28846c7xxxx",
"instanceBotId": "st-2c7f48ca-fe7c-5778-a903-2854a94cxxxx",
"fullName": "John Doe",
"address": [],
"twitterDetails": [],
"createdAt": "2023-01-18T10:21:05.318Z",
"updatedAt": "2023-01-18T10:21:05.318Z",
"id": "63c7c8119187ebc8bae1xxxx"
}
]