POST
Batch version of Add a customer. Applies the same idempotent sync logic per entry: existing exact-match customers are synced (environment membership updated, customerId stored if missing) while conflicting entries are skipped.

Sync behavior per entry

Note: when an entry omits phone, dedup for that entry falls back to email only — Zquence can’t detect a phone conflict it was never told about.

Query parameters

string
Assign all customers in this batch to a specific environment. If omitted, the environment is resolved from the authenticated API key.

Body

A JSON array of customer objects. Each object accepts the same fields as Add a customer.
string
required
Full display name.
string
required
Valid RFC 5322 email. Used as a deduplication key alongside phone.
string
Phone number. Optional. When provided, must be 6–30 chars — E.164 format recommended (e.g. +14155552671).
string
Your system’s identifier for this customer. Stored on create; applied to existing customers only if they don’t already have one.

Returns

array
Array of full customer objects that were newly created or successfully synced in this call.
number
Number of customers in created.
string[]
Emails that were skipped due to a conflict (existing email with a different phone).
string[]
Phone numbers that were skipped due to a conflict (existing phone with a different email).
number
Total count of distinct skipped identifiers (skippedEmails + skippedPhones deduplicated).

Error codes