To create a contact with the given stream Id.
Method |
POST |
Endpoint |
https://{host}/agentassist/api/v1/public/{{streamId}}/contacts |
Content Type |
application/json |
Authorization |
auth: {{JWT}}
See How to generate the JWT Token. |
API Scope |
Configuration |
Path Parameters
Parameter |
Description |
Type |
host |
Environment URL, for example, https://smartassist.kore.ai |
String, Required |
BotId |
BotId or StreamId. You can access it from the General Settings page of the bot. |
String, Required |
accountId |
Your Account ID. |
String, Required |
contacts |
Contact 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": "+"
}
}
]
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 |
cellPhone.phoneNumber |
The phoneNumber of the contact in numeric digits without any special characters or alphabets.
|
String, Required |
cellPhone.countryCode |
The countryCode of the contact |
String, Required |
cellPhone.extension |
The 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"
}
]