BulkUpsertExtensions

BulkUpsertExtensions

BulkUpsertExtensions is used for inserting new contact extensions and updating existing contact extensions in the master_contact_extensions table.

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

contact_key and address columns in master_contact_extensions table are mandatory and unique across all the extensions. So, for all items in the request body, contact_key and address are mandatory parameters.

The users can update name and permission columns in master_contact_extensions table directly. Note: The channel column cannot be updated after initial creation. To update contact_key or address columns, provide the values with new_contact_key or new_address properties.

Important Notes

  • The insertIfNotExists property controls whether new extension records can be inserted into master_contact_extensions table. However, insert operations are not allowed when new_contact_key or new_address properties are present in the same request. These operations must be separated into different requests.
  • If using new_address, the channel column must also be included in the columns list to properly validate the address format
  • 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
  • The endpoint requires authentication and proper API permissions
  • When using name column, it must match an existing extension type configured in your account for the given channel
Body Params
columns
array of strings
length ≥ 1

Columns that are used in this update process. Must match your account's configured columns.

columns
contactDatas
array of objects
length between 1 and 1000

Data to be inserted or updated

contactDatas
string
required

contact_key of the contact extension. References a contact in the master_contact table.

string
required

address value of the contact extension. It can be different according to channel type. If channel type is E, the column contains email address or channel type is S, column contains phone number of the contact.

enum

'E' means email channel

'S' means gsm channel

'W' means WhatsApp channel

Note: This field is mandatory when new_address is provided. The channel value cannot be updated once set.

Allowed:
string
length ≤ 100

name property of the contact extension. Must match an existing extension type configured in your account for the given channel.

string

new address value of the contact extension. It can be different according to channel type.

If channel type is E, you need to provide a valid email address or channel type is S, you need to provide a valid gsm number. When using this field, the channel column must also be included.

string

new contact_key value to replace the existing contact_key. The new contact key must exist in the master_contact table.

boolean

opt-in option for the address

boolean
Defaults to false

If set to true, new records will be inserted. If false, only existing records will be updated. Cannot be used together with new_contact_key or new_address.

boolean
Defaults to true

If true, the API will throw an exception on invalid records. If false, validation errors will be returned in the errors list while valid records are processed.

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

401

Not-authenticated. Please re-login.

403

The operation is not allowed. Your API user is not authorized to use this API.

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