Configure the self-registration policy
Spans both profiles. Read and set the single global policy that governs which sign-up methods the public profile offers for every tenant. The write lives here on the control plane; the public profile only reads it. Requires iam-platform-admin.
- GET /v1/admin/registration-policy → read active allowedMethods + combinationMode
- PUT /v1/admin/registration-policy → set the policy (step-up; audits registration_policy_changed)
- GET /v1/auth/registration-policy (public profile) → the sign-up UI reads the now-current policy
/v1/admin/registration-policyadminRead registration policyA single global setting (no tenant scope) — self-registration creates the tenant, so there is no tenant to scope it to.
Field guide — what each value means & where it comes fromno inputs
No request body, path params, or query params. A bodyless GET that returns the single global self-registration policy. Still requires platform-admin authorization (role iam-platform-admin); the tester/gateway supply Authorization and x-gateway-context for you. No Idempotency-Key needed (read-only).
GET https://api.kerja.team/v1/admin/registration-policyResponse guide — what comes back & what each value means4 fields
200 OK returning the { data } envelope with the active global self-registration policy; no notable response headers (no Set-Cookie, no Cache-Control: no-store).
dataobjectalwaysdata.allowedMethods[]arrayalwaysemail— Email-based self-registration is offered on the public profile.phone— Phone-based self-registration is offered on the public profile.
data.combinationModeenumalwayslink— Methods are alternatives — the user signs up with any one of the allowedMethods.atomic— Methods are combined — the user must provide all of the allowedMethods together in a single sign-up.
data.updatedAtISO-8601always/v1/admin/registration-policyadminSet registration policy (step-up)Step-up required. allowedMethods must be a non-empty, duplicate-free subset of { email, phone }; combinationMode is link or atomic. Only gates sign-up — never login, and never strips users who already hold a credential.
Field guide — what each value means & where it comes from5 fields
Sets the active self-registration policy (platform-admin, control-plane). Needs Authorization/x-gateway-context (handled by tester+gateway) plus a step-up factor in the body — supply EITHER stepUp.password OR stepUp.recoveryCode. Body is .strict() (unknown fields rejected). No path/query params or required custom headers.
allowedMethodsbodystring[]requiredyou chooseemail— Permits self-registration via email address.phone— Permits self-registration via phone number.
combinationModebodyenumrequiredyou chooselink— Methods are treated as separate, linkable sign-up paths.atomic— Methods must be provided together as a single atomic registration.
stepUpbodyobjectrequiredyou choosestepUp.passwordbodystringconditionalyou choosestepUp.recoveryCodebodystringconditionalauthenticatorPUT https://api.kerja.team/v1/admin/registration-policyResponse guide — what comes back & what each value means3 fields
200 OK; body is the { data } envelope wrapping the updated RegistrationPolicy object (no special response headers — no Set-Cookie/Cache-Control noted).
data.allowedMethods[]enumalwaysemail— Email-based self-registration is permitted.phone— Phone-based self-registration is permitted.
data.combinationModeenumalwayslink— Methods are offered as separate, linkable sign-up options.atomic— Methods must be provided together as a single atomic registration.
data.updatedAtISO-8601always/v1/auth/registration-policypublicPublic sign-up reads the policyThe public profile (scenario 1) reads the now-current policy to render the right form. This is the read side of the cross-profile registration-policy bridge.
Field guide — what each value means & where it comes fromno inputs
No request body, path params, query params, or required headers. This is a public, unauthenticated, read-only endpoint — no Authorization or x-gateway-context is required either. It returns the active self-registration policy (allowedMethods and combinationMode) so the sign-up UI can render the correct form.
GET https://api.kerja.team/v1/auth/registration-policyResponse guide — what comes back & what each value means4 fields
200 OK returning the standard { data } envelope; body is the active self-registration policy (no secrets, no user data). Response header Cache-Control: public, max-age=30 (lightly cacheable). If the policy row is missing it defaults to { allowedMethods: ["email"], combinationMode: "link" }.
dataobjectalwaysdata.allowedMethodsarrayalwaysdata.allowedMethods[]enumalwaysemail— Sign-up may use an email address (render the email field).phone— Sign-up may use a phone number (render the phone field / OTP flow).
data.combinationModeenumalwayslink— Default — register with a single method now and add the second method later under /v1/me.atomic— A single register call must carry both methods together.