BulkUpsert

BulkUpsert

BulkUpsert can be used for inserting new contacts and updating existing contacts in the master_contact table.

This method takes a column list and a contactDatas array. All the data will be processed according to the columns list.

You can add/update up to 1000 records in a single call.

contact_key column in master_contact table is mandatory and unique across all the contacts. So, for all items in the request body, the contact_key is mandatory parameter.

Apart from the predefined columns in master_contact table, the users are allowed to update their custom columns in this table, provided that the column name/value pair is compatible with the table structure.


Important Notes

  • This method should be called once a minute with a single request! Parallel calls are prevented by concurrent request limiting
  • The endpoint processes data based on your account's brand configuration
  • All data validation is performed before any updates are made
  • Failed records will be reported in the response's errors array
  • Warning messages for records that were processed but with some issues will appear in the warnings array
  • Email addresses are automatically converted to lowercase
  • Email and GSM status are automatically set to 'A' (active) when their respective values are changed
  • Only columns marked as import-enabled in your account configuration can be included in the columns list
Body Params
columns
array of strings
length ≥ 1

Columns that are used in this update process. Must match your account's configured columns and be import-enabled.

columns
contactDatas
array of objects
length between 1 and 1000

Data to be inserted or updated

contactDatas
string
required

Unique identifier for the contact

date
length ≤ 10

Birthday of the contact

enum
Defaults to A

Status 'A' means contact is active, Status 'P' means contact is passive. Passive contacts don't receive any messages.

Allowed:
string
length ≤ 255

email address of the contact (will be converted to lowercase)

boolean

opt-in option for the email address

enum

Status 'A' means active email address, Status 'P' means passive email address. Passive email addresses are excluded from the target audience by default. The system can automatically set an email address to Status 'P' when the email address is unreachable. Automatically set to 'A' when email changes.

Allowed:
string
length ≤ 100

Gender of the contact

string
length ≤ 20

gsm phone number of the contact

boolean

opt-in option for the gsm number

enum

Status 'A' means active gsm phone, Status 'P' means passive gsm phone. Passive gsm numbers are excluded from the target audience by default. The system can automatically set a gsm phone to Status 'P' when the gsm number is unreachable. Automatically set to 'A' when gsm changes.

Allowed:
string
length ≤ 100

Name of the contact

date
length ≤ 10

Start date of the contact subscription

string
length ≤ 100

Surname of the contact

string

Optional parameter to change an existing contact's key. Cannot be used with insertIfNotExists=true.

string

Any type of custom field in master_contact table created through GUI that is marked as import-enabled.

string

Any type of custom field in master_contact table created through GUI that is marked as import-enabled.

boolean
Defaults to false

If set to true, new records will be inserted. If false, only existing records will be updated. Cannot be used with new_contact_key in the columns list.

boolean
Defaults to true

If this flag is true, the API will throw an exception when any record fails validation. If set to false, valid records will be processed and invalid records will be returned in the errors list.

Headers
string
required
Defaults to {$$.env.access_token}
Responses

401

Not-authenticated. Please re-login.

403

The operation is not allowed. Your API user does not have the DataSpace.Manage role permission required to use this API.

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json