Contact

Contacts
- Contacts Manage
POST global/contacts
PUT global/contacts/{id}
DELETE global/contacts/{id}
Model
Contact JSON Format

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

Name Type Description
id guid Id of the contact.
name string Contact Name can be edited by Agents. Default value is read from the first Identity. Only when a Contact sends a message in a specific channel that has a Name and an Avatar, like a Facebook Account, will the display Name and Avatar be used instead of the drawn from the contact profile. In all other situations, display will be drawn from the Contact Name and Avatar.
description string Description of the contact.
firstName string First Name of the contact.
lastName string Last Name of the contact.
alias string Alias of the contact.
title string Title of the contact.
company string Company name.
fax string Contact fax number.
phone string Contact phone number.
mailingAddress string Mailing address of the contact.
city string City where the contact is loacated.
stateOrProvince string State/Province where the contact is located.
countryOrRegion string Country/Region where the contact is located.
postalOrZipCode string Postal/Zip Code where the contact is located.
createTime datetime When the contact was created.
lastUpdatedTime datetime The time of the last update time.
mergeToContactId guid Contact id which the contact merged to.
contactIdentities contactIdentities[] Reference to Contact identity.
Endpoint
Create a new Contact

POST global/contacts

Parameters:
Name Type In Required Description
name string body yes Contact Name can be edited by Agents. Default value is read from the first Identity. Only when a Contact sends a message in a specific channel that has a Name and an Avatar, like a Facebook Account, will the display Name and Avatar be used instead of the drawn from the contact profile. In all other situations, display will be drawn from the Contact Name and Avatar.
description string body no Description of the contact.
firstName string body no First Name of the contact.
lastName string body no Last Name of the contact.
alias string body no Alias of the contact.
title string body no Title of the contact.
company string body no Company name.
fax string body no Contact fax number.
phone string body no Contact phone number.
mailingAddress string body no Mailing address of the contact.
city string body no City where the contact is loacated.
stateOrProvince string body no State/Province where the contact is located.
countryOrRegion string body no Country/Region where the contact is located.
postalOrZipCode string body no Postal/Zip Code where the contact is located.
createTime datetime body no When the contact was created.
lastUpdatedTime datetime body no The time of the last update time.
mergeToContactId guid body no Contact id which the contact merged to.
contactIdentities contactIdentities[] body no The list of contact identities.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/contacts \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Vincent","description":"","firstName":"Vincent","lastName":"Crabbe","alias":"Vinc","title":"Manager","company":"Comm100","fax":"55666857","phone":"13970857965","mailingAddress":"andy@comm100.com","city":"NewYork","stateOrProvince":"Seattle","countryOrRegion":"NE","postalOrZipCode":"54728","createTime":"2021-04-16T10:05:38.7593288Z","lastUpdatedTime":"2021-04-16T10:05:38.7593288Z","mergeToContactId":"0c1f4b21-2de3-44d5-b1cf-18d4a0c2f4d7","contactIdentities":[{"contactIdentityType":"Twitter","name":"Vincent","value":"1361654692588728354","avatarUrl":"https://dash11.comm100.com/api/v4/chatbot/images/42dwdaww-92e6-4487-a2e8-92e68d6892e6","infoUrl":"https://dash17.comm100.io/api/twitterapp/platform/users?uid=1831584982944736245","screenName":"@Comm100Corp","originalContactPageUrl":"https://twitter.com/Vincent42"}]}'

Response:

 HTTP/1.1 201 Created

{"id":"bfa01e62-4691-401f-8105-96bf2b5e6c41","name":"Vincent","description":"","firstName":"Vincent","lastName":"Crabbe","alias":"Vinc","title":"Manager","company":"Comm100","fax":"55666857","phone":"13970857965","mailingAddress":"andy@comm100.com","city":"NewYork","stateOrProvince":"Seattle","countryOrRegion":"NE","postalOrZipCode":"54728","createTime":"2021-04-16T10:05:38.7593288Z","lastUpdatedTime":"2021-04-16T10:05:38.7593288Z","mergeToContactId":"0c1f4b21-2de3-44d5-b1cf-18d4a0c2f4d7","contactIdentities":[{"id":"b5333222-094e-4cb9-b190-9dccccb37c70","contactId":"1d090a45-14cf-4613-a7f8-c07ee90a2f5f","contactIdentityType":"Twitter","name":"Vincent","value":"1361654692588728354","avatarUrl":"https://dash11.comm100.com/api/v4/chatbot/images/42dwdaww-92e6-4487-a2e8-92e68d6892e6","infoUrl":"https://dash17.comm100.io/api/twitterapp/platform/users?uid=1831584982944736245","screenName":"@Comm100Corp","originalContactPageUrl":"https://twitter.com/Vincent42"}]}
Update the Contact

