---
title: "Get a knowledge document"
method: GET
path: "/api/knowledge/{id}"
tags: ["Knowledge"]
---

# Get a knowledge document

`GET /api/knowledge/{id}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/knowledge/{id}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/knowledge/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a knowledge document's full detail — folder path, shares, direct children,
links to any board/card/conversation, view counts, and content rendered as HTML.

`currentUser` is populated only when authenticated with a delegate token (its
`userId` is known); it is `null` for API keys and partner tokens, which are
company-wide credentials with no per-user permission check. A private document you
cannot view returns 404, the same as one that doesn't exist. Unlike `list`/`tree`/
`children`, this is a direct by-id fetch, so an archived document is still
returned (with `archived: true`) rather than 404ing.

## Path parameters

- `id` string, required

## Response `200`

Knowledge document detail.

- KnowledgeDoc: Full document detail returned by GET /api/knowledge/{id}.
  - `_id` string: Document ID.
  - `name` string: Document title.
  - `emoji` string, nullable
  - `iconUrl` string, nullable
  - `coverUrl` string, nullable
  - `accessType` 'public' | 'publicReadonly' | 'private'
  - `isPrivate` boolean
  - `shares` object[]
    - `id` string
    - `type` 'user' | 'team'
    - `permission` 'edit' | 'comment' | 'view'
    - `owner` boolean
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable
  - `parentId` string, nullable
  - `path` object[]: Root-first ancestor chain (folders above this document). Excludes this document.
    - `_id` string
    - `name` string
    - `emoji` string, nullable
  - `children` object[]
    - `_id` string
    - `name` string
    - `emoji` string, nullable
    - `rank` integer, nullable
  - `childCount` integer
  - `links` object
    - `aptletUuid` string, nullable
    - `aptletInstanceId` string, nullable
    - `streamId` string, nullable
  - `published` boolean
  - `publishedAt` string, date-time, nullable
  - `views` object
    - `internal` integer
    - `public` integer
  - `archived` boolean
  - `archivedAt` string, date-time, nullable
  - `createdAt` string, date-time, nullable
  - `createdBy` string, nullable
  - `updatedAt` string, date-time, nullable
  - `updatedBy` string, nullable
  - `currentUser` object, nullable: Null for API key / partner token callers — those credentials are company-wide, so no per-user permission check is applied. Populated only for a delegate token, where the caller's own user identity is known.
    - `userId` string
    - `isOwner` boolean
    - `permission` 'edit' | 'comment' | 'view' | 'null', nullable
    - `canView` boolean
    - `canEdit` boolean
    - `canComment` boolean
  - `html` string: Document body rendered as HTML. Aptly custom blocks and inline items appear as elements with `data-content-type` / `data-inline-content-type` and `data-*` property attributes, plus a readable label — see "HTML format" in `PUT /api/knowledge/{id}`.

## Other responses

- `401`: Invalid or missing API key.
- `404`: Document not found.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
