Skip to main content

Add Contact

Use the AddCDPContact API to add a contact.

Request Parameters

ParameterTypeDescriptionRequired
ActionstringValue: AddCDPContact.Yes
LastNamestringLast name.No
FirstNamestringFirst name.No
NicknamestringNickname.No
EmailstringEmail address.No
PhonestringPhone number.No
WhatsappstringWhatsApp.No
AttributesobjectCustom attributes. For example: {"city": "Shanghai", "age": 18}No
ContactListIdsarrayAn 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

ParameterTypeDescriptionRequired
RetCodeintWhen RetCode is not 0, Message displays a specific error description. If RetCode is 0, Message is not returned.Yes
ActionstringName of the operation.Yes
MessagestringWhen RetCode is not 0, Message displays a specific error description.Yes
IdintContact 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
}