Skip to main content
GET
/
ai-agents
/
agent-builder
/
knowledge-base
List Knowledge Base Records
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base \
  --header 'apikey: <api-key>'
{
  "data": [
    {
      "uniqueId": "<string>",
      "appId": "<string>",
      "sourceName": "<string>",
      "type": "<string>",
      "status": "<string>",
      "lastSynced": 123,
      "createdAt": 123,
      "updatedAt": 123
    }
  ],
  "meta": {
    "current": {
      "limit": 123,
      "count": 123
    },
    "previous": {
      "affix": "prepend",
      "cursor": "<string>"
    },
    "next": {
      "affix": "append",
      "cursor": "<string>"
    }
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Query Parameters

cursor
string

Pagination cursor (paginationKey from previous response meta). Used to fetch records relative to a specific position.

Example:

"1732492800000.12345"

limit
number

Number of records per page (default: 10, maximum: 100)

Example:

20

affix
enum<string>

Navigation direction: "append" for next/older records, "prepend" for previous/newer records

Available options:
append,
prepend
start
number
required
end
number
required
endTime
number

End timestamp (Unix timestamp in milliseconds) to filter records created before this time

Example:

1732579200000

startTime
number

Start timestamp (Unix timestamp in milliseconds) to filter records created after this time

Example:

1732492800000

Response

Knowledge base records retrieved successfully with pagination metadata

data
object[]

Array of knowledge base records (excludes _id, __v, paginationKey)

meta
object

Pagination metadata for navigation