POST /api/v1/policies/{policyId}/rules

Creates a policy rule

Note: You can't create additional rules for the PROFILE_ENROLLMENT or POST_AUTH_SESSION policies.

Servers

Path parameters

Name Type Required Description
policyId String Yes

id of the Policy

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
limit String No

Defines the number of policy rules returned. See Pagination.

activate Boolean No

Set this parameter to false to create an INACTIVE rule.

Default value: true

Request body fields

Name Type Required Description
id String No

Identifier for the rule

_links Object No
priority Integer No

Priority of the rule

created String No

Timestamp when the rule was created

name String No

Name of the rule

system Boolean No

Specifies whether Okta created the Policy Rule (system=true). You can't delete Policy Rules that have system set to true.

Default value: false

type String No

Rule type

Possible values:

  • "PASSWORD"
  • "ACCESS_POLICY"
  • "MFA_ENROLL"
  • "PROFILE_ENROLLMENT"
  • "IDP_DISCOVERY"
  • "ENTITY_RISK"
  • "RESOURCE_ACCESS"
  • "SIGN_ON"
  • "POST_AUTH_SESSION"
status String No

Possible values:

  • "ACTIVE"
  • "INACTIVE"
lastUpdated String No

Timestamp when the rule was last modified

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.