Every user who goes through KYC or signs an escrow must first exist as a Zquence user. Most integrations push users in two flows:
Live sync - when a user signs up in your app, call add-user to mirror them.
Nightly reconciliation - a batch job runs add-user-bulk to catch anything the live sync missed.
Live sync - single user
cURL
Node.js (fetch)
Python (requests)
curl https://api.zquence.com/v1/tenants/add-user \
-H "x-api-key: $ZQUENCE_PUBLIC_KEY " \
-H "x-api-secret: $ZQUENCE_SECRET_KEY " \
-H "Content-Type: application/json" \
-H "Idempotency-Key: user-sync- $CRM_ID " \
-d '{
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+14155552671"
}'
Use your internal user ID as the idempotency key suffix. Retries are then safe: if the sync job restarts, we’ll return the existing user instead of erroring.
Bulk sync - up to 10,000 users
For CRM snapshots, onboarding migrations, or reconciliation jobs, use the bulk endpoint.
curl https://api.zquence.com/v1/tenants/add-user-bulk \
-H "x-api-key: $ZQUENCE_PUBLIC_KEY " \
-H "x-api-secret: $ZQUENCE_SECRET_KEY " \
-H "Content-Type: application/json" \
-d '[
{ "name": "Alice", "email": "alice@example.com", "phone": "+14155550111" },
{ "name": "Bob", "email": "bob@example.com", "phone": "+14155550112" }
]'
Response:
{
"created" : 1842 ,
"skipped" : 158 ,
"failed" : [
{ "index" : 203 , "email" : "invalid" , "error" : "email_invalid" }
]
}
skipped entries are users whose email already exists for this tenant - this is a no-op success. Inspect failed to see which rows couldn’t be ingested.
Nightly CRM sync pattern
Export delta
Grab users created or updated in the last 24 hours from your CRM.
De-duplicate by email
Guarantees the bulk endpoint’s skipped count is meaningful.
Chunk to 1,000
We accept up to 10,000 per call - 1,000 gives smaller retry units.
Log `failed[]` to your ops channel
So someone can fix invalid emails before the next run.
Event on success
Each added user fires a tenant.users.invite webhook. Subscribe if you want to drive downstream automation (welcome email, Slack alert, analytics event).