POST /knowledge/documents
Updated Oct 1, 20261 minute read
Write a document
A new document, written straight in as markdown. It indexes in the background and the agent can answer from it once status reads ready.
Part of Knowledge.
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | |
body | string | Yes | |
folderId | string | No |
Responses
| Status | Description |
|---|---|
200 | Created. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
403 | The token's person does not hold the role this needs. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No |
Example request
curl -X POST https://api.median.sh/v1/knowledge/documents \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "content-type: application/json" \
-d '{"title":"Refund policy","body":"Refunds are honored within 30 days."}'