Every change to the published schema is recorded on the changelog, and breaking changes are deprecated and announced there before they take effect. Check it before you upgrade an integration.
Explore the schema now
Browse every type and field, and run queries against generated sample data in the GraphQL Schema Explorer. No tokens will be used, and no Mighty Network of your own is required.
About the Headless API
The Mighty Networks Headless API is a GraphQL API built on the same surface area that powers the official Mighty Networks clients. It covers the host- and member-facing product surface end to end, and it grows with the product. It is the foundation for member-facing experiences (custom apps, embeds, integrations) as well as host-facing and back-office tooling that goes beyond what the Admin REST API covers. Where the Admin API is a curated REST surface intended for server-to-server administrative automation, the Headless API operates in the context of an authenticated user (member, moderator, or host) and grants the same access that user has in the product. With a host or admin token, that includes administrative reads and writes; with a member token, it’s limited to what that member can see and do. Use the Headless API when you want to:- Build a custom client (web, mobile, embed) that surfaces a Network’s content to its members
- Build host-facing tools, dashboards, or admin consoles that need data the Admin REST API doesn’t expose
- Power a third-party integration that acts on behalf of a specific user (member, moderator, or host)
- Query exactly the fields you need in a single round trip, including nested associations
What’s in the schema today
The Headless API covers the host- and member-facing product surface end to end. At a glance, the public schema exposes:- Network & branding — Network settings and updates (including landing and home space configuration and feature toggles), the branding theme, custom domains (validate, register, publish, remove), Pinned Links in the navigation menu, payment currencies, the connected Stripe account, and the Network’s own Mighty Networks billing plan and enabled features
- Members — the authenticated viewer (
me), the member roster with filtering and single-member lookup; member profile updates, removal, ban, and account deletion; membership role and status (read and update); member-to-member follows; profile social links; custom fields (definitions, options, and member answers) and profile questions - Spaces & structure — spaces (create, update, delete, reorder, move between collections), space memberships, spaces collections, space templates (read-only), live spaces, featured and welcome pins, and discovery-page gallery sections
- Posts & content — posts, threaded comments, reactions, tags (including bulk member tagging), polls and poll answers, announcements, saved posts, embedded link previews, the ranked member feed, and media assets (including uploads)
- Events — events with recurrence rules, per-occurrence overrides and cancellations, and RSVPs
- Chat — space group chats: list conversations, send and delete messages, mark conversations read, react to messages, and bookmark conversations. Member-to-member direct messages and reply threads are exposed with the member’s explicit consent via the
read:chatsandwrite:chatsscopes — a token reaches only its own user’s conversations. - Commerce — payment plans (create, update, publish, unpublish, archive), subscription groups, member subscriptions (list, cancel), one-time purchases (list, void), promo codes, income reports, and gifts with recognition leaderboards
- Courses & learning — courses and coursework (create, update, publish, reorder), member course and video progress, and quizzes (answering, completion, and attempt reporting)
- Growth & onboarding — invites (create, resend, revoke), join requests (approve, reject, bulk update), leads (read-only) and waitlists, the Ambassador program (referral stats and the recruitment announcement), the welcome checklist, and custom onboarding steps
- Marketing & member data — member segments, marketing audiences, and marketing banners
- Moderation & safety — member reports (file, list, clear), the email blocklist, member-to-member blocks, content reporting for posts, comments, and chat messages, and post, prompt, and space muting
- Gamification — badges (definitions and member assignment), daily-visit streaks, points balances, and gift leaderboards
- Notifications — the viewer’s notification inbox (list, mark read or unread) and notification delivery settings
- Automation & integrations — automation rules with execution logs, outbound webhooks, and OAuth application management
- Search — cross-entity search with typed result filtering
Endpoint
All GraphQL requests are issued asPOST to a single per-network endpoint:
:network_id_or_subdomain accepts either:
- The Network’s numeric ID (e.g.
12345) - The Network’s subdomain (e.g.
my-communityformy-community.mn.co)
Authentication
The Headless API authenticates requests with OAuth 2.0. Unlike the Admin API, which uses a long-lived Bearer token tied to a Network admin, the Headless API issues short-lived access tokens that act on behalf of a specific user in a specific Network — member, moderator, or host. Once you have an access token, you pass it as a Bearer token on every GraphQL request.OAuth application management is available on the Scale plan or above. If you don’t see Integrations > OAuth Applications in Network Admin, check your Network’s plan, or reach out to Mighty support.
Create an OAuth application
OAuth applications are created and managed by Network hosts under Network Admin > Integrations > OAuth Applications. For the full walkthrough — client types, redirect URI rules, scope catalog, secret rotation, and revocation — see OAuth Applications. At a glance:- Sign in as a host or admin and open Network Admin.
- Go to Integrations > OAuth Applications and click New OAuth Application.
- Provide a name, choose a client type (public or confidential), register redirect URIs, and select the scopes your app needs.
- Mighty issues a Client ID and (for confidential clients) a Client Secret.
Authorization Code flow
The standard flow for user-facing apps:-
Redirect the user to the authorization endpoint. OAuth endpoints live on the Network’s community host, not on
api.mn.co:The canonical endpoint URLs are also advertised athttps://:network_subdomain.mn.co/.well-known/oauth-authorization-server(RFC 8414). -
The user signs in (if needed) and approves the requested scopes. Mighty redirects back to your
redirect_uriwith acodeand thestateyou sent. Verify that the returnedstateexactly matches the cryptographically random value you generated for this request — if it doesn’t, reject the callback and do not exchange the code. This is your CSRF defense. -
Exchange the code for an access token:
The response contains an
access_token,refresh_token,expires_in, and the grantedscope: -
Pass the access token on every GraphQL request:
-
When the access token expires, exchange the refresh token for a new one using
grant_type=refresh_tokenagainst the same/oauth/tokenendpoint.
Token scope and permissions
The access token grants exactly the access the underlying user has in the product, intersected with the scopes the user approved. A member token sees what that member sees; a host or admin token additionally exposes host- and admin-level fields and mutations. Asking for more scopes than your app needs is a smell — request the narrowest set that lets the feature work. Each query, mutation, field, and type in the GraphQL reference names the scope it requires, so you can choose the narrowest set before you write the request. Some scopes are consent-required:read:chats and write:chats expose the member’s private conversations, so the consent screen is always shown for them — even on applications configured to skip it.
For full details on the OAuth flows, scope catalog, and token rotation, see the Authentication Guide.
Why GraphQL
GraphQL allows us to expose the full functionality of Mighty’s platform, without making assumptions about what kinds of experience you’ll build on top of it. A REST surface forces the API designer to enumerate every endpoint, response shape, and association ahead of time — which means the only apps that fit comfortably are the ones we anticipated. That’s the wrong shape for a community platform: members, hosts, and integrators put Mighty Networks to uses we couldn’t have predicted. A consumer-mobile reader, an internal back-office dashboard, an AI agent that summarizes a space’s activity, a custom embed that pulls a single post into a marketing page — these all want different fields, different depths, and different shapes from the same underlying data. GraphQL lets a client request exactly the fields it needs, traverse associations in one request, and avoid the over-fetching that comes with rigid REST endpoints. The API surface is the schema; what you do with it is up to you. Concretely, this means:- One endpoint, many shapes. A mobile feed view and a desktop sidebar can hit the same query and select different fields. Same for a CRM sync job and a Discord bot — they ask for what they need and ignore the rest.
- Typed schema. Every field, argument, and return type is described in the schema and discoverable via introspection — no out-of-band docs required to know what’s possible.
- Composable queries. Fetch a post, its author, the author’s spaces, and the viewer’s permissions on each — in a single round trip. Build the view the app needs, not the view the API designer guessed at.
- Forward-compatible by default. New fields and types can be added without breaking existing clients, because clients only see the fields they explicitly ask for. The schema can grow alongside the use cases we haven’t thought of yet.
- graphql.org — language overview, learning resources, and tooling
- GraphQL specification — the formal language and execution spec
Relay conventions
The schema is designed to be consumed by Relay-compatible clients. Concretely:- Nodes are addressable by a globally unique
idand reachable through the top-levelnode(id: ID!)field, per the GraphQL Global Object Identification spec. - Lists are paginated using cursor-based Connection types (
edges,node,pageInfo) — see also API Pagination for general guidance. - Mutations follow the Relay input/payload pattern: a single
inputargument and a payload type that includes the mutated node(s).
- Relay docs — client framework guide
- GraphQL Server Specification — the conventions the schema follows
- Cursor Connections Specification — pagination contract
Making a Request
A GraphQL request is aPOST with a JSON body containing query and (optionally) variables and operationName.
200 with a data object:
errors array alongside (or instead of) data. Each error carries a human-readable message, an extensions.code for programmatic handling, and (where applicable) a path indicating which field produced the error.
GraphQL returns HTTP
200 for most application-level errors. Inspect the errors array on every response, not just the HTTP status.Schema and Introspection
The schema is fully introspectable. You can explore it with any standard GraphQL tool (GraphiQL, Apollo Sandbox, Insomnia, Postman) by pointing the tool at your Network’s endpoint and supplying a valid Bearer token. Two explorers are available, and they do different jobs. The GraphQL Schema Explorer needs no token and no Network of your own: it runs in your browser against generated mock data, so it is the place to read the schema and shape a query. The hosted GraphiQL explorer below runs real queries against a real Network, and is limited to that Network’s hosts.GraphiQL Explorer
Network hosts get a hosted GraphiQL explorer for ad-hoc queries and schema browsing, under Network Admin > Integrations > Headless API on the Network’s community host (not onapi.mn.co):
api.mn.co GraphQL endpoint exactly as an integration using that application would.
Fetching the schema
The fastest way to get a code-generation-ready schema is the dedicated SDL endpoint, which returns the Network’s GraphQL schema as Schema Definition Language. No authentication required:graphql-code-generator, the Relay compiler, or any other tool that consumes SDL.
Start here for codegen. The SDL endpoint is unauthenticated, cacheable, and avoids the round-trip overhead of running a full introspection query.
Introspection (alternative)
The GraphQL endpoint also responds to the standard introspection query, which returns the type system as JSON. Use this if your tooling expects an introspection result instead of SDL, or if you want to query schema metadata at runtime. A minimal introspection query:graphql-js — every popular tool ships a copy of it. Common ways to fetch and persist it:
Rate Limits
The Headless API follows the same rate-limit and quota model described in the Admin API, but its quota is tracked separately — Headless API usage does not count against the Admin API quota and vice versa. The unit of accounting is the GraphQL operation rather than the REST request, and highly nested queries may additionally be subject to query-complexity limits.Errors
Errors follow the GraphQL error spec. Each error includes amessage, an extensions.code for programmatic handling, and (where applicable) a path indicating which field produced the error. The code vocabulary mirrors Apollo Server’s defaults, so any GraphQL client library that already understands those codes will work without configuration:
Most application-level errors are returned with HTTP
200 and an errors array; only UNAUTHENTICATED from the bearer-auth layer (missing or invalid Bearer token) and 404 (Network does not exist or Headless API is not enabled) surface as non-200 HTTP statuses.
Headless API vs. Admin API
Support
Authentication
Generate and manage tokens for the Headless API.
Admin API
Compare with the REST-based admin surface.