Skip to content

Restore a policy branch

Request

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

Restores a previously live branch from the policy's branch history back to LIVE status, replacing the current LIVE 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/json
commentsstring, <= 1024 characters

Comments or notes about the lifecycle operation that the branch is affected by

Example:"Promoting to production after successful testing"
POST
/api/v1/policies/{policyId}/history/{branchId}/lifecycle/rollback
curl -i -X POST \
  https://subdomain.okta.com/api/v1/policies/rst1d7xus97faIAgmti0/history/rsb1d7xus97faIAgmti/lifecycle/rollback \
  -H 'Content-Type: application/json' \
  -d '{
    "comments": "Rolling back due to performance issues identified in production"
  }'

Responses

Success

Bodyapplication/json
branchInformationobject(PolicyBranchInformation)

Information about the branch of the policy object, including its status

conditionsstring or null

Policy conditions aren't supported for ACCESS_POLICY. Conditions are applied at the rule level.

Default:null
createdstring, (date-time)read-only

Timestamp when the policy branch was created

descriptionstring

Description of the policy

idstringread-only

Identifier of the policy

lastUpdatedstring, (date-time)read-only

Timestamp when the policy branch was last modified

namestringrequired

Name of the policy

priorityinteger

Specifies the order in which this policy is evaluated in relation to the other policies

statusstring(LifecycleStatus)

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

Enum:"ACTIVE""INACTIVE"
systemboolean

Specifies whether Okta created the policy

Default:false
typestringrequired

Policy type. Branching is only supported for ACCESS_POLICY policies.

Value:"ACCESS_POLICY"
_embeddedobjectread-only
Response
{ "id": "rst3m9wxy25icKDo0vk1", "status": "ACTIVE", "name": "MFA Pilot Test", "description": "Testing enhanced MFA requirements for pilot users", "priority": 1, "system": false, "type": "ACCESS_POLICY", "conditions": null, "created": "2026-03-10T09:00:00.000Z", "lastUpdated": "2026-05-06T15:30:00.000Z", "branchInformation": { "id": "rsb3m9wxy25icKDo0vk", "status": "LIVE", "comments": "Rolling back due to performance issues identified in production" }, "_links": { "self": {}, "rules": {} } }