> ## Documentation Index > Fetch the complete documentation index at: https://docs.plainid.io/llms.txt > Use this file to discover all available pages before exploring further. # Update Policy Property > Update Policy State.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - `https://api.us1.plainid.io`
  • Canada (CA) - `https://api.ca1.plainid.io`
  • Europe (EU) - `https://api.eu1.plainid.io`

  • Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.

    ## OpenAPI ````json PATCH /api/2.0/policies/{envId} { "openapi": "3.0.3", "info": { "title": "Management APIs", "version": "1.0.0", "contact": { "name": "PlainID", "url": "https://plainid.com", "email": "contact@plainid.com" }, "license": { "name": "Commercial", "url": "https://plainid.com/license" }, "termsOfService": "https://www.plainid.com/terms/", "description": "

    The PlainID Authorization Platform provides Management capabilities through the APIs below.

    To access the Management APIs, make sure to enter your dedicated domain according to your PlainID Tenant Location:
    RegionBase URL
    United States (US)https://api.us1.plainid.io
    Canada (CA)https://api.ca1.plainid.io
    Europe (EU)https://api.eu1.plainid.io
    Local PAAhttps://api.plainid.local
    " }, "servers": [ { "description": "United States", "url": "https://api.us1.plainid.io" }, { "description": "Europe", "url": "https://api.eu1.plainid.io" }, { "description": "Canada", "url": "https://api.ca1.plainid.io" }, { "description": "Local PAA", "url": "https://api.plainid.local" } ], "tags": [ { "name": "access-file-authorizer-oas", "description": "access-file-authorizer-oas" }, { "name": "authz-packager-oas", "description": "authz-packager-oas" }, { "name": "SQL Database Authorizer", "description": "API for modifying SQL queries based on authorization policies" }, { "name": "delegated-admin-oas", "description": "delegated-admin-oas" }, { "name": "Discovery", "description": "Discovery APIs" }, { "name": "Enrichment", "description": "Enrichment APIs" }, { "name": "env-mgmt-oas", "description": "env-mgmt-oas" }, { "name": "hybrid-commander-oas", "description": "hybrid-commander-oas" }, { "name": "auth-keys", "description": "Auth key operations" }, { "name": "components", "description": "Component operations" }, { "name": "paas", "description": "PAA operations" }, { "name": "paa-groups", "description": "PAA group operations" }, { "name": "packages", "description": "Package configuration operations" }, { "name": "secret-stores", "description": "Secret store operations" }, { "name": "Table Mapping", "description": "Table Mapping" }, { "name": "Column Mapping", "description": "Column Mapping" }, { "name": "Api Mapping", "description": "Api Mapping" }, { "name": "Asset Type Ruleset", "description": "Asset Type Ruleset" }, { "name": "Business Entity Ruleset", "description": "Business Entity Ruleset" }, { "name": "notifier-oas", "description": "notifier-oas" }, { "name": "shadow-tracker", "description": "Shadow tracker SSE stream" }, { "name": "orchestrator-oas", "description": "orchestrator-oas" }, { "name": "POP", "description": "pop operations" }, { "name": "org-mgmt-oas", "description": "org-mgmt-oas" }, { "name": "pip-mgmt-oas", "description": "pip-mgmt-oas" }, { "name": "monitor-loggers", "description": "monitor-loggers" }, { "name": "Policy Management APIs", "description": "Policy Management APIs" }, { "name": "Conditions", "description": "Conditions." }, { "name": "Dynamic Groups", "description": "Dynamic groups." }, { "name": "Policy Management APIs 1.0", "description": "Policy Management APIs 1.0" }, { "name": "Policy Management APIs 2.0", "description": "Policy Management APIs 2.0" }, { "name": "Policy Building Blocks Management APIs 2.0", "description": "Policy Building Blocks Management APIs 2.0" }, { "name": "Audit", "description": "Audit" }, { "name": "Asset Template", "description": "Asset Template" }, { "name": "Application", "description": "Application" }, { "name": "Api Mapper", "description": "Api Mapper" }, { "name": "Identity Template", "description": "Identity Template" }, { "name": "Identity Sources", "description": "Identity Sources" }, { "name": "Mapper Sets", "description": "Mapper Sets" }, { "name": "Identity Template V2", "description": "Identity Template V2" }, { "name": "PAA Sources", "description": "PAA Sources" }, { "name": "PAA Views", "description": "PAA Views" }, { "name": "PAA Groups", "description": "PAA Groups" }, { "name": "Scope", "description": "Managed Scope APIs" }, { "name": "Authentication for Management APIs", "description": "Authentication for Management APIs" }, { "name": "runtime", "description": "runtime" }, { "name": "Cache Management", "description": "Cache invalidation operations for Runtime service" } ], "externalDocs": { "url": "https://docs.plainid.io/apidocs/policy-management-apis" }, "paths": { "/api/2.0/policies/{envId}": { "patch": { "tags": [ "Policy Management APIs 2.0" ], "summary": "Update Policy State", "description": "Update Policy State.

    Notice

    Accessing the Policy Management APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - `https://api.us1.plainid.io`
  • Canada (CA) - `https://api.ca1.plainid.io`
  • Europe (EU) - `https://api.eu1.plainid.io`

  • \n

    Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.

    ", "operationId": "updatePolicyState", "parameters": [ { "in": "path", "name": "envId", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The Environment ID can be found under the Details Tab in the Environment Settings." }, { "in": "query", "name": "filter[authWsId]", "description": "The Policies Workspace ID can be found in the Workspace Settings.", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "in": "query", "name": "filter[id]", "description": "Policy ID Filter", "required": true, "schema": { "type": "string" } } ], "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/patchRequest" } }, "examples": { "Switch Policy State": { "value": [ { "op": "replace", "path": "/state", "value": true } ] }, "Update Policy ID": { "value": [ { "op": "replace", "path": "/policyId", "value": "new_policy_id" } ] } } } }, "required": true }, "responses": { "204": { "description": "Success - No Content", "headers": { "x-request-id": { "schema": { "type": "string" } } } }, "400": { "description": "bad request", "headers": { "x-request-id": { "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" }, "examples": { "Authorization WS not found": { "value": { "errors": [ { "code": "PAC-001", "args": { "0": "ceef5853-1491-4d1c-ae52-2f2a1729b3a4" }, "id": "EWWOTR", "status": 400, "name": "AuthorizationWsNotFound", "message": "Policies Workspace: [ceef5853-1491-4d1c-ae52-2f2a1729b3a4] not found" } ] } }, "Patch operation rejected by policy-mgmt": { "value": { "errors": [ { "code": "PA-072", "id": "E9F3KD", "status": 400, "name": "BadRequestError", "message": "Could not locate patch path" } ] } }, "Duplicate field in request body": { "value": { "errors": [ { "id": "EPMQJV", "status": 400, "name": "DuplicateJsonFieldError", "message": "Duplicate field in request body: 'value'" } ] } } } } } }, "401": { "description": "Unauthorized", "headers": { "x-request-id": { "schema": { "type": "string" } } } }, "404": { "description": "not found", "headers": { "x-request-id": { "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" }, "examples": { "Policy not found": { "value": { "errors": [ { "code": "PUA-033", "args": { "0": "a0a455bb-7dc3-4cd3-b0d2-86631ac75379", "1": "ceef5853-1491-4d1c-ae52-2f2a1729b3a4" }, "id": "E7WJBB", "status": 404, "name": "PolicyNotFoundError", "message": "Policy Id doesn't exist in the environment" } ] } } } } } }, "422": { "description": "Validation Failed - Invalid UUID or invalid /policyId value", "headers": { "x-request-id": { "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" }, "examples": { "Invalid ID Format": { "value": { "errors": [ { "code": "V-032", "args": { "0": "ed252aa5-9d0c-4193-838-60bf20b13109", "1": "uuid" }, "id": "EEJQMA", "status": 422, "name": "UnprocessableEntityError", "message": "$: test is an invalid uuid" } ] } }, "Invalid policy ID characters": { "value": { "errors": [ { "code": "V-023", "id": "E4K7QZ", "status": 422, "name": "UnprocessableEntityError", "message": "Invalid policy ID. Acceptable characters: letters (a-z, A-Z), digits (0-9), hyphens ('-'), underscores ('_'), colons (':'), and periods ('.')." } ] } } } } } } } } } }, "components": { "schemas": { "patchRequest": { "oneOf": [ { "$ref": "#/components/schemas/patchRequestState" }, { "$ref": "#/components/schemas/patchRequestPolicyId" } ] }, "Errors": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/Error" } } } }, "patchRequestState": { "type": "object", "required": [ "op", "path", "value" ], "properties": { "op": { "type": "string", "enum": [ "replace" ] }, "path": { "type": "string", "enum": [ "/state" ] }, "value": { "type": "boolean", "default": true } } }, "patchRequestPolicyId": { "type": "object", "required": [ "op", "path", "value" ], "properties": { "op": { "type": "string", "enum": [ "replace" ] }, "path": { "type": "string", "enum": [ "/policyId" ] }, "value": { "type": "string" } } }, "Error": { "type": "object", "properties": { "code": { "type": "string" }, "id": { "type": "string" }, "status": { "type": "integer" }, "name": { "type": "string" }, "message": { "type": "string" }, "args": { "type": "object", "properties": { "path": { "type": "string" } } } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": " For more details about Administration API Authentication, check out the Authentication APIs documentation
    Provide your bearer token in the Authorization header when making requests to protected resources.
    Example: `Authorization: Bearer 123`" } } } } ````