API introduction
The Memberfy REST API: base address, format, headers and where to start integrating.
Everything the Memberfy interface does goes through a REST API, and it's open to you: you can automate your community, integrate it with other systems or build your own interface.
The essentials
| Address | https://api.memberfy.net |
| Format | JSON, in UTF-8 |
| Authentication | A JWT token in the Authorization: Bearer <token> header. See Authentication |
| Community | The X-CommunityId header on almost every call. See X-CommunityId |
| Responses | Always in the { success, message, data } envelope. See Responses and errors |
| Lists | page and limit. See Pagination |
| Specification | OpenAPI 3 at /docs.json |
| SDK | Ready-made JavaScript at /sdk.js. See JavaScript SDK |
The headers
| Header | When |
|---|---|
Authorization: Bearer <token> | On everything except sign-in, sign-up and public routes |
X-CommunityId: <uuid> | Almost always: sets which community the operation happens in |
X-ProfileId: <uuid> | Optional: act on behalf of another profile, for those allowed to |
Accept-Language | Optional: the language of the messages (pt-BR, pt-PT, en-US, es-ES, es-MX, es-AR, it-IT, de-DE, de-AT, de-CH). Default pt-BR |
Your first call
# 1. sign in
curl -s -X POST https://api.memberfy.net/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@memberfy.net","password":"your-password"}'
# 2. with the token and the community id
curl -s https://api.memberfy.net/api/spaces \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID"
Where to start
- Authentication: the token.
- X-CommunityId: the community of each call.
- Creation order: what has to exist before each call, and where each id comes from.
- Responses and errors and Pagination.
- JavaScript SDK, if you use JavaScript.
- The API Reference, for every endpoint.
What communities use the API for
| Use case | Example |
|---|---|
| CRM integration | Read the day's sales and create the contact in the CRM |
| Automating onboarding | Invite the student when enrollment happens in another system |
| Building content in bulk | Create a course with 30 lessons in one go |
| Reports | Export the statement to the finance team's spreadsheet |
| Your own interface | Show the community's events on the company website |
| Search | Find a post, event, course, space or call by title, ignoring accents and case, with GET /api/search |
What your role allows
The API applies the same rules as the interface: the token belongs to a person, and what they can do depends on their role in the community given in X-CommunityId. A regular member reads and takes part; people who manage create and configure.
How the API changes
The API grows by addition: new endpoints and new fields appear without prior notice, and your code should ignore fields it doesn't recognize. The reference in this help center is generated from the specification itself on every release, so it always shows what is live.
Reference
Every endpoint, with parameters, body, responses and a curl example, is in the API Reference, generated from the specification itself.
For AI and code generation
/docs.txt: a compact reference, handy to paste into an assistant. It accepts?tags=Auth,Eventsto send only what matters./docs.json: the full specification, for generating typed clients.
Some write endpoints (multipart uploads and a few POSTs) don't declare their body fields in the specification. In those cases, the endpoint's page says so, and the guide on that topic explains the fields.