API Reference

Documents

List and retrieve documents from your Notery workspace.

List Documents

GET/api/v1/documents

Retrieve a paginated list of documents in your workspace. Results are ordered by path and title.

Parameters

ParameterTypeRequiredDefaultDescription
folderstringNo--Filter to documents whose path starts with this prefix (e.g. /guides).
tagsstringNo--Comma-separated list of tags to filter by. Only documents that have at least one matching tag are returned.
limitnumberNo50Maximum number of documents to return. Capped at 100.
offsetnumberNo0Number of documents to skip, for pagination.

Response

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Authentication Architecture",
      "path": "/projects/backend/auth.md",
      "slug": "auth",
      "tags": ["auth", "backend"],
      "fileType": "markdown",
      "wordCount": 1240,
      "summary": "Overview of the BetterAuth-based authentication system.",
      "createdAt": "2026-01-15T10:30:00.000Z",
      "modifiedAt": "2026-02-10T14:22:00.000Z"
    }
  ]
}

Response Fields

FieldTypeDescription
idstringUnique document ID (UUID).
titlestringDocument title.
pathstringFull path of the document within the workspace.
slugstringURL-friendly slug derived from the document title.
tagsstringArray of tags assigned to the document.
fileTypestringFile type (markdown or code).
wordCountnumber | nullWord count of the document content.
summarystring | nullAI-generated summary of the document, if available.
createdAtstringISO 8601 timestamp of when the document was created.
modifiedAtstringISO 8601 timestamp of when the document was last modified.

The list endpoint does not return the full document content. Use the Get Document endpoint to retrieve the complete markdown body.

Pagination

Use limit and offset to paginate through large workspaces:

# First page (documents 1-50)
curl -s "https://notery.dev/api/v1/documents?limit=50&offset=0" \
  -H "Authorization: Bearer ntry_abc123def456..."

# Second page (documents 51-100)
curl -s "https://notery.dev/api/v1/documents?limit=50&offset=50" \
  -H "Authorization: Bearer ntry_abc123def456..."

Examples

curl

curl -s "https://notery.dev/api/v1/documents?limit=20" \
  -H "Authorization: Bearer ntry_abc123def456..."

Filtering by folder

curl -s "https://notery.dev/api/v1/documents?folder=/projects/backend" \
  -H "Authorization: Bearer ntry_abc123def456..."

Filtering by tags

curl -s "https://notery.dev/api/v1/documents?tags=auth,security" \
  -H "Authorization: Bearer ntry_abc123def456..."

Get Document

GET/api/v1/documents/:id

Retrieve a single document by its ID, including the full markdown content.

Parameters

ParameterLocationTypeRequiredDescription
idURL pathstringYesThe document's UUID.

Response

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "Authentication Architecture",
    "path": "/projects/backend/auth.md",
    "slug": "auth",
    "tags": ["auth", "backend"],
    "content": "# Authentication Architecture\n\nThis document describes...",
    "metadata": {},
    "contentPlain": "Authentication Architecture. This document describes...",
    "wordCount": 1240,
    "fileType": "markdown",
    "createdAt": "2026-01-15T10:30:00.000Z",
    "modifiedAt": "2026-02-10T14:22:00.000Z"
  }
}

Response Fields

FieldTypeDescription
idstringUnique document ID (UUID).
titlestringDocument title.
pathstringFull path of the document within the workspace.
slugstringURL-friendly slug derived from the document title.
tagsstringArray of tags assigned to the document.
contentstringFull markdown content of the document.
metadataobjectArbitrary metadata associated with the document (e.g. frontmatter fields).
contentPlainstring | nullPlain-text version of the content with markdown stripped.
wordCountnumber | nullWord count of the document content.
fileTypestringFile type (markdown or code).
createdAtstringISO 8601 timestamp of when the document was created.
modifiedAtstringISO 8601 timestamp of when the document was last modified.

This is the only endpoint that returns the full content field. Use it when you need to read the actual document body. The list endpoint omits content to keep responses lightweight.

Errors

StatusCause
400Missing document ID in the URL path.
401Missing or invalid API key.
404Document not found, or it belongs to a different workspace, or it has been deleted.

Examples

curl

curl -s "https://notery.dev/api/v1/documents/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer ntry_abc123def456..."

JavaScript (fetch)

const docId = '550e8400-e29b-41d4-a716-446655440000'

const response = await fetch(
  `https://notery.dev/api/v1/documents/${docId}`,
  {
    headers: {
      'Authorization': 'Bearer ntry_abc123def456...'
    }
  }
)

const { data } = await response.json()

console.log(data.title)
console.log(data.content)