Update Registration Policy

PUT /v1/endpoints/{id}/rbac/registration-policy

Change how new RBAC clients can join the endpoint. Effect is immediate — the next sign-up attempt is evaluated against the new policy. Existing clients are unaffected (suspending or removing them is a separate action via /status / DELETE /v1/clients/{id}).

Setting invite_only: true or allow_self_registration: false stops new self-registrations. Sessions for already-registered clients keep working until expiry. To force them out, use revoke-all per client (no bulk-revoke-everyone API right now).

Path parameters

id string (uuid) Req
Endpoint UUID.

Request body

All fields are optional; omitted booleans default to false. The whole policy is replaced on each save (it is not a partial merge of individual flags).

allow_self_registration boolean
Allow users to self-register.
invite_only boolean
Require a valid invite token to register.
auto_approve boolean
Activate new self-registered clients immediately.
require_email_verification boolean
Require email verification before activation.
default_role_id int64
Role to assign to newly self-registered clients.
allowed_domains string[]
Restrict registration to these email domains. Empty = no restriction.
blocked_domains string[]
Email domains to reject.
oauth_providers string[]
Restrict OAuth-based auto-registration to these provider types. Empty = all configured providers allowed.
password_requirements object
Password complexity rules: {"min_length": 8, "require_uppercase": true, "require_lowercase": true, "require_numbers": true, "require_special": false}.
forwarding_config object
Headers/cookies to inject toward the backend after authentication (e.g. forward_user_email, custom_headers).

Response (200 OK)

A confirmation object — not the updated policy. Re-read it via GET /v1/registration-policy if you need the saved values.

success boolean
true on a successful save.
message string
"Registration policy updated successfully".

Errors

400 Bad Request
Malformed JSON request body.
401 Unauthorized
Missing auth.
403 Forbidden
Caller lacks the endpoints:update permission in the active account.
404 Not Found
Endpoint doesn't exist or doesn't belong to the calling account.
Request — switch to invite-only
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/rbac/registration-policy" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "allow_self_registration": true, "invite_only": true, "oauth_providers": ["google"] }'
Request — domain-restricted open
curl -X PUT "https://api.ngris.com/v1/endpoints/<uuid>/rbac/registration-policy" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "allow_self_registration": true, "invite_only": false, "auto_approve": true, "allowed_domains": ["acme.com", "acme.co.uk"] }'
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client._put_raw( "/endpoints/<endpoint_uuid>/rbac/registration-policy", {"allow_self_registration": True, "invite_only": True}, )
Response — 200 OK
{ "success": true, "message": "Registration policy updated successfully" }
Iris