Invite a member to a merchant (authorize an email)
Creates the Sarvex-side member record {email, role} and emails a sign-in link. This is the
invite — there is no separate IdP step. Sarvex authorizes by email; the IdP (Kinde, including
social sign-in) authenticates. On first sign-in the verified token’s email claim is matched to this
record, resolving the merchant + role. No password is set or held by Sarvex.
/operator/merchants/{merchant_id}/membersAuthorizationBearer token (JWT) · headerrequiredJWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in
production; a simulator in test). The client obtains it and sends it as a Bearer token on
every authenticated call. Sarvex's services verify it — issuer, audience, signature
(IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue
or revoke these tokens. merchant_id/store_id are read from the verified claims (and the
merchant→store mapping), never from the URL. The operator scope is required for
/operator/*. Operators acting on a specific merchant pass the X-Operate-As header,
which is recorded in the audit log.
operatormerchant_idstringrequiredThe merchant being provisioned. Operator-scoped path id (not a tenant selector for merchant-scoped calls).
Idempotency-KeystringClient-generated key; replays return the original result.
application/jsonemailstring<email>requiredrolestringrequiredownerstaffMember invited; sign-in link sent.
user_idstringemailstring<email>rolestringownerstaffstatusstringactiveinvitedAuthenticated but not permitted (e.g. non-operator on an operator route).
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | nullA member with this email already exists for the merchant.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequireddetailsobject | null