Contact

Create

POST method to create contacts in bulk of maximum of 5000 per request. Either Email or Phone (number and country code) are required

Parameters

Name Description
account_id required Your account unique identifier to access API.
contacts required Array of contact data. Maximum of 5000 contacts per request.
match_contact_user_id If true, update the contact who have this user_id on the Cendyn CRM platform, else create a new one. By default: false
webhook_url A URL designated to receive notifications or data via webhook transmissions.
validate_emails If true, validate all contact´s emails of the bulk. This service has an extra cost and will use credits of your Pushtech account. If not enought credits the import will be processed without emails validation. By default: false
contacts_webhook_extra_fields Array that contain extra fields needed to be sent by the webhook. By default it is sent by the webhook the following fields: _id, user_id, email, phone_countrycode, phone_number
contacts[device_id] Contact associated device_id
contacts[name_first] Name of the contact
contacts[name_last] Last name of the contact
contacts[email] Email of the contact
contacts[phone_countrycode] Country code of the contact phone
contacts[phone_number] Phone number without country code of the contact
contacts[phone] Full phone number with country code of the contact
contacts[city] City of the contact
contacts[country] Country of the contact
contacts[region] Region of the contact
contacts[zip] Zip code of the contact
contacts[full_address] Address of the contact
contacts[born_date] The date of the birthday in ISO_8601 format, Example: 1990-01-01T00:00:00Z
contacts[gender] Gender of the contact (MALE or FEMALE)
contacts[language] Language of the contact in ISO-2 format, Example: ES
contacts[user_id] Unique identifier of contact in your backend
contacts[facebook_id] Facebook id of the contact
contacts[facebook_friends] Number of the friends in facebook of the contact
contacts[google_id] Google+ id of the contact
contacts[twitter_id] Twitter id of the contact
contacts[twitter_followers] Number of the followers in twitter of the contact
contacts[tags] Array containing tags for this contact
contacts[list_subscriptions[list_id]] Id of audience list
contacts[list_subscriptions[subscribed]] If true, subscribe from this list
contacts[channel_subscriptions[channel]] Name of channel. Options: [email, sms, push]
contacts[channel_subscriptions[blacklisted]] If true, blacklist this channel
contacts[gdpr_accept_terms] Boolean type: If true, the contact accepted your terms
contacts[gdpr_marketing_consent] Boolean type: If true, the contact accepted marketing consent
contacts[gdpr_date] Date for GDPR changes in ISO_8601 format, Example: 1990-01-01T00:00:00Z
contacts[gdpr_remote_ip] String type: Contact IP when accepted GDPR
contacts[[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)

Request

Route
POST 
/v2/account/:account_id/contact/bulk
Headers
Accept: application/json 
Authorization: Token token={account.secret}
Content-Type: application/json
Body
{
  "webhook_url": "https://requestb.in/qxvaw0qx",
  "match_contact_user_id": false,
  "validate_emails": false,
  "contacts_webhook_extra_fields": [
    "name_first"
  ],
  "contacts": [
    {
      "name_first": "John",
      "name_last": "Doe",
      "email": "johndoe@example.com",
      "phone_countrycode": "44",
      "phone_number": "7712345678"
    },
    {
      "name_first": "John",
      "name_last": "Doe",
      "email": "johndoe@example.com",
      "phone_countrycode": "44",
      "phone_number": "7712345678"
    }
  ]
}

Response

Status
201
Body
{
  "bulk": {
    "_id": "550aac3da096734ce5000001",
    "number_of_contacts": 2,
    "match_contact_user_id": false,
    "validate_emails": false,
    "contacts_webhook_extra_fields": [
      "name_first"
    ],
    "webhook_url": "https://requestb.in/qxvaw0qx",
    "status": "queue"
  }
}