Skip to main content
This walkthrough creates a member of your organization, proves the idempotent retry behavior, and tours the rest of the membership lifecycle. You need your org_ API key (Quickstart).

1. Create (or attach)

POST /v1/users is a create-or-attach: if the email has no 4D account, a user and a membership in your org are created; if the person already exists on the platform, they’re attached to your org as a member instead - never duplicated. Only email is required.
201 Created (or 200 OK when the user/membership already existed and is returned unchanged):
Notes on the shape:
  • age_band is derived from dob + country; the raw dob you submitted is not echoed back - partner reads get the redacted profile (see Tenants and members).
  • wallet starts provisioning and becomes active with an address once the background provisioning completes - no action needed from you.
  • country must be an assigned ISO 3166-1 alpha-2 code (any case in, stored uppercase); dob must be a real calendar date, in the past, year ≥ 1900.

2. Retry it - nothing duplicates

Run the exact same command again. Same Idempotency-Key, same body → the original response is replayed with 200. A different body under the same key is rejected with 409 IDEMPOTENCY_CONFLICT. Reusing an external_id already claimed by another member of your org is also a 409.

3. The rest of the lifecycle

Locking and removal act on your membership, not the person’s global account: a removed member keeps their 4D identity (and any other organizations’ memberships) intact.

Next