Create contact
POST https://contacts.8x8.com/api/v1/accounts/:accountId/contacts
Create a new contact
Request
Path Parameters
Possible values: >= 32 characters and <= 36 characters, Value must match regular expression ^[0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}$
You must replace {accountId} with the accountid that you want to use.
Body
- Array [
- ]
Possible values: non-empty and <= 200 characters
Possible values: non-empty and <= 200 characters
Possible values: non-empty and <= 50 characters
Please use Alpha-2 country code (two character country codes)
Possible values: >= 2 characters and <= 2 characters
groups object[]
Possible values: >= 1, <= 10
Group identitifer
addresses objectrequired
All addresses are optional, but at least one address should be provided
Phone number. We accept both international and national formats (for national you have to specify a country in the dedicated field).
Possible values: non-empty, Value must match regular expression ^\+{0,1}[1-9]{1}[0-9]{6,14}$
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 320 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
You'll receive 200 OK if the contact has been merged with another contact based on one of provided addresses
Schema
- Array [
- ]
Possible values: non-empty
Possible values: non-empty
Possible values: non-empty
Possible values: non-empty
groups object[]
Possible values: >= 1
Possible values: non-empty
Possible values: non-empty
addresses objectrequired
All addresses are optional, but at least one address should be provided
Phone number. We accept both international and national formats (for national you have to specify a country in the dedicated field).
Possible values: non-empty, Value must match regular expression ^\+{0,1}[1-9]{1}[0-9]{6,14}$
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 320 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
{
"id":0,
"createdAt":"string",
"firstName":"string",
"lastName":"string",
"externalId":"string",
"country":"string",
"groups":[
{
"id":0,
"contacts":0,
"createdAt":"string",
"name":"string",
"description":"string",
"isBlacklist":true
}
],
"addresses":{
"msisdn":"string",
"weChatUserId":"string",
"facebookUserId":"string",
"email":"user@example.com",
"zaloId":"string",
"lineId":"string",
"kakaoTalkId":"string"
},
"customAttributes":{}
}
You'll receive 201 Created if the contact has been created
Schema
- Array [
- ]
Possible values: non-empty
Possible values: non-empty
Possible values: non-empty
Possible values: non-empty
groups object[]
Possible values: >= 1
Possible values: non-empty
Possible values: non-empty
addresses objectrequired
All addresses are optional, but at least one address should be provided
Phone number. We accept both international and national formats (for national you have to specify a country in the dedicated field).
Possible values: non-empty, Value must match regular expression ^\+{0,1}[1-9]{1}[0-9]{6,14}$
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 320 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
Possible values: <= 128 characters
{
"id":0,
"createdAt":"string",
"firstName":"string",
"lastName":"string",
"externalId":"string",
"country":"string",
"groups":[
{
"id":0,
"contacts":0,
"createdAt":"string",
"name":"string",
"description":"string",
"isBlacklist":true
}
],
"addresses":{
"msisdn":"string",
"weChatUserId":"string",
"facebookUserId":"string",
"email":"user@example.com",
"zaloId":"string",
"lineId":"string",
"kakaoTalkId":"string"
},
"customAttributes":{}
}
{
"id":41764986,
"createdAt":"2022-04-18T07:39:55.52Z",
"externalId":"87668",
"country":"US",
"groups":[
{
"id":8199,
"contacts":1,
"createdAt":"2022-04-13T08:41:47.82Z",
"name":"some group",
"description":"General",
"isBlacklist":false
}
],
"addresses":{
"msisdn":"16511112222"
},
"customAttributes":{}
}
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1002,
"message":"Invalid MSISDN format (not E.164 international number)",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}
Conflict: more than one contact was found based on a provided set of addresses.
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Data and time of the error occurence
{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
Source: https://developer.8x8.com/connect/reference/create-contact · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments