Contact identity
  • 05 Sep 2022
  • 4 Minutes to read
  • Dark
    Light

Contact identity

  • Dark
    Light

Article Summary

Contact identity

Contact identitiey

Contact Identity JSON Format

Contact Identity is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the contact identity.
typestringContact identity type. Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging.
valuestringValue of the contact identity.
avatarstringThe 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.
identityInfoUrlstringThe 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.
originalContactPageUrlstringThe contact profile URL on Facebook or Twitter.
displayNamestringDisplayname of the identity.

Get a single Contact Identity

GET /contact/ContactIdentities/{id}

  • Parameters

No parameters

  • Response

Contact Identity

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

    NameTypeinRequiredDescription
    idsarraybodynoContact identity id array, if this parameter has value, the value and identityType will be ignored.
    valuestringbodynoContact identity value, support fuzzy search.
    identityTypestringbodynoContact identity type. Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging.
    isIncludeDeletedboolbodynoWhether 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

NameTypeinRequiredDescription
contactIdguidbodyyesId of the contact.
contactIdentityTypestringbodyyesContact identity type. Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging.
valuestringbodyyesValue of the contact identity.
avatarstringbodynoThe 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.
identityInfoUrlstringbodynoContact 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.
originalContactPageUrlstringbodynoThe contact profile URL on Facebook or Twitter.
displayNamestringbodynoDisplayname of the identity.
  • Response

Contact Identity

  • 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

NameTypeinRequiredDescription
idstringpathyesId of the contact identity.
typestringbodyyesContact identity type. Allowed values are visitor, Email, SMS, facebook, twitter, wechat, SSOID, externalID, whatsApp, instagram, telegram, line, SecureMessaging.
valuestringbodyyesValue of the contact identity.
avatarstringbodynoThe 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.
identityInfoUrlstringbodynoContact 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.
originalContactPageUrlstringbodynoThe contact profile URL on Facebook or Twitter.
displayNamestringbodynoDisplayname of the identity.
  • Response

Contact Identity

  • 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?