---
title: Remove Legal Hold from a Customer
slug: api-documentation/remove-legal-hold-from-a-customer
docTags: 
createdAt: 2026-08-27T17:03:03.147Z
---

{
  "id": "kRtpj4V7tsR-NngySVxzs",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId}",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId}"
      }
    ],
    "name": "Remove Legal Hold from a Customer",
    "description": "Removes the legal hold from the specified customer. The provided reason is\ncaptured in the audit trail.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "customerId",
          "type": "string<uuid>",
          "description": "Unique identifier for the customer that the call should be interacting with.",
          "format": "uuid"
        }
      ],
      "headerParameters": [
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site."
        },
        {
          "kind": "required",
          "name": "x-upstart-site",
          "type": "string",
          "description": "The site identifier."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Request body for removing a legal hold.",
          "customType": "RemoveLegalHoldRequest",
          "schema": [
            {
              "name": "reason",
              "kind": "required",
              "type": "string",
              "description": "Reason for removing the legal hold."
            }
          ],
          "modelRef": "#/components/schemas/RemoveLegalHoldRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "Session based authorization. This authentication is required for clients to interact with any of the management APIs.",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Legal hold removed successfully.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Error response for validation errors.",
            "customType": "ValidationErrorResponse[]",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UnauthorizedErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "User's roles are insufficient for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "The requested resource was not found.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "There was an internal server error.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Yuuzn7MTad6TkxlfoW-bd",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --header 'x-upstart-site: string' \\\n     --data '{\n     \"reason\": \"\"\n     }'"
        },
        {
          "id": "rm_y0i-WeOSbj223ushOk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\nmyHeaders.append(\"x-upstart-site\", \"string\");\n\nvar raw = JSON.stringify({\n   \"reason\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "FFVNXti0OP2xYkrlR-nzk",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId}\")\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[\"x-upstart-tenant\"] = \"string\"\nrequest[\"x-upstart-site\"] = \"string\"\nrequest.body = JSON.dump({\n   \"reason\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "55rYKSTu0eyiN2GfSlZLv",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/customer/legal-hold/{customerId}\"\n\npayload = json.dumps({\n   \"reason\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string',\n   'x-upstart-site': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Yuuzn7MTad6TkxlfoW-bd"
    },
    "results": {
      "languages": [
        {
          "id": "MjIxPq-shJuoq-AINqOFD",
          "language": "200",
          "code": "// Legal hold removed successfully.\n"
        },
        {
          "id": "4UK1gxsjkwT8HiPjMDxmw",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n[\n  {\n    \"name\": \"\",\n    \"code\": \"\",\n    \"detail\": \"\",\n    \"reason\": \"\"\n  }\n]"
        },
        {
          "id": "RcvHvBUuslD_7S24ivdCF",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "LCgCOFT5REO_BQx7IG9LO",
          "language": "403",
          "code": "// User's roles are insufficient for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "5AxmCjGBtuFCkoyRUfyZ8",
          "language": "404",
          "code": "// The requested resource was not found.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "Pwma02_0b_2Iysjb1TvuE",
          "language": "500",
          "code": "// There was an internal server error.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "MjIxPq-shJuoq-AINqOFD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}