---
title: "List all pages that belong to an agent."
method: GET
path: "/api/v1/projects/{projectId}/pages"
tags: ["Pages"]
---

# List all pages that belong to an agent.

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

Retrieve a list of all pages associated with an agent (formerly known as project). This endpoint allows you to fetch agent details and a collection of pages that belong to a specific agent. Each page object includes information such as the page ID, URL, hash of the URL, agent ID, crawl status, index status, file details (if applicable), creation and update timestamps, and other relevant attributes.
Here is an example to list all pages belonging to agent: [API](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/List_all_pages_of_a_project.ipynb) [SDK](https://github.com/Poll-The-People/customgpt-cookbook/blob/main/examples/SDK_List_all_pages_belonging_to_a_project.ipynb).

## Path parameters

- `projectId` integer, required

## Query parameters

- `page` integer
- `limit` integer
- `order` 'asc' | 'desc'
- `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 — Whether the agent is active or not
      - `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' — Agent type
      - `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 current page number
      - `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' — Is the document successfully added
        - `index_status` 'ok' | 'queued' | 'failed' | 'n/a' | 'limited' — Is the document available to agent
        - `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 — The last page number
      - `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 — The number of items 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
- `500` — Internal Server Error

---

[API](https://skmtc.net/poll-the-people/apis/customgpt-ai.md) · [All operations](https://skmtc.net/poll-the-people/apis/customgpt-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/poll-the-people/customgpt-ai/revisions/b80e6dfcf78d/schema)
