POST
Creates an account for one or two existing customers and sends them their invitation emails. Use it to open accounts from a CRM, case-management tool, or onboarding backend without going through the Zquence console. The API key decides where the account is created. The tenant and the environment (sandbox or live) both come from the key, so there is no tenant or environment field in the body.
Requires an API key with the accounts.write scope that is bound to an environment. API-key authentication only. Console sessions cannot call this endpoint.

Before you call it

1

Create the customers

Every participant must already exist as a customer under your tenant. Create them with Add a customer and keep the returned id. That value is the userId you send here.
2

Pick the account type

Use the account-type code configured for your tenant, for example permanent or real_estate. The account type decides how many participants the account takes (see Participants).
3

Generate an idempotency key

Build a key from your own record, for example crm-case-10482-open, and send the same key on every retry of that create. See Retries and idempotency.

Headers

string
required
Public key of an environment-bound API key with the accounts.write scope.
string
required
Secret for the same key.
string
required
Your unique key for this create operation. 8–255 visible ASCII characters, no spaces (for example a UUID, or crm-case-10482-open). Leading and trailing whitespace is trimmed.
string
required
application/json

Body

The body is strict. Any field not listed below, at the top level or inside a participant, is rejected with 400 unknown_request_fields. Nothing is silently ignored.
string
required
Account-type code configured for your tenant. Up to 64 characters. Must start with a letter or number and may contain only letters, numbers, _, and -. Matching is case-insensitive, and the value is stored in lowercase.
string
required
Human-readable account title shown in the console and in invitation emails. 1–160 characters after trimming.
string
Your stable identifier for this account, such as a CRM case ID. 1–128 characters after trimming. Must be unique within the environment. A second account with the same value is rejected with 409 external_reference_exists. Returned on every read so you can match Zquence accounts back to your records.
object[]
required
One or two participants. See Participants for the combinations that are allowed.

Participants

Send exactly one of these two shapes. Anything else returns 400 invalid_participants. The shape must also match how the account type is configured. Sending one customer for a buyer-and-seller account type, or a buyer and seller for a single-customer type, returns 400. real_estate always needs a buyer and a seller.

What happens when the account is created

  1. The account is created in the key’s environment with status invited.
  2. Each participant gets an invitation email. A participant who already has a password gets a login link instead of an invite link.
  3. Zquence sends an account.created webhook, then one account.invited webhook per participant.
An email that fails to send does not fail the request. The account is still created.

Retries and idempotency

Send the same Idempotency-Key and the same body to retry safely. You never get a second account. Keys are scoped to the API key and environment that used them, and they don’t expire. Two bodies count as the same when they match after trimming, lowercasing accountType, and ignoring participant order.
Retry on network errors, timeouts, 429, and 5xx with the same key. Don’t retry 400, 401, 403, or 409. Fix the request first. A request that failed validation stores nothing, so you can reuse its key after fixing the body.

Returns

201 Created, with a Location header pointing at the account, for example Location: /v1/accounts/6a25cdcc36bc6230704b5bce. The body contains no invitation tokens.
string
Account ID. Use it with Retrieve an account.
string
Your reference. Omitted when you didn’t send one.
string
Account-type code, in lowercase.
string
Account title.
string
invited on creation. Later values: pending, accepted, completed, cancelled.
object[]
string
ISO 8601 UTC creation timestamp.
string
ISO 8601 UTC last-updated timestamp.

Error codes

Every error uses the standard envelope: statusCode, message, path, correlationId, timestamp, and a code when one applies. Branch on code where present. message text can change.