Workspace API
Find Knowledge
Search knowledge sections, or list the workspace's pages, with POST /workspace/knowledge/find.
POST https://api.parcelengineering.com/api/v1/workspace/knowledge/findWith queries, returns the sections that best match, each with a snippet. Without queries, lists the live pages in folder order. Costs 0 credits and requires knowledge:read. Pass workspace_id as a query parameter when authenticating with a user JWT; API keys infer it.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
queries | string[] (1-4, each 1-200 characters) | No | Phrasings of what you are looking for. Several phrasings find more than one. Omit to list pages. |
limit | integer 1-20 | No | Sections to return. Defaults to 8. Ignored when listing. |
path | string | No | Limit either form to a folder and its subfolders, such as Go-to-market. |
archived | boolean | No | List archived pages instead of live ones. Listing only; with queries it is 400. |
Example
curl -X POST https://api.parcelengineering.com/api/v1/workspace/knowledge/find \ -H "Authorization: Bearer pcl_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "queries": ["who we sell to", "ideal customer"], "limit": 5 }'const response = await fetch( 'https://api.parcelengineering.com/api/v1/workspace/knowledge/find', { method: 'POST', headers: { 'Authorization': 'Bearer pcl_your_api_key', 'Content-Type': 'application/json', }, body: JSON.stringify({ queries: ['who we sell to', 'ideal customer'], limit: 5 }), });
const { data, metadata } = await response.json();Response: search
| Field | Type | Description |
|---|---|---|
hits[].section_id | string | The section matched. Pass it as section to read just that part. |
hits[].page_id | string | The page it belongs to. |
hits[].file_id | string | null | Set when the section comes from an attached file. |
hits[].ref, path, title | string | The page’s folder/Title, folder and title. |
hits[].heading_path | string[] | The headings above the section, outermost first. |
hits[].snippet | string | The matching text, shortened. |
hits[].score | number | Relative relevance within this response. |
{ "data": { "hits": [ { "section_id": "5d3c9a1e-0001-4b7d-9e5a-000000000021", "page_id": "5d3c9a1e-0001-4b7d-9e5a-000000000020", "file_id": null, "ref": "Go-to-market/ICP", "path": "Go-to-market", "title": "ICP", "heading_path": ["Who we sell to"], "snippet": "Mid-market general contractors with 50-500 staff…", "score": 0.82 } ] }, "metadata": { "credits": 0 }}Response: list
| Field | Type | Description |
|---|---|---|
pages[] | object | { id, ref, path, title, description, revision, updated_at } per page, in folder order. revision is what a move sends as expected_revision. |
total | integer | Pages in scope: live ones, or archived ones with archived. |
truncated | boolean | True when more than 500 pages are in scope; narrow with path. |
{ "data": { "pages": [ { "id": "5d3c9a1e-0001-4b7d-9e5a-000000000020", "ref": "Go-to-market/ICP", "path": "Go-to-market", "title": "ICP", "description": "Who Parcel sells to and why.", "revision": 3, "updated_at": "2026-10-16T12:00:00.000Z" } ], "total": 1, "truncated": false }, "metadata": { "credits": 0 }}