Documents
Documents are the core resource in Notebind. Each document has a title and markdown content.
Document object
Section titled “Document object”{ "id": "6240800a-1234-5678-abcd-ef0123456789", "owner_id": "user-uuid", "title": "My Document", "content": "# Hello World\n\nThis is markdown content.", "created_at": "2026-03-13T12:00:00.000Z", "updated_at": "2026-03-13T12:00:00.000Z"}| Field | Type | Description |
|---|---|---|
id | UUID | Unique document identifier |
owner_id | UUID | ID of the user who owns the document |
title | string | Document title (max 500 characters) |
content | string | Markdown content |
created_at | ISO 8601 | When the document was created |
updated_at | ISO 8601 | When the document was last modified |
List documents
Section titled “List documents”GET /api/documentsReturns all documents owned by the authenticated user, sorted by updated_at descending.
Query parameters
Section titled “Query parameters”| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
limit | int | 50 | 100 | Number of documents to return |
offset | int | 0 | - | Number of documents to skip |
Request
Section titled “Request”curl https://notebind.com/api/documents?limit=10&offset=0 \ -H "Authorization: Bearer nb_sk_YOUR_KEY"const response = await fetch( "https://notebind.com/api/documents?limit=10&offset=0", { headers: { Authorization: "Bearer nb_sk_YOUR_KEY", }, });
const { data, error } = await response.json();import requests
response = requests.get( "https://notebind.com/api/documents", params={"limit": 10, "offset": 0}, headers={"Authorization": "Bearer nb_sk_YOUR_KEY"},)
data = response.json()Response 200 OK
Section titled “Response 200 OK”{ "data": [ { "id": "6240800a-...", "title": "My Document", "created_at": "2026-03-13T12:00:00.000Z", "updated_at": "2026-03-13T12:00:00.000Z" } ], "error": null}Create a document
Section titled “Create a document”POST /api/documentsRequest body
Section titled “Request body”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | No | "Untitled" | Document title (max 500 characters) |
content | string | No | "" | Markdown content |
Request
Section titled “Request”curl -X POST https://notebind.com/api/documents \ -H "Authorization: Bearer nb_sk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "My Document", "content": "# Hello\n\nWorld"}'const response = await fetch("https://notebind.com/api/documents", { method: "POST", headers: { Authorization: "Bearer nb_sk_YOUR_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ title: "My Document", content: "# Hello\n\nWorld", }),});
const { data, error } = await response.json();import requests
response = requests.post( "https://notebind.com/api/documents", headers={"Authorization": "Bearer nb_sk_YOUR_KEY"}, json={"title": "My Document", "content": "# Hello\n\nWorld"},)
data = response.json()Response 201 Created
Section titled “Response 201 Created”{ "data": { "id": "6240800a-...", "owner_id": "user-uuid", "title": "My Document", "content": "# Hello\n\nWorld", "created_at": "2026-03-13T12:00:00.000Z", "updated_at": "2026-03-13T12:00:00.000Z" }, "error": null}An empty body {} creates a document with the title “Untitled” and empty content.
Get a document
Section titled “Get a document”GET /api/documents/:idReturns a single document with full content.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
id | UUID | Document ID |
Request
Section titled “Request”curl https://notebind.com/api/documents/6240800a-1234-5678-abcd-ef0123456789 \ -H "Authorization: Bearer nb_sk_YOUR_KEY"const docId = "6240800a-1234-5678-abcd-ef0123456789";
const response = await fetch( `https://notebind.com/api/documents/${docId}`, { headers: { Authorization: "Bearer nb_sk_YOUR_KEY", }, });
const { data, error } = await response.json();import requests
doc_id = "6240800a-1234-5678-abcd-ef0123456789"
response = requests.get( f"https://notebind.com/api/documents/{doc_id}", headers={"Authorization": "Bearer nb_sk_YOUR_KEY"},)
data = response.json()Response 200 OK
Section titled “Response 200 OK”{ "data": { "id": "6240800a-...", "owner_id": "user-uuid", "title": "My Document", "content": "# Hello\n\nWorld", "created_at": "2026-03-13T12:00:00.000Z", "updated_at": "2026-03-13T12:00:00.000Z" }, "error": null}Share token access
Section titled “Share token access”Documents can also be accessed with a share token:
curl "https://notebind.com/api/documents/DOC_ID?share_token=TOKEN"const response = await fetch( "https://notebind.com/api/documents/DOC_ID?share_token=TOKEN");
const { data, error } = await response.json();import requests
response = requests.get( "https://notebind.com/api/documents/DOC_ID", params={"share_token": "TOKEN"},)
data = response.json()The response includes an additional permission field indicating the access level:
{ "data": { "id": "...", "title": "...", "content": "...", "permission": "view" }, "error": null}Update a document
Section titled “Update a document”PATCH /api/documents/:idUpdate a document’s title and/or content. Only provided fields are updated.
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
title | string | No | New title (max 500 characters) |
content | string | No | New markdown content |
At least one field must be provided.
Request
Section titled “Request”curl -X PATCH https://notebind.com/api/documents/DOC_ID \ -H "Authorization: Bearer nb_sk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "Updated Title", "content": "# Updated\n\nNew content"}'const response = await fetch( "https://notebind.com/api/documents/DOC_ID", { method: "PATCH", headers: { Authorization: "Bearer nb_sk_YOUR_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ title: "Updated Title", content: "# Updated\n\nNew content", }), });
const { data, error } = await response.json();import requests
response = requests.patch( "https://notebind.com/api/documents/DOC_ID", headers={"Authorization": "Bearer nb_sk_YOUR_KEY"}, json={ "title": "Updated Title", "content": "# Updated\n\nNew content", },)
data = response.json()Response 200 OK
Section titled “Response 200 OK”{ "data": { "id": "...", "owner_id": "...", "title": "Updated Title", "content": "# Updated\n\nNew content", "created_at": "2026-03-13T12:00:00.000Z", "updated_at": "2026-03-13T12:05:00.000Z" }, "error": null}Share token access
Section titled “Share token access”Edit share tokens can update document content (but not title):
curl -X PATCH "https://notebind.com/api/documents/DOC_ID?share_token=EDIT_TOKEN" \ -H "Content-Type: application/json" \ -d '{"content": "Updated via share link"}'const response = await fetch( "https://notebind.com/api/documents/DOC_ID?share_token=EDIT_TOKEN", { method: "PATCH", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ content: "Updated via share link", }), });
const { data, error } = await response.json();import requests
response = requests.patch( "https://notebind.com/api/documents/DOC_ID", params={"share_token": "EDIT_TOKEN"}, json={"content": "Updated via share link"},)
data = response.json()Delete a document
Section titled “Delete a document”DELETE /api/documents/:idPermanently deletes a document and all associated comments, suggestions, and share links.
Request
Section titled “Request”curl -X DELETE https://notebind.com/api/documents/DOC_ID \ -H "Authorization: Bearer nb_sk_YOUR_KEY"const response = await fetch( "https://notebind.com/api/documents/DOC_ID", { method: "DELETE", headers: { Authorization: "Bearer nb_sk_YOUR_KEY", }, });
const { data, error } = await response.json();import requests
response = requests.delete( "https://notebind.com/api/documents/DOC_ID", headers={"Authorization": "Bearer nb_sk_YOUR_KEY"},)
data = response.json()Response 200 OK
Section titled “Response 200 OK”{ "data": { "deleted": true }, "error": null}Error responses
Section titled “Error responses”| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Title too long, no valid fields, or invalid JSON |
401 | UNAUTHORIZED | Missing or invalid authentication |
404 | NOT_FOUND | Document doesn’t exist or you don’t own it |
500 | DB_ERROR | Internal database error |