AI agent
List a knowledge source's documents
Authorization
AuthorizationstringrequiredAn API token, sent as Bearer <token>.
Needs the settings:read ability
Path parameters
sourcestringrequiredId of the knowledge source, starting with ks_, such as ks_01jx2m8k4t. Find it with GET /knowledge/sources.
Query parameters
statusstringactive, error, excluded, pending or removed.
Available options:activeerrorexcludedpendingremoved
qstringWords to search for, such as refund.
Maximum length: 200
afterstringLeave out for the first page; pass the cursor the previous page returned for the next.
Maximum length: 2100
limitintegerHow many items to return in one page, such as 25.
Format: int32 · Maximum: 100
Response 200
OKdataobject[] | nullrequiredThe items of this page, as a list; empty when nothing matches.
Show child attributesHide child attributes
chunk_countintegerrequiredHow many searchable pieces the document's text was cut into.
Format: int32
errorstring | nullrequiredWhy the document could not be fetched or indexed, in words. Null when there is no error.
error_codestring | nullrequiredShort code of the document's error. Null when there is no error.
excluded_bystring | nullrequiredWhy the document is left out: member, robots, pattern, js_rendered, duplicate, too_large, unsupported_type, empty or draft. Null when it is not excluded.
external_idstringrequiredThe document's own id at its source, such as its address for a website page. Unique within the source.
fetched_atstring | nullrequiredWhen the document was last fetched from its source. Null when it never was.
Format: date-time
idstringrequiredThe id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
indexed_atstring | nullrequiredWhen the document was last made searchable. Null when it is not indexed yet.
Format: date-time
linked_article_idstring | nullrequiredId of the help center article this document was imported into, starting with art_. Null when there is none.
localestringrequiredThe document's language as a language code, such as en. Empty when unknown.
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
pathstringrequiredWhere the document sits in its source, such as /docs/billing/refunds. Include and exclude patterns match against it.
statusstringrequiredWhere the document stands: pending, active (searchable), excluded, error or removed.
titlestringrequiredThe document's title. Empty when it has none.
updated_atstringrequiredWhen it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
Format: date-time
urlstring | nullrequiredThe document's address at its source. Null when it has none.
linksobjectAddresses of related pages by name, such as next; left out when there are none.
metaobjectrequiredShow child attributesHide child attributes
next_cursorstring | nullrequiredSend it as cursor to read the next page; null on the last page.
per_pageintegerrequiredHow many items a page holds at most, such as 25.
Format: int64
prev_cursorstring | nullrequiredSend it as cursor to read the page before; null on the first page.
totalintegerHow many items match in all; left out when the list does not count them.
Format: int64
Response error
ErrorcodestringrequiredStable code for programs to tell errors apart, such as validation_failed or internal_error.
errorsobjectEach rejected field mapped to its messages. Only present when the input was invalid.
messagestringrequiredWhat went wrong, in words safe to show a person.