Skip to content

Create a policy branch rule

Request

Early AccessIdentity Engine
OAuth 2.0 scope:
  • okta.policies.manage

Creates a new rule in a policy branch.

Only applicable to ACCESS_POLICY type policies.

Path
policyIdstringrequired

id of the ACCESS_POLICY

Example:rst1d7xus97faIAgmti0
branchIdstringrequired

id of the policy branch

Example:rsb1d7xus97faIAgmti
Bodyapplication/jsonrequired
actionsobject(AccessPolicyRuleActions)

Specifies actions to be taken, or operations that may be allowed, if the rule conditions are satisfied.

conditionsobject(AccessPolicyRuleConditions)

Specifies conditions that must be met during policy evaluation to apply the rule. All policy conditions, as well as conditions for at least one rule must be met to apply the settings specified in the policy and the associated rule.

namestring

Name of the rule

priorityinteger or null

Priority of the rule

statusstring(LifecycleStatus)

Whether or not the rule is active. Use the activate query parameter to set the status of a rule.

Enum:"ACTIVE""INACTIVE"
systemboolean

Specifies whether Okta created the policy rule (system=true). You can't delete policy rules that have system set to true.

Default:false
typestring

Policy rule type. Branch rules are only supported for ACCESS_POLICY policies.

Value:"ACCESS_POLICY"
POST
/api/v1/policies/{policyId}/branches/{branchId}/rules
curl -i -X POST \
  https://subdomain.okta.com/api/v1/policies/rst1d7xus97faIAgmti0/branches/rsb1d7xus97faIAgmti/rules \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "ACCESS_POLICY",
    "name": "Require step-up auth for sensitive resources",
    "conditions": {
      "app": {
        "include": [
          {
            "type": "APP",
            "id": "0oa8r4uvw59mgQIt5d7"
          }
        ]
      },
      "network": {
        "connection": "ANYWHERE"
      }
    },
    "actions": {
      "appSignOn": {
        "access": "ALLOW",
        "verificationMethod": {
          "type": "ASSURANCE",
          "reauthenticateIn": "PT1H",
          "constraints": [
            {
              "knowledge": {
                "types": [
                  "PASSWORD"
                ]
              },
              "reauthenticateIn": "PT1H"
            },
            {
              "possession": {
                "userPresence": "REQUIRED"
              }
            }
          ]
        }
      }
    }
  }'

Responses

Created

Bodyapplication/json
actionsobject(AccessPolicyRuleActions)

Specifies actions to be taken, or operations that may be allowed, if the rule conditions are satisfied.

branchInformationobjectread-only

Information about the branch this rule belongs to

conditionsobject(AccessPolicyRuleConditions)

Specifies conditions that must be met during policy evaluation to apply the rule. All policy conditions, as well as conditions for at least one rule must be met to apply the settings specified in the policy and the associated rule.

createdstring or null, (date-time)read-only

Timestamp when the policy branch rule was created

idstringread-only

Identifier for the rule

lastUpdatedstring or null, (date-time)read-only

Timestamp when the policy branch rule was last modified

namestring

Name of the rule

priorityinteger or null

Priority of the rule

statusstring(LifecycleStatus)

Whether or not the rule is active. Use the activate query parameter to set the status of a rule.

Enum:"ACTIVE""INACTIVE"
systemboolean

Specifies whether Okta created the policy rule (system=true). You can't delete policy rules that have system set to true.

Default:false
typestring

Policy rule type. Branch rules are only supported for ACCESS_POLICY policies.

Value:"ACCESS_POLICY"
Response
{ "id": "rul7s3efg69mgPIt6ao", "status": "ACTIVE", "name": "Require step-up auth for sensitive resources", "priority": 1, "created": "2026-05-06T16:30:00.000Z", "lastUpdated": "2026-05-06T16:30:00.000Z", "system": false, "conditions": { "app": {}, "network": {} }, "actions": { "appSignOn": {} }, "_links": { "self": {} }, "type": "ACCESS_POLICY" }