Add Contact
Use the AddCDPContact API to add a contact.
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
Action | string | Value: AddCDPContact. | Yes |
LastName | string | Last name. | No |
FirstName | string | First name. | No |
Nickname | string | Nickname. | No |
string | Email address. | No | |
Phone | string | Phone number. | No |
string | WhatsApp. | No | |
Attributes | object | Custom attributes. For example: {"city": "Shanghai", "age": 18} | No |
ContactListIds | array | An array of integers, where each item is the ID of a contact list. | No |
Please provide at least one contact method: Email, Phone, or Whatsapp. These fields cannot all be empty.
Response Elements
Parameter | Type | Description | Required |
---|---|---|---|
RetCode | int | When RetCode is not 0, Message displays a specific error description. If RetCode is 0, Message is not returned. | Yes |
Action | string | Name of the operation. | Yes |
Message | string | When RetCode is not 0, Message displays a specific error description. | Yes |
Id | int | Contact ID. | Yes |
Request Example
curl --request POST 'https://api.uspeedo.com/api' \
--header 'Content-Type: application/json' \
-d '{
"Action": "AddCDPContact",
"LastName": "last name",
"FirstName": "first name",
"Nickname": "nickname",
"Email": "contact@uspeedo.com",
"Phone": "(1)1234567890",
"ContactListIds": [1]
}'
Response Example
{
"Action": "AddCDPContactResponse",
"Message": "",
"RetCode": 0,
"Id": 1
}