---
title: Update a Subject Access Request
slug: feature-experimentation/api/update-a-subject-access-request
docTags: 
createdAt: 2026-10-01T19:58:02.336Z
---

{
  "id": "fQ1pwX6CpO_UNmfI8ygbe",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}",
    "servers": [
      {
        "url": "https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}"
      }
    ],
    "name": "Update a Subject Access Request",
    "description": "Update a Subject Access Request by ID",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "request_id",
          "type": "integer<int64>",
          "description": "The ID of the Subject Access Request to be updated.",
          "format": "int64"
        }
      ],
      "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",
          "description": "A JSON string containing the Subject Access Request fields to be updated.",
          "customType": "SubjectAccessRequestUpdate",
          "schema": [
            {
              "name": "completed_at_time",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "Time when the request was completed",
              "format": "date-time"
            },
            {
              "name": "export_location",
              "kind": "optional",
              "type": "string",
              "description": "<p>s3 path to the Subject Access Request's ZIP file in the optimizely-sar-prod bucket</p>",
              "example": "s3://optimizely-sar-prod/{admin_account_id}-{parent_request_id}.zip"
            },
            {
              "name": "processing_started_time",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "Time when the processing of the request started",
              "format": "date-time"
            },
            {
              "name": "status",
              "kind": "required",
              "type": "string<pending | processing | completed | failure>",
              "description": "Status of the Subject Access Request",
              "example": "processing",
              "enum": [
                "pending",
                "processing",
                "completed",
                "failure"
              ]
            }
          ],
          "modelRef": "#/components/schemas/SubjectAccessRequestUpdate",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "apiKey",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        },
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "description": "<p>Write applications that authenticate with the REST API via OAuth 2.0. Or, to authenticate using 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>",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://app.optimizely.com/oauth2/authorize",
              "tokenUrl": "https://app.optimizely.com/oauth2/token",
              "scopes": {
                "all": "Full access to your account"
              }
            }
          },
          "requiredScopes": [
            "read",
            "write"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Return the updated Subject Access Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "SubjectAccessRequestInternal",
            "schema": [
              {
                "name": "account_id",
                "kind": "optional",
                "type": "integer<int64>",
                "readOnly": true,
                "description": "Admin account id",
                "format": "int64"
              },
              {
                "name": "completed_at_time",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "nullable": true,
                "description": "Time when the request was completed",
                "format": "date-time"
              },
              {
                "name": "data_source",
                "kind": "required",
                "type": "string<app_backend | app_backend_infra | data_platform | datawarehouse | external_systems | optimizely | optimizely_on_optimizely | program_management | security | business_systems | marketing | tse>",
                "description": "Subject Access Request Data Source",
                "example": "optimizely",
                "enum": [
                  "app_backend",
                  "app_backend_infra",
                  "data_platform",
                  "datawarehouse",
                  "external_systems",
                  "optimizely",
                  "optimizely_on_optimizely",
                  "program_management",
                  "security",
                  "business_systems",
                  "marketing",
                  "tse"
                ]
              },
              {
                "name": "data_type",
                "kind": "required",
                "type": "string<user | visitor>",
                "description": "Subject Access Request Data Type",
                "example": "user",
                "enum": [
                  "user",
                  "visitor"
                ]
              },
              {
                "name": "expired_at_time",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "<p>Time when the url expires (7 days from the completed_at_time)</p>",
                "format": "date-time"
              },
              {
                "name": "export_location",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The location to which the data will be exported.",
                "example": "s3://{bucket-name}/{account_id}/{parent_sar_id}/{sar_id}"
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int64>",
                "readOnly": true,
                "description": "Subject Access Request ID",
                "example": 12345,
                "format": "int64"
              },
              {
                "name": "identifier",
                "kind": "required",
                "type": "string",
                "description": "Subject Access Request Identifier",
                "example": "test@optimizely.com"
              },
              {
                "name": "identifier_type",
                "kind": "required",
                "type": "string<email | optimizely_end_user_id | dcp_id | fullstack_id | other>",
                "description": "Subject Access Request Identifier Type",
                "example": "email",
                "enum": [
                  "email",
                  "optimizely_end_user_id",
                  "dcp_id",
                  "fullstack_id",
                  "other"
                ]
              },
              {
                "name": "parent_request_id",
                "kind": "optional",
                "type": "integer<int64>",
                "readOnly": true,
                "description": "Parent Subject Access Request id",
                "example": 12345,
                "format": "int64"
              },
              {
                "name": "processing_started_time",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "nullable": true,
                "description": "Time when the processing of the request started",
                "format": "date-time"
              },
              {
                "name": "request_type",
                "kind": "required",
                "type": "string<access | delete>",
                "description": "Subject Access Request Request Type",
                "example": "access",
                "enum": [
                  "access",
                  "delete"
                ]
              },
              {
                "name": "requested_at_time",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "Time when the request was submitted",
                "format": "date-time"
              },
              {
                "name": "sla_deadline_time",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "Time by which the request must be deleted",
                "format": "date-time"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<pending | processing | completed | failure>",
                "readOnly": true,
                "description": "Status of the Subject Access Request",
                "example": "pending",
                "enum": [
                  "pending",
                  "processing",
                  "completed",
                  "failure"
                ]
              }
            ],
            "modelRef": "#/components/schemas/SubjectAccessRequestInternal",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid ID or request body",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "You do not have permission to edit the specified Subject Access Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Subject Access Request not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "Unexpected error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "SO_pXFJnMt8HtIWm7rtH2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.optimizely.com/v2/internal-subject-access-requests/{request_id} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"status\": \"processing\"\n     }'"
        },
        {
          "id": "0mkO4BSHdLArMafDgHTMn",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"status\": \"processing\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "TQItoDfArIIrJoO7aXd1U",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}\")\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\"\nrequest.body = JSON.dump({\n   \"status\": \"processing\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "mM-Onw4Khh0C2_HDbPQjx",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/v2/internal-subject-access-requests/{request_id}\"\n\npayload = json.dumps({\n   \"status\": \"processing\"\n})\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": "SO_pXFJnMt8HtIWm7rtH2"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Return the updated Subject Access Request\n{\n  \"account_id\": \"\",\n  \"completed_at_time\": \"\",\n  \"data_source\": \"optimizely\",\n  \"data_type\": \"user\",\n  \"expired_at_time\": \"\",\n  \"export_location\": \"s3://{bucket-name}/{account_id}/{parent_sar_id}/{sar_id}\",\n  \"id\": 12345,\n  \"identifier\": \"test@optimizely.com\",\n  \"identifier_type\": \"email\",\n  \"parent_request_id\": 12345,\n  \"processing_started_time\": \"\",\n  \"request_type\": \"access\",\n  \"requested_at_time\": \"\",\n  \"sla_deadline_time\": \"\",\n  \"status\": \"pending\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid ID or request body\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Invalid credentials\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// You do not have permission to edit the specified Subject Access Request\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Subject Access Request not found\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-5-default",
          "language": "default",
          "code": "// Unexpected error\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}