Skip to main content
GET
/
ai-agents
/
agent-builder
/
knowledge-base
/
{sourceType}
/
{uniqueId}
/
pages
Get Source Pages
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/{sourceType}/{uniqueId}/pages \
  --header 'apikey: <api-key>'
{
  "data": {
    "sourceDetails": {
      "fileName": "product-guide.pdf",
      "totalPages": 1,
      "createdAt": "2026-03-12T12:52:28.063000"
    },
    "pageContent": [
      {
        "content": "This is the extracted text content from the first page of the uploaded document. It contains the information that was indexed into the knowledge base for retrieval during agent conversations.",
        "pageNumber": 1,
        "charCount": 185
      }
    ]
  },
  "meta": {
    "current": {
      "limit": 1,
      "count": 1
    }
  }
}

Authorizations

apikey
string
header
required

API Key (i.e. Rest API Key from the Dashboard).

Path Parameters

sourceType
enum<string>
required

Source type (uploads, text, website)

Available options:
uploads,
text,
website
uniqueId
string
required

Unique file ID to fetch pages for

Query Parameters

limit
number

Maximum number of results to return per page.

page
number

To be used with affix for pagination.

affix
enum<string>

To paginate over results, use the value of affix as prepend or append.

Available options:
prepend,
append

Response

200 - application/json

Source pages retrieved successfully

data
object
meta
object