---
title: "Reindex a document."
method: POST
path: "/api/v1/projects/{projectId}/pages/{pageId}/reindex"
tags: ["Pages"]
---

# Reindex a document.

`POST /api/v1/projects/{projectId}/pages/{pageId}/reindex`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/projects/{projectId}/pages/{pageId}/reindex`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/projects/:projectId/pages/:pageId/reindex/post.ts> (a function with typed inputs; its response is checked against the schema)

Re-crawls and re-indexes a document to update its content in the knowledge base. Use this when the source content has changed and you want the agent to use the updated version.

Notes: Only works for URL-based documents. For uploaded files, delete and re-upload instead.

## Path parameters

- `projectId` integer, required
- `pageId` integer, required

## Response `200`

Updating Document with the new content

- object
  - `status` 'error' | 'success': The status of the response
  - `data` object
    - `updated` boolean: Whether the process to update the Document started successfully or not

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `403`: Document couldn't have been updated
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 4 warning, 1 info
  - added the new `422.00` enum value to the `data/code` response property for the response status `400`
  - added the new `422.00` enum value to the `data/code` response property for the response status `401`
  - added the new `422.00` enum value to the `data/code` response property for the response status `403`
  - added the new `422.00` enum value to the `data/code` response property for the response status `500`
  - …1 more
- **2026-07-17** `b80e6dfcf78d`: 1 warning, 1 info
  - added the new `The Document with the id {pageId} couldn't have been updated` enum value to the `data/message` response property for the response status `403`
  - removed the `Page with id {pageId} cannot be reindexed` enum value from the `data/message` response property for the response status `403`
- **2023-07-27** `2cd2d58839d0`: 1 info
  - endpoint added
- **2023-06-02** `1842d7fd0430`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/pages/:pageId/reindex/post.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
