To create a single contact you need to submit a JSON object to the URL
https://contacts.8x8.com/accounts/{accountId}/contacts
Request:
POST /accounts/{accountId}/contacts
Request body:
{
"firstName": "Chathuranga",
"lastName": "Pathirana",
"externalId": "externalSystemId",
"country": "SG",
"groups": [
{ "id": 72 },
{ "id": 82 }
],
"addresses": {
"msisdn": "6580000000",
"weChatUserId": "oJQxo6XXXXXXXXXXXXXXXXX",
"facebookUserId": "19520000000000",
"email": "[email protected]"
},
"customAttributes": {
"company": "Google",
"jobTitle": "CEO"
}
}
Response:
Returns 201 Created with location header if the request was successful. If the request failed, an error object will be returned.
Response example:
Location = https://contacts.8x8.com/api/v1/accounts/8x8Demo/contacts/9368
{
"id": 9368,
"createdAt": "2021-09-10T07:58:56.58Z",
"firstName": "Chathuranga",
"lastName": "Pathirana",
"externalId": "externalSystemId",
"country": "SG",
"groups": [
{
"id": 72,
"isBlacklist": false
},
{
"id": 82,
"isBlacklist": false
}
],
"addresses": {
"msisdn": "6580000000",
"weChatUserId": "oJQxo6XXXXXXXXXXXXXXXXX",
"facebookUserId": "19520000000000",
"email": "[email protected]"
},
"customAttributes": {
"company": "Google",
"jobTitle": "CEO"
}
}