POST /contacts/v1/contacts
Creates a new contact with the specified information in the specified attribute groups.
| Name | Type | Description |
|---|---|---|
contactKey | string | Primary address for the contact. You must provide either a value for contactKey or contactID. |
contactID | string | Unique ID for the contact. You must provide either a value for contactKey or contactID. |
attributeSets | array | Required. Array of information used to create a new contact |
attributeSets.name | string | Required. Name of attribute group to which to add the contact information |
attributeSets.items | array | Required. Array of items associated with the attribute group. Each item contains the values that define the contact’s information for that group. |
attributeSets.items.values | array | Required. Name and value pairs indicating the attribute and its applicable value within the item. |
To create a contact record, issue a POST request to the /contacts/v1/contacts endpoint.
Example Request
The request must include at least one of the attribute sets to create a new contact:
- Email Addresses (You must also include this attribute set if you include Email Demographics)
- MobileConnect Demographics (You must include a country code for the
Localevalue) - MobilePush Demographics (You must include an
ApplicationIDvalue) - LINE Addresses and LINE Subscriptions (You must also include these attribute sets if you include LINE Demographics)
Each request accepts only one instance of each attribute set.
You must also include values for contactKey and HTML Enabled.
Change @example.com to a valid domain.
Example Response
After a successful request, the API returns a confirmation of the changes that were made.
If the create request fails, the API returns an error response that includes information about the failure.