Skip to Content
Docs
API referenceManagement API

Identity policy

Get identity policy

GET
/authn/identity-policy

Get the instance's identity policy (email, phone, and username rules). If none has been configured, the default policy is returned.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Response Body

OK

application/json
  1. response
created_at?string
email?
object?string
phone?
updated_at?string
username?
Example Request
curl -X GET 'https://api.us.pontive.com/v1/authn/identity-policy'
Example Response
{  "created_at": "string",  "email": {    "allow_disposable": true,    "allow_plus_addressing": true,    "domain_restriction": {      "domains": [        "string"      ],      "mode": "none"    },    "enforce_at_signin": true  },  "object": "string",  "phone": {    "country_restriction": {      "countries": [        "string"      ],      "mode": "none"    },    "require_verification_for_login": true  },  "updated_at": "string",  "username": {    "allow_changes": true,    "allowed_characters": "alphanumeric",    "change_cooldown_days": 0,    "enabled": true,    "max_length": 0,    "min_length": 0,    "reserved_usernames": [      "string"    ]  }}

Update identity policy

PATCH
/authn/identity-policy

Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Header Parameters

If-Match?string

The ETag the document was read with: a stale one is refused 412 precondition_failed (D42)

Request Body

Update payload

application/json
  1. body

Update payload

email?
phone?
username?

Response Body

OK

application/json
  1. response
created_at?string
email?
object?string
phone?
updated_at?string
username?
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/authn/identity-policy' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "string",  "email": {    "allow_disposable": true,    "allow_plus_addressing": true,    "domain_restriction": {      "domains": [        "string"      ],      "mode": "none"    },    "enforce_at_signin": true  },  "object": "string",  "phone": {    "country_restriction": {      "countries": [        "string"      ],      "mode": "none"    },    "require_verification_for_login": true  },  "updated_at": "string",  "username": {    "allow_changes": true,    "allowed_characters": "alphanumeric",    "change_cooldown_days": 0,    "enabled": true,    "max_length": 0,    "min_length": 0,    "reserved_usernames": [      "string"    ]  }}

Preview email rules

POST
/authn/identity-policy/email/preview

Count the active users whose email the given rules would refuse at sign-in, were they enforced there (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement on, or tightening a rule while it is on, to see who would be locked out.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Request Body

Candidate email rules

application/json
  1. body

Candidate email rules

allow_disposable?boolean
allow_plus_addressing?boolean
domain_restriction?

Response Body

OK

application/json
  1. response
affected_users?integer

AffectedUsers break at least one rule.

by_rule?

ByRule counts the users breaking each rule, by its code (email_domain_not_allowed, email_domain_blocked, email_plus_addressing_not_allowed, email_disposable_not_allowed). A user breaking two rules counts under both.

checked_users?integer

CheckedUsers are the active users with an email; all were checked.

object?string
Example Request
curl -X POST 'https://api.us.pontive.com/v1/authn/identity-policy/email/preview' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "affected_users": 0,  "by_rule": {    "property1": 0,    "property2": 0  },  "checked_users": 0,  "object": "string"}