Notebooks
Knowledge Bash reads before it answers: notebooks, and the documents in them.
POST/v1/notebooks/{notebook_id}/documentsAdd a document, as a file or as text.
Request4 fields
Path
notebook_idstringrequiredThe notebook's id (nb_...).
- Type
string
Headers
Idempotency-KeystringSend the same key to retry this call safely for 24 hours.
- Type
string
Body
titlestringrequiredIts title, 1 to 200 characters.
- Limits
- 1 to 200 characters.
- Example
Refunds for cancelled flights
textstringrequiredIts text, up to 512 KB.
- Limits
- 1 to 524288 characters.
Answers 2018 fields
object"document"Always document.
- Type
"document"
idstringThe document's id.
- Type
string
notebook_idstringThe notebook it is in.
- Type
string
titlestringIts title.
- Type
string
content_typestringThe type of its text, such as text/markdown or text/plain.
- Type
string
bytesintegerIts size, in bytes.
- Type
integer
sha256stringA hash of its text.
- Type
string
created_atstringWhen it was added, as an ISO 8601 date and time in UTC.
- Type
string
No sample in your language for this route, so here it is over HTTP.
curl -X POST "$VESTRA_BASE_URL/v1/notebooks/{notebook_id}/documents" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Refunds for cancelled flights", "text": "..." }'