POST
Creates a new customer record. phone is optional. Idempotent on email, and on phone when provided: if a user with the same email (and, when you send one, the same phone) already exists, the call succeeds, updates their environment membership, and optionally stores your customerId if they don’t have one yet.

Sync behavior

Note: when phone is omitted from a call, dedup for that call falls back to email only — Zquence can’t detect a phone conflict it was never told about. Send phone on every call if you want strict dedup across both fields.

Query parameters

string
Place the new customer into this specific environment. If omitted, the environment is resolved from the authenticated API key.

Body

string
required
Full display name of the customer.
string
required
Valid RFC 5322 email address. Stored lowercase. Used as the primary deduplication key alongside phone.
string
Phone number. Optional. When provided, must be 6–30 characters — E.164 format strongly recommended (e.g. +14155552671). Normalized to E.164 on write.
string
Your system’s identifier for this customer (e.g. a CRM ID, Stripe customer ID, or database UUID). Stored as-is and returned on every customer read. Useful for correlating Zquence customers back to your own data.
  • On create: stored immediately.
  • On sync (existing user): stored only if the customer does not already have an customerId. Pass it on every sync call to ensure it is captured even if the first call didn’t include it.

Returns

string
Customer’s MongoDB ObjectId.
string
Display name.
string
Normalized lowercase email address.
string
Normalized E.164 phone number.
string
Owning tenant identifier.
string | null
Primary environment this customer belongs to.
string | null
Your system’s customer identifier, if provided.
string
"inactive" on first creation. Advances to "active" once the customer accepts a Zquence account invitation.
string
ISO 8601 UTC creation timestamp.
string
ISO 8601 UTC last-updated timestamp.

Error codes

Webhook events

Fires tenant.users.invite on successful creation of a new customer.