---
title: Unarchive Exclusion Groups
slug: feature-experimentation/api/unarchive-exclusion-groups
docTags: 
createdAt: 2026-08-28T15:54:06.731Z
---

{
  "id": "UTi_cvMuIL6N7pG5zvXX0",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived",
    "servers": [
      {
        "url": "https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived"
      }
    ],
    "name": "Unarchive Exclusion Groups",
    "description": "<p>Unarchive one or more exclusion groups in a project.</p>\n<p>This operation corresponds to the <code>unarchive_url</code> in a Groups response.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project_id",
          "type": "integer",
          "example": 12345,
          "description": "The project identifier"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"keys\":[\"1,2\"]}",
          "description": "",
          "customType": "BulkOperationsRequestBody",
          "schema": [
            {
              "name": "keys",
              "kind": "optional",
              "type": "array",
              "description": "The list of resource keys to perform the desired operation",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "modelRef": "#/components/schemas/BulkOperationsRequestBody",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "apiKey",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        },
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "description": "Write applications that authenticate with the REST API via OAuth 2.0.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://app.optimizely.com/oauth2/authorize",
              "tokenUrl": "https://app.optimizely.com/oauth2/token",
              "scopes": {
                "all": "Grants all access"
              }
            }
          },
          "requiredScopes": [
            "read",
            "write"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Successful unarchive of Groups.</p>\n<p>The response includes RESTful JSON (<a href=\"https://restfuljson.org/\" target=\"_blank\">https://restfuljson.org/</a>) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"987\":{\"archive_url\":\"/projects/12345/groups/archived\",\"archived\":false,\"created_time\":\"2019-05-08T00:00:00.000Z\",\"description\":\"Promo group description\",\"environment_key\":\"production\",\"id\":987,\"name\":\"Promo group\",\"project_id\":12345,\"revision\":1,\"rules\":{\"321\":{\"created_time\":\"2022-01-08T00:00:00.000Z\",\"flag_key\":\"recurring_revenue\",\"flag_name\":\"Recurring Revenue\",\"flag_status\":\"unarchived\",\"rule_key\":\"experiment_one\",\"rule_name\":\"Experiment One\",\"traffic_allocation\":2000,\"updated_time\":\"2022-01-08T00:00:00.000Z\"}},\"unarchive_url\":\"/projects/12345/groups/unarchived\",\"update_url\":\"/projects/12345/groups\",\"updated_time\":\"2019-05-08T00:00:00.000Z\",\"url\":\"/projects/12345/groups/123\",\"urn\":\"groups.flag.optimizely.com::987\"}}",
            "description": "Map of groups that include group id as key and group payload as value.",
            "customType": "GroupMap",
            "schema": [],
            "modelRef": "#/components/schemas/GroupMap",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Malformed requests and invalid parameter names and types",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Do not have permission to perform the operation",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not found. No content",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "409",
        "description": "Conflicting resource state with requested action",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "lKxzJnxIxNilETWavj2F5",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived \\\n     --header 'accept: application/json'"
        },
        {
          "id": "IrVYfZN8CG_gIj2GgTZ3G",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "S7n1FHdQNvN-PD0HPZ588",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "QbzsCc0iI_Czxx4XrNOKD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/flags/v1//projects/{project_id}/groups/unarchived\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "lKxzJnxIxNilETWavj2F5"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful unarchive of Groups.\nThe response includes RESTful JSON (https://restfuljson.org/) styled links. If a\nlink is not present in the response, it indicates a user is not authorized to access\nthe related resource.\n{}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Malformed requests and invalid parameter names and types\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Invalid credentials\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Do not have permission to perform the operation\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found. No content\n"
        },
        {
          "id": "response-5-409",
          "language": "409",
          "code": "// Conflicting resource state with requested action\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}