Contact identity
- 05 Sep 2022
- 4 Minutes to read
- Print
- DarkLight
Contact identity
- Updated on 05 Sep 2022
- 4 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Contact identity
Contact identitiey
Contact identities
- Contact identities ManageGET /contact/contactIdentities/{id}
- Get a single contact identity.POST /contact/contactIdentities:query
- Query contact identities with conditions.POST /contact/contactIdentities
- Create a new Contact identity.PUT /contact/contactIdentities/{id}
- Update the Contact identity.DELETE /contact/contactIdentities/{id}
- Remove the Contact identity.
Contact Identity JSON Format
Contact Identity is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the contact identity. |
type | string | Contact identity type. Allowed values are visitor , Email , SMS , facebook , twitter , wechat , SSOID , externalID , whatsApp , instagram , telegram , line , SecureMessaging . |
value | string | Value of the contact identity. |
avatar | string | The avatar of one identity.The avatar used in a certain channel, like the avatar of a Facebook user. Not every channel yields an avatar. For example, SMS Numbers will not produce one. |
identityInfoUrl | string | The original identity info url. Contact information from the channels. Such as the number of Twitter followers and tweets from the Twitter identity. The info is displayed in an iframe in the agent console. Available for Twitter, Facebook, SMS, and WeChat. |
originalContactPageUrl | string | The contact profile URL on Facebook or Twitter. |
displayName | string | Displayname of the identity. |
Get a single Contact Identity
GET /contact/ContactIdentities/{id}
Parameters
No parameters
Response
Example
Sample Request:
curl https://api11.comm100.io/v4/contact/ContactIdentities/2c6e6dc2-54ac-4ce3-9372-79e8f9763025 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "2c6e6dc2-54ac-4ce3-9372-79e8f9763025",
"contactId": "0f62b349-c924-46f1-bf5a-f2846ae98dd6",
"contactIdentityType": "Email",
"value": "testContact5@gmail.com",
"avatarUrl": "",
"infoUrl": "",
"displayName": "testContact5@gmail.com",
"originalContactPageUrl": "",
"isDeleted": false
}
Query contactidentities with conditions
POST /contact/contactIdentities:query
Parameters
Name Type in Required Description ids
array body no Contact identity id array, if this parameter has value, the value and identityType will be ignored. value
string body no Contact identity value, support fuzzy search. identityType
string body no Contact identity type. Allowed values are visitor
,Email
,SMS
,facebook
,twitter
,wechat
,SSOID
,externalID
,whatsApp
,instagram
,telegram
,line
,SecureMessaging
.isIncludeDeleted
bool body no Whether including the deleted contact or not, default value: false
.Response
The array of Contact Identity.
Example
Sample Request:
curl https://api11.comm100.io/v4/contact/ContactIdentities:query \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"value":"","Ids": "","identityType":"SMS","isIncludeDeleted": false}'
Response:
HTTP/1.1 200 OK
{
"contactIdentities": [
{
"id": "5a1900c6-8329-4d00-86ed-697cdfaa9e8b",
"contactId": "6396ad99-6885-4489-ad95-43c923154a8c",
"contactIdentityType": "SMS",
"value": "+11111111",
"avatarUrl": "",
"infoUrl": "",
"displayName": "+11111111",
"originalContactPageUrl": "",
"isDeleted": false
}
]
}
Create a new Contact identity
POST /contact/contactIdentities
Parameters
Name | Type | in | Required | Description |
---|---|---|---|---|
contactId | guid | body | yes | Id of the contact. |
contactIdentityType | string | body | yes | Contact identity type. Allowed values are visitor , Email , SMS , facebook , twitter , wechat , SSOID , externalID , whatsApp , instagram , telegram , line , SecureMessaging . |
value | string | body | yes | Value of the contact identity. |
avatar | string | body | no | The avatar used in a certain channel, like the avatar of a Facebook user. Not every channel yields an avatar. For example, SMS Numbers will not produce one. |
identityInfoUrl | string | body | no | Contact information from the channels. Such as the number of Twitter followers and tweets from the twitter identity. The info is displayed in an iframe in the agent console. Available for Twitter, Facebook, SMS, and WeChat. |
originalContactPageUrl | string | body | no | The contact profile URL on Facebook or Twitter. |
displayName | string | body | no | Displayname of the identity. |
Response
Example
Sample Request:
curl https://api11.comm100.io/v4/contact/ContactIdentities \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D ' {"contactId":"6396ad99-6885-4489-ad95-43c923154a8c","ContactIdentityType":"whatsApp","value":"destinsation"}'
Response:
HTTP/1.1 200 OK
{
"id": "fe7b794b-4403-48e8-9ee4-6037f7dbcc73",
"contactId": "6396ad99-6885-4489-ad95-43c923154a8c",
"contactIdentityType": "whatsApp",
"value": "destinsation",
"avatarUrl": "",
"infoUrl": "",
"displayName": "destinsation",
"originalContactPageUrl": "",
"isDeleted": false
}
Update the Contact identity
PUT /contact/contactIdentities/{id}
Parameters
Name | Type | in | Required | Description |
---|---|---|---|---|
id | string | path | yes | Id of the contact identity. |
type | string | body | yes | Contact identity type. Allowed values are visitor , Email , SMS , facebook , twitter , wechat , SSOID , externalID , whatsApp , instagram , telegram , line , SecureMessaging . |
value | string | body | yes | Value of the contact identity. |
avatar | string | body | no | The avatar used in a certain channel, like the avatar of a Facebook user. Not every channel yields an avatar. For example, SMS Numbers will not produce one. |
identityInfoUrl | string | body | no | Contact information from the channels. Such as the number of Twitter followers and tweets from the twitter identity. The info is displayed in an iframe in the agent console. Available for Twitter, Facebook, SMS, and WeChat. |
originalContactPageUrl | string | body | no | The contact profile URL on Facebook or Twitter. |
displayName | string | body | no | Displayname of the identity. |
Response
Example
Sample Request:
curl https://api11.comm100.io/v4/contact/ContactIdentities/760a3dfb-f776-4dc8-99cb-7fb288bdf1eb \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"contactId": "6396ad99-6885-4489-ad95-43c923154a8c","contactIdentityType": "visitor","value": "6396ad99-6885-4489-ad95-43c923154a82","avatarUrl": "","infoUrl": "","displayName": "6396ad99-6885-4489-ad95-43c923154a81","originalContactPageUrl": "","isDeleted": false}'
Response:
HTTP/1.1 200 OK
{
"id": "52db5dc8-607c-4eb1-b9eb-93aaec86bb39",
"contactId": "6396ad99-6885-4489-ad95-43c923154a8c",
"contactIdentityType": "visitor",
"value": "6396ad99-6885-4489-ad95-43c923154a81",
"avatarUrl": "",
"infoUrl": "",
"displayName": "6396ad99-6885-4489-ad95-43c923154a81",
"originalContactPageUrl": "",
"isDeleted": false
}
Remove the Contact identity
DELETE /contact/contactIdentities/{id}
Parameters
No Parameters
Response
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/contact/ContactIdentities/52db5dc8-607c-4eb1-b9eb-93aaec86bb39 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?