Docs
Live demo
POST/api/v2/policies/apply-plan

Atomically create a policy from a cached preview and apply it. Returns job ID for tracking.

Request body application/json · ApplyPlanRequest

Apply plan request with preview ID

Required1 of 1 fields
preview_idstringrequired

Responses

202

Accepted

ApplyPlanResponse · 2 fields
job_idstring
policy_idstring
400

Preview expired or invalid

422

Unprocessable: Principal doesn't manage the target, so it doesn't change access on it (code request.unprocessable). Switch the target to managed, then try again. Before v7.3 this answer was 403 authorization.denied.

Common errors: 401 403 409 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close