POST method to create a contact. Either email or phone (number and countrycode) are required
Name | Description |
---|---|
account_id required | Your account unique identifier to access API. |
device_id | Contact associated device_id |
name_first | Name of the contact |
name_last | Last name of the contact |
Email of the contact | |
phone_countrycode | Country code of the contact phone |
phone_number | Phone number without country code of the contact |
phone | Full phone number with country code of the contact |
city | City of the contact |
country | Country of the contact |
region | Region of the contact |
zip | Zip code of the contact |
full_address | Address of the contact |
born_date | The date of the birthday in ISO_8601 format, Example: 1990-01-01T00:00:00Z |
gender | Gender of the contact (MALE or FEMALE) |
language | Language of the contact in ISO-2 format, Example: ES |
user_id | Unique identifier of contact in your backend |
facebook_id | Facebook id of the contact |
facebook_friends | Number of the friends in facebook of the contact |
google_id | Google+ id of the contact |
twitter_id | Twitter id of the contact |
twitter_followers | Number of the followers in twitter of the contact |
gdpr_date | Date for GDPR changes in ISO_8601 format, Example: 1990-01-01T00:00:00Z |
last_latitude | Last GPS latitude, Number, example: 27.994401 |
last_longitude | Last GPS longitude, Number, example: -81.726896 |
[custom field] | You can create a custom field and use in every contact, only add parameter in the json with the name of custom ( no label) |
list_subscriptions[list_id] | Id of audience list |
list_subscriptions[subscribed] | If true, subscribe in this list |
gdpr_marketing_consent | Boolean type: If true, the contact accepted marketing consent |
gdpr_accept_terms | Boolean type: If true, the contact accepted your terms |
gdpr_date | Date for GDPR changes in ISO_8601 format, Example: 1990-01-01T00:00:00Z |
gdpr_remote_ip | String type: Contact IP when accepted GDPR |
email_validation | Json with email_validation parameters |
email_validation[validate] | Boolean, if true, validate contact Email, Default: false |
email_validation[create_if_invalid] | Boolean: If true, the contact contact will be created if Email is not valid, Default: false |
email_validation[create_if_no_credit] | Boolean: If true, create contact if the account hasn't credit for validation, Default: false |
POST
/v2/account/:account_id/contact/
Accept: application/json
Authorization: Token token={account.secret}
Content-Type: application/json
{
"name_first": "John",
"name_last": "Doe",
"email": "johndoe@example.com",
"phone_countrycode": "44",
"phone_number": "7712345678",
"tags": [
"tag1",
"tag2"
]
}
201
{
"id": "550aac3da096734ce5000001",
"name_first": "John",
"name_last": "Doe",
"phone_countrycode": "44",
"phone_number": "7712345678",
"email": "johndoe@example.com",
"tags": [
"tag1",
"tag2"
]
}