---
title: "List all documents."
method: GET
path: "/api/v1/projects/{projectId}/pages"
tags: ["Pages"]
---

# List all documents.

`GET /api/v1/projects/{projectId}/pages`

## Request

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

Returns all indexed documents in an agent's knowledge base. Each document represents a piece of content (webpage, PDF, uploaded file) that the agent can reference when answering questions. Results are paginated.

You can use the optional `search` parameter to filter results by document URL or filename.

Notes: In the API, documents are called "pages" for backward compatibility.

## Path parameters

- `projectId` integer, required

## Query parameters

- `page` integer
- `limit` integer
- `order` 'asc' | 'desc'
- `search` string
- `crawl_status` 'all' | 'ok' | 'failed' | 'n/a' | 'queued' | 'limited'
- `index_status` 'all' | 'ok' | 'failed' | 'n/a' | 'queued' | 'limited'

## Response `200`

List of pages successfully retrieved.

- object
  - `status` 'error' | 'success': The status of the response
  - `data` object
    - `project` Project
      - `id` integer: Agent ID
      - `project_name` string: Agent name
      - `sitemap_path` string: Agent sitemap
      - `is_chat_active` boolean: Returns true when the agent has finished processing your documents and is ready to respond to queries. After creating an agent or adding new data sources, poll GET /api/v1/projects/{projectId} every 5-10 seconds until is_chat_active is true before sending the first message.
      - `is_master` boolean: Whether the agent is a master agent.
      - `user_id` integer: User ID of the agent owner
      - `team_id` integer: Team ID of the agent owner
      - `created_at` string, date-time: Date and time when the agent was created
      - `updated_at` string, date-time: Date and time when the agent was last updated
      - `deleted_at` string, date-time, nullable: Date and time when the agent was deleted
      - `type` 'SITEMAP' | 'URL': The type of content source used to train this agent.
      - `is_shared` boolean: Is the agent public or not
      - `shareable_slug` string, md5, nullable: Shareable slug that can be used to share the agent
      - `shareable_link` string, url, nullable: Shareable link that can be used to share the agent
      - `embed_code` string, html, nullable: Embed code that can be used to embed the agent
      - `live_chat_code` string, html, nullable: Live chat code that can be used to embed the live chat
      - `are_licenses_allowed` boolean: Whether licenses are allowed or not
      - `subdomain_slug` string, md5, nullable: Subdomain slug that can be used to share the agent
    - `pages` object
      - `current_page` integer: The page number of this response. The first page is 1.
      - `data` Page[]
        - `id` integer: Page ID
        - `page_url` string: URL of the document
        - `page_url_hash` string, md5: Hash of the URL of the document
        - `project_id` integer: Agent ID
        - `s3_path` string, nullable: This is the path where the document is stored in S3.\nNote: This is omitted in the response if the document is not a file
        - `crawl_status` 'ok' | 'queued' | 'failed' | 'n/a' | 'limited': The fetch step status — whether the page URL was successfully reached and its content fetched. Values: - `ok`: fetched successfully. - `queued`: waiting to be fetched. - `failed`: fetch attempt failed. - `limited`: fetched but content was truncated. - `n/a`: not applicable for this source type.
        - `index_status` 'ok' | 'queued' | 'failed' | 'n/a' | 'limited': The indexing step status — whether the fetched content has been processed and added to the agent's knowledge base. Values: - `ok`: indexed successfully. - `queued`: waiting to be indexed. - `failed`: indexing failed. - `limited`: partially indexed. - `n/a`: not applicable for this source type. Note: `crawl_status` can be `ok` while `index_status` is `queued` — fetch succeeded but ingestion is still pending.
        - `is_file` boolean: Whether the document is a file or not
        - `is_refreshable` boolean: Whether the document can be refreshed or not
        - `is_file_kept` boolean: Whether the file is kept after processing or not.\nNote: This is omitted in the response if the document is not a file
        - `filename` string, nullable: Filename of the document.\nNote: This is omitted in the response if the document is not a file
        - `filesize` integer, nullable: Filesize of the document.\nNote: This is omitted in the response if the document is not a file
        - `created_at` string, date-time: Date and time when the document was created
        - `updated_at` string, date-time: Date and time when the document was updated
        - `deleted_at` string, date-time: Date and time when the document was deleted
      - `first_page_url` string: The first page url
      - `from` integer: The first item number of the current page
      - `last_page` integer: Total number of pages available. Pagination is complete when the requested `page` equals `last_page`.
      - `last_page_url` string: The last page url
      - `next_page_url` string: The next page url
      - `path` string: The current page url
      - `per_page` integer: Number of results returned per page.
      - `prev_page_url` string: The previous page url
      - `to` integer: The last item number of the current page
      - `total` integer: The total number of items

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `404`: Agent not found
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 4 warning, 3 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 `404`
  - added the new `422.00` enum value to the `data/code` response property for the response status `500`
  - …3 more
- **2026-07-17** `b80e6dfcf78d`: 1 breaking, 3 warning, 9 info
  - the `data/pages/data/items/filename` response's property format changed from `binary` to no format for status `200`
  - deleted the `query` request parameter `duration`
  - added the new `Agent id is required` enum value to the `data/message` response property for the response status `404`
  - added the new `Agent with id {projectId} not found` enum value to the `data/message` response property for the response status `404`
  - …9 more
- **2023-07-27** `2cd2d58839d0`: 1 info
  - added the non-success response with the status `400`
- **2023-06-20** `ee92d035d652`: 1 warning
  - removed the optional property `data/pages/links` from the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/pages/get.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)
