/api/knowledge/docsList knowledge documents
Returns a paginated, sorted, and filtered list of knowledge documents for the authenticated user. Filter by `status` (ready/pending/failed) or `external_id`. Supports full-text `search` across filename and label.
Parameters
Query
limitinteger · int32Number of items to return. Defaults to 50, min 1, max 200.
offsetinteger · int32Number of items to skip. Use with limit for pagination. Defaults to 0.
sort_bystringField to sort by: created_at, file_name, label, processing_status, knowledge_units, storage_units. Defaults to created_at.
sort_dirstringSort direction: asc or desc. Defaults to desc.
searchstringFull-text search matched against filename, label, and original file name.
statusstringFilter by processing status: staged, pending, ready, or failed.
external_idstringFilter to the document with this client-supplied external identifier. Returns 0 or 1 result.
200 Response
OKitemsKnowledgeDocPublicDto[] · nullableThe page of documents matching the request filters.
external_idstring · nullableClient-supplied stable identifier for upsert workflows (e.g. product SKU). When omitted at creation the server assigns a 36-character UUIDv7.
labelstring · nullableOptional human-readable label set by the user to identify the document. `null` if not set.
original_file_namestring · nullableThe original file name as provided at upload time. `null` for plain-text documents created via the text-input flow.
content_typestring · nullableFile extension / content type of the document (e.g. `txt`, `pdf`, `docx`, `md`).
content_size_bytesinteger · int64Raw byte size of the original content submitted.
estimated_knowledge_unitsnumber · doubleEstimated knowledge units calculated at accept time, before processing completes. Used for quota pre-checks.
estimated_storage_unitsnumber · doubleEstimated storage units calculated at accept time, before processing completes. Used for quota pre-checks.
knowledge_unitsnumber · double · nullableActual knowledge units consumed by this document. `null` while the document is still processing.
storage_unitsnumber · double · nullableActual storage units consumed by this document. `null` while the document is still processing.
processing_statusstring · nullableProcessing state: `pending` (queued or in progress), `ready` (available for AI retrieval), or `failed`.
processed_atstring · date-time · nullableUTC timestamp when processing completed. `null` while still processing.
created_atstring · date-timeUTC timestamp when the document was first created.
error_messagestring · nullableHuman-readable error description if the document is in the `failed` state. `null` otherwise.
estimated_pagesinteger · int32 · nullableEstimated page count for structured file types (PDF, DOCX, PPTX, XLSX, HTML), set at accept time. `null` for plain-text and image documents.
actual_pagesinteger · int32 · nullableActual page count, available after the document has been processed. `null` for plain-text and image documents.
has_extracted_textboolean`true` when the content was transformed during processing (PDF→text, DOCX→text, image→OCR). `false` for plain-text inputs.
active_persona_countinteger · int32Number of personas that currently have this document activated in their knowledge base.
preview_image_urlstring · nullableURL of a preview thumbnail image for the document. `null` if the document contains no images.
image_libraryDocImage[] · nullableCurated image library for the document (max 10 entries). At most one entry may have `IsPrimary=true`.
urlstring · nullable · max length 2048URL of the image. Always ready to fetch — no further resolution required.
descriptionstring · nullable · max length 360Human-readable caption / alt-text for the image. Empty string when the source didn't provide one.
is_primarybooleanWhen true, this entry is the document's primary image (used as the preview thumbnail). At most one entry per library may be primary.
widthinteger · int32Image width in pixels. Zero on legacy rows or when probing failed.
heightinteger · int32Image height in pixels. Zero on legacy rows or when probing failed.
sourcestring · enum: "client" | "extractor"Provenance of an image or link entry — where the URL originally came from. Reflects the origin, not who last touched the entry: editing an auto-discovered entry's description or URL does NOT change its source. The original source value is echoed back unchanged on every PATCH response.
link_libraryDocLink[] · nullableCurated link library for the document (max 10 entries). At most one entry may have `IsPrimary=true`.
urlstring · nullable · max length 2048Absolute `https://` URL the link points to.
descriptionstring · nullable · max length 360Human-readable label / anchor text for the link. Empty string when the source didn't provide one.
is_primarybooleanWhen true, this is the document's main redirect URL (the canonical destination for clicks on the document). At most one entry per library may be primary.
sourcestring · enum: "client" | "extractor"Provenance of an image or link entry — where the URL originally came from. Reflects the origin, not who last touched the entry: editing an auto-discovered entry's description or URL does NOT change its source. The original source value is echoed back unchanged on every PATCH response.
warningsKnowledgeDocWarning[] · nullableNon-fatal processing warnings (truncated library entries, advice about where to place URLs, notes about which entry was picked as primary, etc.). Empty when the document was processed without remarks.
coderequiredstring · nullableMachine-readable warning code. See the schema description above for the full list of values.
fieldstring · nullableJSON field / attribute key the warning relates to. Null for doc-wide warnings.
messagerequiredstring · nullableHuman-readable explanation of the warning.
total_countinteger · int32Total number of documents matching the filters, regardless of limit/offset. Use for pagination.
Error responses (4)
401Unauthorized — The request did not include valid credentials.403Forbidden — The credentials are valid but lack permission for this operation.429Rate limit exceeded — Too many requests. Check the `Retry-After` header for the recommended wait time. The `extensions.scope` field hints at the partition (`user`, `ip`, `session`, `api_key_slot`).500Server error — An unexpected server-side error occurred.All error bodies follow RFC 7807 with a stable code field. Error codes table →
curl -X GET "https://core.personaizer.com/api/knowledge/docs" \
-H "X-Api-Key: pa_live_YOUR_API_KEY"{
"items": [
{
"external_id": "SKU-42",
"label": "Wireless headphones — Aurora X1",
"original_file_name": "aurora-x1-spec-sheet.pdf",
"content_type": "pdf",
"content_size_bytes": 482117,
"estimated_knowledge_units": 12,
"estimated_storage_units": 4.6,
"knowledge_units": 11,
"storage_units": 4.4,
"processing_status": "ready",
"processed_at": "2026-05-04T13:42:11Z",
"created_at": "2026-05-04T13:41:08Z",
"error_message": null,
"estimated_pages": 3,
"actual_pages": 3,
"has_extracted_text": true,
"active_persona_count": 2,
"preview_image_url": "https://cdn.personaizer.com/u/3a/docs/aurora-x1-cover.jpg?sig=…",
"image_library": [
{
"url": "https://cdn.personaizer.com/u/3a/docs/aurora-x1-cover.jpg?sig=…",
"description": "Aurora X1 — front view",
"is_primary": true,
"width": 1024,
"height": 1024,
"source": "extractor"
}
],
"link_library": [
{
"url": "https://example.com/products/aurora-x1",
"description": "Product page",
"is_primary": true,
"source": "extractor"
}
],
"warnings": []
},
{
"external_id": null,
"label": "Return policy",
"original_file_name": null,
"content_type": "txt",
"content_size_bytes": 248,
"estimated_knowledge_units": 1,
"estimated_storage_units": 0.2,
"knowledge_units": 1,
"storage_units": 0.2,
"processing_status": "ready",
"processed_at": "2026-05-04T13:38:55Z",
"created_at": "2026-05-04T13:38:44Z",
"error_message": null,
"estimated_pages": null,
"actual_pages": null,
"has_extracted_text": false,
"active_persona_count": 4,
"preview_image_url": null,
"image_library": [],
"link_library": [],
"warnings": []
}
],
"total_count": 47
}