Developers
Public API documentation
Build with confidence using the stable public contract for Mug Club endpoints, including validation, response schemas, error semantics, CORS behavior, cache policy, and operational guidance for external integrators.
Integration quick guide
Treat this as a launch checklist before you ship. Each item captures a practical guardrail that reduces integration regressions.
Start with stable endpoints
Use /api/me, /api/users/{id}, and the scoped profile/membership routes as your primary surface. Avoid depending on internal or undocumented endpoints.
Handle response semantics explicitly
Aggregate payloads include DB-backed profile data and onchain-derived membership data. Use checkedAt and optional block references to drive freshness-aware UX.
Configure browser access correctly
Cross-origin access is controlled by ALLOWED_CORS_ORIGINS and defaults to https://mugclub.wtf. Keep your environment allowlist aligned across staging and production.
Version with intention
Treat unversioned endpoints as v1. Introduce versioned routes (for example, /api/v2) for any breaking response or behavior changes.
Design for resilience
Respect 429 + Retry-After, use exponential backoff, and monitor latency plus 5xx rates to maintain predictable performance under load.
Use community support early
If you're onboarding a new integration or troubleshooting edge cases, reach out in Discord so your implementation can unblock quickly.
Need implementation help? Join the Mug Club Discord.
