Skip to main content

The Yoga Den API

The Yoga Den API reference

Public HTTP endpoints and MCP tools for The Yoga Den. Full schema: /openapi.json.

Endpoints

  • GET /api/v1/studio

    Studio identity, contact, location, teacher, and routing guidance

  • GET /api/v1/classes

    Class catalogue with slugs, prices, and page URLs

  • GET /api/v1/classes/{slug}

    One class with cautions (contraindications) and FAQs

  • GET /api/class-sessions

    Upcoming sessions and availability for one class

  • GET /api/bookwhen

    Retired on 23 September 2026; returns 410 with a hint to /api/class-sessions

  • POST /api/contact

    Contact form submissions (origin-checked, rate-limited)

  • POST /api/newsletter

    Newsletter double opt-in

  • POST /api/gift-cards/checkout

    Create a Stripe Checkout session for a gift card

  • POST /api/webhooks/stripe

    Stripe webhooks (signature required)

  • POST /mcp

    MCP Streamable HTTP JSON-RPC (initialize, tools/list, tools/call); list_upcoming_sessions gives read-only dates and availability

Errors

HTTP API failures use { error: { code, message, hint } }. MCP protocol failures use standard JSON-RPC error objects. The code is stable and safe to branch on; the hint names a concrete next request. Undefined /api/* paths return the HTTP shape too, never an HTML error page.

Versioning & deprecation

The API is versioned in the URL path (/api/v1/), and every response carries an API-Version header. Changes within v1 are additive only. A breaking change would ship as /api/v2, with v1 returning Deprecation and Sunset headers for at least six months before removal.

Rate limits

Write endpoints are rate-limited per IP and return standard RateLimit-Policy and RateLimit headers on every response; a 429 adds Retry-After in seconds.

Related