LLM Access to Documentation

This documentation is designed to be consumed programmatically by Large Language Models (LLMs) and AI agents. Raw markdown versions of all pages are available through dedicated endpoints.

To work with mail itself from an agent, use the fob-mail CLI: it wraps this API, prints --json, and its getting-started command walks an agent through setup.

Endpoints

EndpointDescription
GET /llms.txtIndex of all documentation pages (llmstxt.org); also at /docs/md/sitemap
GET /docs/md/{path}Raw markdown for a specific page

/llms.txt is served as text/plain, the pages as text/markdown.

Getting Started

Step 1: Fetch the Index

Start with /llms.txt: what Mail is, then every page's markdown URL, grouped like the docs sidebar:

curl https://mail.finopsbricks.com/llms.txt

Step 2: Fetch Individual Pages

Use the path from the sitemap to fetch specific documentation:

# Get authentication docs
curl https://mail.finopsbricks.com/docs/md/api/authentication

# Get error handling docs
curl https://mail.finopsbricks.com/docs/md/api/errors

URL Pattern

Documentation paths follow this pattern:

/docs/md/{section}/{subsection}/{page}

Integration Example

async function loadDocs() {
  const base = 'https://mail.finopsbricks.com/docs/md';

  const auth = await fetch(`${base}/api/authentication`).then(r => r.text());
  const errors = await fetch(`${base}/api/errors`).then(r => r.text());

  return { auth, errors };
}