Skip to content
Gryz Docs
API

Documents API reference

REST API for creating, reading, updating, and deleting documents with API key authentication.

Updated · Reviewed by Jacob

Answer first

Authenticated clients call /api/documents with a Bearer API key (gryz_…). Anonymous publishes use POST /api/documents from the web UI with Turnstile — not the same as MCP OAuth.

Base URL: https://www.gryz.ai

Authentication

Authorization: Bearer gryz_YOUR_KEY_HERE

Create keys at /account/api-keys/. Requires Starter tier or above.

POST /api/documents/

Create a document.

Body (JSON):

{
  "content": "# Hello",
  "content_type": "markdown",
  "title": "Optional title",
  "visibility": "public"
}

Responses:

  • 201{ "slug": "...", "url": "..." }
  • 400 — validation error
  • 401 — missing or invalid API key
  • 413 — over tier size limit
  • 429 — rate limited

GET /api/documents/

List documents for the authenticated user. Supports pagination query params.

GET /api/documents/[slug]/

Fetch a single document you own.

PATCH /api/documents/[slug]/

Update content, title, visibility, or expiry.

DELETE /api/documents/[slug]/

Permanently delete a document you own.

Rate limits

Publish endpoints enforce per-identity sliding-window limits. When exceeded, the API returns 429 with Retry-After.

Error shape

{
  "error": "Human-readable message",
  "code": "OPTIONAL_CODE"
}

For assistant-driven workflows, compare the ten MCP tools. For browser and API publishing constraints, see Choose publishing options.

Was this page helpful?