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"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"}'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"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"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"}'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"}'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"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 |