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
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 users to self-register.
Require a valid invite token to register.
Activate new self-registered clients immediately.
Require email verification before activation.
Role to assign to newly self-registered clients.
Restrict registration to these email domains. Empty = no restriction.
Restrict OAuth-based auto-registration to these provider types. Empty = all configured providers allowed.
Password complexity rules: {"min_length": 8, "require_uppercase": true, "require_lowercase": true, "require_numbers": true, "require_special": false}.
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.
true on a successful save.
"Registration policy updated successfully".
Errors
Malformed JSON request body.
Caller lacks the endpoints:update permission in the active account.
Endpoint doesn't exist or doesn't belong to the calling account.
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"]
}'
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"]
}'
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},
)
{
"success": true,
"message": "Registration policy updated successfully"
}