Skip to content

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

Addresshttps://api.memberfy.net
FormatJSON, in UTF-8
AuthenticationA JWT token in the Authorization: Bearer <token> header. See Authentication
CommunityThe X-CommunityId header on almost every call. See X-CommunityId
ResponsesAlways in the { success, message, data } envelope. See Responses and errors
Listspage and limit. See Pagination
SpecificationOpenAPI 3 at /docs.json
SDKReady-made JavaScript at /sdk.js. See JavaScript SDK

The headers

HeaderWhen
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-LanguageOptional: 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":"[email protected]","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

  1. Authentication: the token.
  2. X-CommunityId: the community of each call.
  3. Creation order: what has to exist before each call, and where each id comes from.
  4. Responses and errors and Pagination.
  5. JavaScript SDK, if you use JavaScript.
  6. The API Reference, for every endpoint.

What communities use the API for

Use caseExample
CRM integrationRead the day's sales and create the contact in the CRM
Automating onboardingInvite the student when enrollment happens in another system
Building content in bulkCreate a course with 30 lessons in one go
ReportsExport the statement to the finance team's spreadsheet
Your own interfaceShow the community's events on the company website
SearchFind 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,Events to 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.