Skip to navigation

Invite a user

Invites a person by email (users:manage): the row is created INVITED with the capabilities stated (scope strings or a preset), claimable for 72 hours, and the platform emails them — or binds them at once, no email, when the address is already a verified member of your organisation at the identity provider. An address an invited, active or disabled member holds is 409 EMAIL_TAKEN.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

Idempotency-KeystringRequired

Required on every write: a URL-safe string of 1 to 64 characters from [A-Za-z0-9._~-] (a UUID fits), scoped to you. It names one operation on one record, ever: a retry replays the stored outcome (Idempotent-Replay: true) or attaches to the live one, and reuse on another record refuses 409 IDEMPOTENCY_KEY_REUSED. Missing or malformed, 400.

X-Request-IdstringOptional

Your own id for the request: 8 to 128 of [A-Za-z0-9._-]. It becomes the request’s id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.

Query parameters

minGlobalSequencestringOptionalformat: "^[0-9]{1,19}$"

A position you hold — an X-Immix-Global-Sequence you read, or a 202’s commandGlobalSequence: this member answers only once it has folded the platform’s stream through it, waiting up to its deadline, then 503 PROJECTION_BEHIND with Retry-After. Within that stream a read is never older than what you have seen; drop your positions after an announced stream cut. A retry stating its 202’s position attaches to or replays that operation while the journal holds its key, never publishing twice. Stated once: one to nineteen digits, at most 9223372036854775807; else 400 MALFORMED_REQUEST.

Request

This endpoint expects an object.
namestringRequired

The member’s name: free text, a label two members may share. At most 128 bytes; longer refuses INVALID_FIELD.

emailstringRequired

The address to invite, lowercased: ASCII, one @, at most 254 characters. Unique among the organisation’s invited, active and disabled users — a disabled member is enabled, never invited again; a deleted user’s address is free.

expectedVersionstring or nullOptionalformat: "^-?[0-9]+$"
int64 as a decimal JSON string
capabilitieslist of enumsOptional

The capabilities the invitee holds from the moment they accept. a set (SBE bit-set) served as the array of its scope strings, each a Capability, in declared order; empty = none set, never null; as input a repeated name refuses 400

presetenumOptional

A capability preset the edge expands to its scope strings and never forwards — the row records the capabilities, never a preset. GET /capability-presets lists each preset’s capabilities and what it grants. Preset or capabilities names the set, stored with the reads its verbs imply: the two must name one set once those reads are added, else 400.

Allowed values:

Response

The user as the platform now holds it after the write — the same row the read serves, with the answering change’s position, the row’s ETag and, on a replayed key, Idempotent-Replay.

capabilitieslist of enums

The user’s capabilities — what they may do; on an invited row, the bits its inviter granted, held from the claim. a set (SBE bit-set) served as the array of its scope strings, each a Capability, in declared order; empty = none set, never null; as input a repeated name refuses 400

emailstring

The address the user was invited at, lowercased — the address a first login must have verified to claim the row, kept afterwards as the address the user was registered by. Empty on a row no invitation created. Unique among the organisation’s invited, active and disabled users (EMAIL_TAKEN); a deleted user’s address is free.

globalSequencestringformat: "^[0-9]+$"

The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.

idpInvitationRefstring

The identity provider’s id for the invitation the platform created, as the platform reported it; informational, never a key; empty until reported. At most 256 bytes; longer refuses INVALID_FIELD.

idpUserRefstring

The identity provider’s subject, opaque, never parsed: a token’s sub resolves to this row inside the token’s organisation. Empty = unbound (a locally authenticated user). Unique among the organisation’s rows but the deleted — a subject binds for the life of its row, a disabled member keeps it, and a second binding is refused IDP_REF_TAKEN; a deleted row keeps its binding as history, and the same subject may claim a new invitation into a new row (OA-16). At most 256 bytes; longer refuses INVALID_FIELD.

invitationDetailstring

The provider’s words behind invitationFailure — or, on a row bound as an existing member, the note naming that member — as the last report stated them: the one diagnostic admitted onto a row, human-readable, never the signal; empty-not-null, cleared by the next re-invite and by the claim. At most 200 bytes.

invitationFailureenum

Why the last report could not send the invitation — EXPIRED_UNSENT, MEMBER_UNVERIFIED, IDP_REFUSED or SUBJECT_BOUND (the member already holds another seat here: enable it if it is disabled, and cancel this invitation) while invitationState is FAILED; NONE otherwise, cleared by the next re-invite and by the claim. NONE is the unset sentinel: outputs only — as input the field is required, and explicit NONE refuses 400. A consumer READING this field treats an unknown name as NONE, never as an error; as input an unknown name refuses 400 — the parse is strict

Allowed values:
invitationStateenum

Where the invitation stands with the IdP: PENDING until the platform acts there, then SENT or FAILED (invitationFailure says why); ACCEPTED once bound — by the invitee’s sign-in, or at once for an existing verified member of the IdP’s organisation (no email; idpInvitationRef empty); NONE where none was created. Never expiry. Kept after a cancel. NONE is the unset sentinel: outputs only — as input the field is required, and explicit NONE refuses 400. A consumer READING this field treats an unknown name as NONE, never as an error; as input an unknown name refuses 400 — the parse is strict

Allowed values:
lastActiveAtNsstring or nullformat: "^[0-9]+$"

When the principal was last seen acting — its last admitted request on this API (one a read replica serves is not recorded), or its open trading socket — epoch nanoseconds at a five-minute grain: a request inside five minutes of the mark need not move it, so read it as active within five minutes of this time. null while no mark is recorded: the principal has not acted since marks were first kept (0.71.0), or ever. A mark beside the row, not a field of it: it moves no version and no ETag.

namestring

The member’s name: free text, set by the inviter and changed by the member (PUT /me) or an administrator — a label, which two members may share. At most 128 bytes; longer refuses INVALID_FIELD.

orgIdinteger

Membership — stamped by the owner from the actor’s org; an organisation’s first administrator belongs to the organisation its creation mints.

statusenum

UNKNOWN is the unset sentinel: outputs only — as input the field is required, and explicit UNKNOWN refuses 400. A consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict

Allowed values:
userIdinteger
Sticky entity key.
versionstringformat: "^-?[0-9]+$"
Monotonic per entity. int64 as a decimal JSON string
inviteExpiresAtNsstring or nullOptionalformat: "^-?[0-9]+$"

The deadline the row was last invited under: the inviting command’s position time plus the lifetime the door states (72 hours; a first administrator’s seven days); absent — null in the API, 0 on the wire — on a row never invited. A time, not a state: judged at the claim (INVITATION_EXPIRED past it), nothing sweeps, a re-invite opens a fresh one. Kept after the claim and after a cancel. int64 as a decimal JSON string

invitedByUserIdinteger or nullOptional

Who invited this user: the platform administrator who created the organisation, on its first administrator, and the inviter on an invited member; absent — null in the API, 0 on the wire — on a row created directly.

Errors

400
Invite Users Request Bad Request Error
401
Invite Users Request Unauthorized Error
403
Invite Users Request Forbidden Error
409
Invite Users Request Conflict Error
413
Invite Users Request Content Too Large Error
422
Invite Users Request Unprocessable Entity Error
429
Invite Users Request Too Many Requests Error
500
Invite Users Request Internal Server Error
503
Invite Users Request Service Unavailable Error