More help

postCreate contact

Definition

Parameters

Body Params

The email address of the contact, which needs to be included within the request body

OptInType:

string'Unknown', 'Single', 'Double', 'VerifiedDouble'

The opt-in type of the contact, which needs to be included within the request body

EmailType:

string'PlainText', 'Html'

The email type of the contact, which needs to be included within the request body

DataFields.Key:

string

Each contact data field is a key-value pair; the key is a string. It needs to be included within the request body.

DataFields.Value:

mixed

Each contact data field is a key-value pair; the value can be of any type. It needs to be included within the request body.

Examples

Result Format

Documentation

This operation creates a new contact within the account and adds it to the 'All contacts' address book.
Setting the OptInType to 'VerifiedDouble' will result in a double opt-in confirmation email being sent to the contact. The result will state that the contact's OptInType is 'Double' and Status is 'PendingOptIn'. These will only update to 'VerifiedDouble' and 'Subscribed' respectively once the contact has clicked the link in the confirmation email, at which point they will be added to the account.
Note that it is possible to update an existing contact using this operation. A duplicate contact will *not* be created. If the contact already exists, then any data provided in your request that is already held for the contact will be overwritten and updated in the system.
[block:callout]
{
"type": "info",
"title": "Are you importing multiple contacts?",
"body": "If you're looking to import or update multiple contacts at once, then we highly recommend using [Bulk create contacts](https://developer.dotmailer.com/docs/bulk-create-contacts) instead.\n\nIt allows you to import a file and has the benefit of being a single API call only, making it far less likely that your account will exceed its API calls per hour limit."
}
[/block]