PUT global/contacts/{id}

Parameters:
Name Type In Required Description
name string body yes Contact Name can be edited by Agents. Default value is read from the first Identity. Only when a Contact sends a message in a specific channel that has a Name and an Avatar, like a Facebook Account, will the display Name and Avatar be used instead of the drawn from the contact profile. In all other situations, display will be drawn from the Contact Name and Avatar.
description string body no Description of the contact.
firstName string body no First Name of the contact.
lastName string body no Last Name of the contact.
alias string body no Alias of the contact.
title string body no Title of the contact.
company string body no Company name.
fax string body no Contact fax number.
phone string body no Contact phone number.
mailingAddress string body no Mailing address of the contact.
city string body no City where the contact is loacated.
stateOrProvince string body no State/Province where the contact is located.
countryOrRegion string body no Country/Region where the contact is located.
postalOrZipCode string body no Postal/Zip Code where the contact is located.
createTime datetime body no When the contact was created.
lastUpdatedTime datetime body no The time of the last update time.
mergeToContactId guid body no Contact id which the contact merged to.
contactIdentities contactIdentities[] body no The list of contact identities.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/contacts/bfa01e62-4691-401f-8105-96bf2b5e6c41 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Vincent","description":"","firstName":"Vincent","lastName":"Crabbe","alias":"Vinc","title":"Manager","company":"Comm100","fax":"55666857","phone":"13970857965","mailingAddress":"andy@comm100.com","city":"NewYork","stateOrProvince":"Seattle","countryOrRegion":"NE","postalOrZipCode":"54728","createTime":"2021-04-16T10:05:38.7593288Z","lastUpdatedTime":"2021-04-16T10:05:38.7593288Z","mergeToContactId":"0c1f4b21-2de3-44d5-b1cf-18d4a0c2f4d7","contactIdentities":[{"contactIdentityType":"Twitter","name":"Vincent","value":"1361654692588728354","avatarUrl":"https://dash11.comm100.com/api/v4/chatbot/images/42dwdaww-92e6-4487-a2e8-92e68d6892e6","infoUrl":"https://dash17.comm100.io/api/twitterapp/platform/users?uid=1831584982944736245","screenName":"@Comm100Corp","originalContactPageUrl":"https://twitter.com/Vincent42"}]}'

Response:

 HTTP/1.1 200 OK

{"id":"bfa01e62-4691-401f-8105-96bf2b5e6c41","name":"Vincent","description":"","firstName":"Vincent","lastName":"Crabbe","alias":"Vinc","title":"Manager","company":"Comm100","fax":"55666857","phone":"13970857965","mailingAddress":"andy@comm100.com","city":"NewYork","stateOrProvince":"Seattle","countryOrRegion":"NE","postalOrZipCode":"54728","createTime":"2021-04-16T10:05:38.7593288Z","lastUpdatedTime":"2021-04-16T10:05:38.7593288Z","mergeToContactId":"0c1f4b21-2de3-44d5-b1cf-18d4a0c2f4d7","contactIdentities":[{"id":"b5333222-094e-4cb9-b190-9dccccb37c70","contactId":"1d090a45-14cf-4613-a7f8-c07ee90a2f5f","contactIdentityType":"Twitter","name":"Vincent","value":"1361654692588728354","avatarUrl":"https://dash11.comm100.com/api/v4/chatbot/images/42dwdaww-92e6-4487-a2e8-92e68d6892e6","infoUrl":"https://dash17.comm100.io/api/twitterapp/platform/users?uid=1831584982944736245","screenName":"@Comm100Corp","originalContactPageUrl":"https://twitter.com/Vincent42"}]}
Remove the Contact

DELETE global/contacts/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/global/contacts/bfa01e62-4691-401f-8105-96bf2b5e6c41 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content