Skip to content
Median
Esc
↑↓navigate↵open⌘Jpreview

Get the library

The whole library at once: every folder and every document, sorted as arranged. Bodies stay home; read one with GET /knowledge/documents/{id}.

GET/knowledge
Authorization
AuthorizationBearer token · headerrequired
`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Responses
200Folders and documents.
foldersFolder[]
Show properties
Array of Folder
idstring
namestring
descriptionstring | null
iconUrlstring | null
parentIdstring | null
ordernumber
documentsKnowledgeDoc[]
Show properties
Array of KnowledgeDoc
idstring
titlestring
sourcestring
Allowed:uploadmanualgithubnotionweblearned
statusstring
Allowed:indexingreadyerror
errorstring | null
originstring | null
A repository path, a filename, or a page URL, when it came from one.
urlstring | null
The published page a customer can open, when the document has one. Null for words with no public home, which the agent never links.
folderIdstring | null
ordernumber
updatedAtinteger
401The bearer token is missing, revoked, or expired.
errorobject
Show properties
codestring
messagestring
429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobject
Show properties
codestring
messagestring
Request
curl -X GET "https://api.median.sh/v1/knowledge" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "folders": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "iconUrl": "string",
      "parentId": "string",
      "order": 0
    }
  ],
  "documents": [
    {
      "id": "string",
      "title": "string",
      "source": "upload",
      "status": "indexing",
      "error": "string",
      "origin": "string",
      "url": "string",
      "folderId": "string",
      "order": 0,
      "updatedAt": 0
    }
  ]
}