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

Get a document

One document in full, body included, plus a download URL when it arrived as a file.

GET/knowledge/documents/{id}
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.
Path parameters
idstringrequired
A document id.
Responses
200The document.
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
bodystring
fileUrlstring | null
conversationIdstring | null
401The bearer token is missing, revoked, or expired.
errorobject
Show properties
codestring
messagestring
404Not one of yours, or not there at all.
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/documents/string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "id": "string",
  "title": "string",
  "source": "upload",
  "status": "indexing",
  "error": "string",
  "origin": "string",
  "url": "string",
  "folderId": "string",
  "order": 0,
  "updatedAt": 0,
  "body": "string",
  "fileUrl": "string",
  "conversationId": "string"
}