Skip to main content
POST
Create

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

The SignInPolicyServiceCreateRequest message.

displayName
string
required

A human-readable name for the policy.

allowedMfaTypes
enum<string>[] | null

The credential types accepted as a second factor.

Available options:
CREDENTIAL_TYPE_UNSPECIFIED,
CREDENTIAL_TYPE_PASSKEY,
CREDENTIAL_TYPE_PASSWORD,
CREDENTIAL_TYPE_TOTP,
CREDENTIAL_TYPE_EMAIL_OTP,
CREDENTIAL_TYPE_RECOVERY_CODE,
CREDENTIAL_TYPE_DELEGATED_GOOGLE,
CREDENTIAL_TYPE_DELEGATED_MICROSOFT,
CREDENTIAL_TYPE_UPSTREAM_IDP
allowedPrimaryTypes
enum<string>[] | null

The primary credential types users may sign in with.

Available options:
CREDENTIAL_TYPE_UNSPECIFIED,
CREDENTIAL_TYPE_PASSKEY,
CREDENTIAL_TYPE_PASSWORD,
CREDENTIAL_TYPE_TOTP,
CREDENTIAL_TYPE_EMAIL_OTP,
CREDENTIAL_TYPE_RECOVERY_CODE,
CREDENTIAL_TYPE_DELEGATED_GOOGLE,
CREDENTIAL_TYPE_DELEGATED_MICROSOFT,
CREDENTIAL_TYPE_UPSTREAM_IDP
defaultOutcome
Policy Outcome · object | null

PolicyOutcome is the effect of a matched rule. Exactly one kind is set.

This message contains a oneof named kind. Only a single field of the following list may be set at a time:

  • allow
  • deny
  • stepUpRequired
  • challengeRequired
  • enrollmentRequired
priority
integer<int32>

When a user matches more than one policy, the policy with the highest priority applies.

rules
Policy Rule · object[] | null

The ordered rule cascade.

Response

200 - application/json

Successful response

The SignInPolicyServiceCreateResponse message.

signInPolicy
Sign In Policy · object | null

SignInPolicy defines how users sign in.