Skip to Content
APIEndpointsList knowledge documents

List knowledge documents

The brand’s knowledge base: the documents Asky grounds content generation and alignment claims in (uploaded PDFs and pasted text). One row per document with title, the user’s description, source_type, processing status, size (char_count), and updated_at — metadata only, never the document text. Fetch Get knowledge document for the full content of one.

Style documents (attached to a writing style rather than general brand knowledge) are excluded by default. Pass writing_style_id to see one style’s documents instead.

Requires the read:knowledge_base scope.

GET /v1/brands/{brand_id}/knowledge-documents

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Query parameters

ParameterTypeRequiredDescription
limitintegeroptionalRows per page, 1 to 100. Defaults to 20.
cursorstringoptionalOpaque cursor from the previous response. Treat it as a token, never construct one.
writing_style_iduuidoptionalShow this style’s documents instead of general brand knowledge.

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/knowledge-documents?limit=50' \ --header 'Authorization: Bearer <api-key>'

Response

{ "data": [ { "id": "b4f7e2a1-9c3d-4e6f-8a1b-2c5d7e9f0a3b", "title": "Product Positioning FAQ", "user_description": "Internal FAQ used to ground content about our differentiation.", "source_type": "paste", "status": "ready", "char_count": 4820, "updated_at": "2026-08-20T09:14:22.000Z" }, { "id": "d29a6f31-1c4e-4b8a-9d2f-7a0c3e5b8f61", "title": "2026 Product Spec Sheet", "user_description": null, "source_type": "pdf", "status": "ready", "char_count": 12040, "updated_at": "2026-08-27T16:03:11.000Z" } ], "pagination": { "limit": 50, "has_more": false, "next_cursor": null }, "request_id": "req_2f7b90c14ae8471da3cd" }

Response fields

FieldTypeDescription
data[].iduuidrequired. Use it as document_id on Get knowledge document and Get knowledge document file
data[].titlestringrequired
data[].user_descriptionstring | nullrequired
data[].source_typestringrequired. One of paste, pdf, mcpmcp is a legacy value, see Notes
data[].statusstringrequired. One of processing, ready, failed
data[].char_countintegerrequired
data[].updated_attimestamptzrequired
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestA parameter is unknown or malformed. The message names it
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
403insufficient_scopeThe key does not carry read:knowledge_base
404not_foundThe brand does not exist, or this key is not allowed to reach it
429rate_limitedOver 300 requests per minute

Notes

Style documents are excluded unless you ask for them. Omit writing_style_id to see the brand’s general knowledge base; pass it to see one writing style’s own document set instead. A document belongs to one or the other, never both.

This is metadata only. There is no raw_text or body_html here — fetch Get knowledge document for the full content of a specific row.

Bounded, not deeply paginated. limit and cursor work as they do elsewhere, but this endpoint never returns more than 200 documents total across all pages, regardless of how many the brand has. In practice a brand’s knowledge base is bounded by its 50MB workspace storage cap long before row count becomes the limiting factor, but the query itself still hard-caps at 200 rows.

source_type: "mcp" is legacy. It marks a document imported through the app’s now-removed “from-app” import path. This API never creates one, but an existing document imported that way can still show it.

Last updated on