---
title: Get an approval policy
slug: feature-experimentation/api/get-an-approval-policy
docTags: 
createdAt: 2026-10-13T18:16:15.508Z
---

{
  "id": "wjiC1KdRBER8fPAWGXUK7",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id}",
    "servers": [
      {
        "url": "http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id}",
        "description": "Local server"
      },
      {
        "url": "https://api.app.optimizely.com/flags-scheduling/projects/{project_id}/environments/{environment_id}/policies/{policy_id}",
        "description": "Production server"
      }
    ],
    "name": "Get an approval policy",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project_id",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "required",
          "name": "environment_id",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "required",
          "name": "policy_id",
          "type": "integer",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "BearerAuth",
          "name": "BearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>To get a personal token, see <a href=\"https://docs.developers.optimizely.com/web/docs/personal-token\" target=\"_blank\">https://docs.developers.optimizely.com/web/docs/personal-token</a></p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PolicyResponse",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "integer",
                "description": "The unique identifier for the policy"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The name of the policy"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "A description of the policy"
              },
              {
                "name": "approver_assignment_mode",
                "kind": "optional",
                "type": "string",
                "description": "How approvers are assigned to approval requests",
                "modelRef": "#/components/schemas/ApproverAssignmentMode",
                "customType": "ApproverAssignmentMode",
                "schema": []
              },
              {
                "name": "entity_type",
                "kind": "required",
                "type": "string<flag | ruleset>",
                "description": "The policy's entity type",
                "enum": [
                  "flag",
                  "ruleset"
                ]
              },
              {
                "name": "environment_id",
                "kind": "required",
                "type": "integer",
                "description": "The environment this policy belongs to"
              },
              {
                "name": "project_id",
                "kind": "required",
                "type": "integer",
                "description": "The project this policy belongs to"
              },
              {
                "name": "is_default",
                "kind": "required",
                "type": "boolean",
                "description": "<p>Whether this is the environment-level default policy</p>"
              },
              {
                "name": "default_preferences",
                "kind": "required",
                "type": "object",
                "description": "Change surfaces that require approval",
                "modelRef": "#/components/schemas/PolicyDefaultPreferences",
                "customType": "PolicyDefaultPreferences",
                "schema": [
                  {
                    "name": "audiences",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "metrics",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "ramp_perc",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "rules",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "ruleset",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "variations",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  }
                ]
              },
              {
                "name": "approvers",
                "kind": "required",
                "type": "array",
                "description": "List of approvers for this policy",
                "modelRef": "#/components/schemas/PolicyApprover",
                "customType": "PolicyApprover[]",
                "schema": [
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string<user | team>",
                    "description": "The type of approver",
                    "enum": [
                      "user",
                      "team"
                    ]
                  },
                  {
                    "name": "email",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Email of the approver (when type is user)</p>"
                  },
                  {
                    "name": "team_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>ID of the approver team (when type is team)</p>"
                  },
                  {
                    "name": "team_name",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Name of the approver team (when type is team)</p>"
                  }
                ]
              },
              {
                "name": "notification_recipients",
                "kind": "optional",
                "type": "array",
                "description": "<p>List of notification recipients (users and teams)</p>",
                "modelRef": "#/components/schemas/PolicyApprover",
                "customType": "PolicyApprover[]",
                "schema": [
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string<user | team>",
                    "description": "The type of approver",
                    "enum": [
                      "user",
                      "team"
                    ]
                  },
                  {
                    "name": "email",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Email of the approver (when type is user)</p>"
                  },
                  {
                    "name": "team_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>ID of the approver team (when type is team)</p>"
                  },
                  {
                    "name": "team_name",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Name of the approver team (when type is team)</p>"
                  }
                ]
              },
              {
                "name": "entities",
                "kind": "required",
                "type": "array",
                "description": "Entity approval settings associated with this policy",
                "modelRef": "#/components/schemas/PolicyEntity",
                "customType": "PolicyEntity[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "integer",
                    "description": "The entity record ID"
                  },
                  {
                    "name": "entity_id",
                    "kind": "required",
                    "type": "integer",
                    "description": "The flag ID"
                  },
                  {
                    "name": "entity_key",
                    "kind": "required",
                    "type": "string",
                    "description": "The flag key"
                  },
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The entity type (e.g. flag)</p>"
                  },
                  {
                    "name": "preferences",
                    "kind": "required",
                    "type": "map",
                    "description": "Preference overrides for this entity",
                    "example": "",
                    "customType": "map<string, boolean>",
                    "schema": []
                  },
                  {
                    "name": "archived",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Whether the entity is archived"
                  }
                ]
              },
              {
                "name": "created_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "Timestamp when the policy was created",
                "format": "date-time"
              },
              {
                "name": "updated_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "Timestamp when the policy was last updated",
                "format": "date-time"
              },
              {
                "name": "revision",
                "kind": "optional",
                "type": "integer",
                "description": "Revision number for optimistic locking"
              },
              {
                "name": "archived",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether the policy is archived"
              }
            ],
            "modelRef": "#/components/schemas/PolicyResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Policy not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "details",
                "kind": "required",
                "type": "string",
                "description": "Details of Error."
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer",
                "description": "Status code of the response.",
                "example": 400
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "9-ZQwKbL2_235ribw6K3E",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "f7iYOiowKjMVB380c4d_h",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "25kSdqVSj3uJMZ3A0nXzM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "l01czhcB0cdqaxd56CLKE",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:3002//projects/{project_id}/environments/{environment_id}/policies/{policy_id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "9-ZQwKbL2_235ribw6K3E"
    },
    "results": {
      "languages": [
        {
          "id": "DCljTa5wyToQK1SwJ2qpo",
          "language": "200",
          "code": "// Successful Response\n{\n  \"id\": 0,\n  \"name\": \"\",\n  \"description\": \"\",\n  \"approver_assignment_mode\": \"\",\n  \"entity_type\": \"\",\n  \"environment_id\": 0,\n  \"project_id\": 0,\n  \"is_default\": false,\n  \"default_preferences\": {\n    \"audiences\": false,\n    \"metrics\": false,\n    \"ramp_perc\": false,\n    \"rules\": false,\n    \"ruleset\": false,\n    \"variations\": false\n  },\n  \"approvers\": [\n    {\n      \"type\": \"\",\n      \"email\": \"\",\n      \"team_id\": \"\",\n      \"team_name\": \"\"\n    }\n  ],\n  \"notification_recipients\": [\n    {\n      \"type\": \"\",\n      \"email\": \"\",\n      \"team_id\": \"\",\n      \"team_name\": \"\"\n    }\n  ],\n  \"entities\": [\n    {\n      \"id\": 0,\n      \"entity_id\": 0,\n      \"entity_key\": \"\",\n      \"type\": \"\",\n      \"preferences\": \"\",\n      \"archived\": false\n    }\n  ],\n  \"created_at\": \"\",\n  \"updated_at\": \"\",\n  \"revision\": 0,\n  \"archived\": false\n}"
        },
        {
          "id": "RQMc-2i9zghQG0PhXa_ju",
          "language": "404",
          "code": "// Policy not found\n{\n  \"details\": \"\",\n  \"status\": 400\n}"
        }
      ],
      "selectedLanguageId": "DCljTa5wyToQK1SwJ2qpo"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}