---
title: Reindex audit logs.
slug: api-documentation/reindex-audit-logs
docTags: 
createdAt: 2026-08-27T16:59:17.576Z
---

{
  "id": "JZFU5dS-c6uRf7flz2teS",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/pim/audit-logs/reindex",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/audit-logs/reindex"
      }
    ],
    "name": "Reindex audit logs.",
    "description": "<p>Rebuild the audit-log search index for the tenant (root/first entries only).</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site.",
          "minLength": 1
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>(DEPRECATED) This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "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": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>audit logs re-indexed.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "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": "object",
            "description": "",
            "customType": "ValidationErrorResponse.json",
            "schema": [],
            "modelRef": "RestAPI/GeneralRestResponse/ValidationErrorResponse.json",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse.json",
            "schema": [],
            "modelRef": "RestAPI/GeneralRestResponse/ErrorResponse.json",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "User's roles are insufficient for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse.json",
            "schema": [],
            "modelRef": "RestAPI/GeneralRestResponse/ErrorResponse.json",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "This is the default internal server error. System was not able to process this request.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse.json",
            "schema": [],
            "modelRef": "RestAPI/GeneralRestResponse/ErrorResponse.json",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "fFafqPsBIxApH_dwD_-v_",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/pim/audit-logs/reindex \\\n     --header 'accept: application/json' \\\n     --header 'x-upstart-tenant: string'"
        },
        {
          "id": "D3DwMY8hVNhI1jAhjyHtK",
          "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\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/pim/audit-logs/reindex\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "E9GMUPwJn5j020I_onPvC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/audit-logs/reindex\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "IyJJBCBTiAtoCTZTZr6Dv",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/pim/audit-logs/reindex\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "fFafqPsBIxApH_dwD_-v_"
    },
    "results": {
      "languages": [
        {
          "id": "o5avF1saVwwzEVEbxRmh4",
          "language": "200",
          "code": "// audit logs re-indexed.\n{}"
        },
        {
          "id": "_yCg5NEKbgHDDPX59bkR8",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{}"
        },
        {
          "id": "sMgGbrKG4GlSFFFUKFS1f",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint.\n{}"
        },
        {
          "id": "Pqn-8VcFS7rqOqWq1cWTT",
          "language": "403",
          "code": "// User's roles are insufficient for this endpoint.\n{}"
        },
        {
          "id": "ZX74rnLHnDHSqwNuTfdrL",
          "language": "default",
          "code": "// This is the default internal server error. System was not able to process this request.\n{}"
        }
      ],
      "selectedLanguageId": "o5avF1saVwwzEVEbxRmh4"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}