RF:Manage Public API

Developer Documentation

Public API Reference

Build integrations on top of RF:Manage — member profiles, class bookings, training sessions, guest passes, billing, and trainer portal tools. All endpoints are RESTful and return JSON.

https://manage.getrealfit.com/functions/

Authentication

Two layers: API key (server-to-server) and member JWT (mobile app sessions)

API Key (Server-to-Server)

Every request must include an Authorization: Bearer <key> header. The primary key is stored as an environment secret and is always active. Additional keys can be registered in Settings → Public API for separate integrations (website, mobile app, partner).

HTTP Header
Authorization: Bearer rfm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Member JWT (Mobile App Sessions)

Call publicMemberLogin with email + password to receive a short-lived JWT (1-hour expiry). Pass it as X-Member-Token on all subsequent calls. When present, the token authenticates the member and theX-Member-Identifier / X-Trainer-Identifierheaders become optional. The API key stays server-side; the JWT is the member's credential.

HTTP Header
X-Member-Token: <jwt>

SSO & Deep-Link Tokens

For OAuth-style flows, use publicOAuthAuthorize →publicOAuthToken. For deep-link handoff from the web portal, use publicGenerateLinkToken →publicExchangeLinkToken. These endpoints do not require an API key — the member's web session or one-time token is the credential.

Core Endpoints

Member profile, activity, and class booking

Mobile App Endpoints

Login, class browsing, bookings, guest passes, and billing

Where to retrieve class descriptions & categories

Class descriptions and categories are only available via the publicClassSessions endpoint below (they are not returned by publicMemberProfile, publicMemberBookings, or publicMemberActivity). Expand the endpoint to see the full response schema.

class_description

string | null — free-text description from the class template. null when unset.

class_category

string | null — one of: yoga, hiit, cycling, pilates, strength, cardio, dance, martial_arts, other. null when unset.

heat_level

string | null — the class temperature key from the class template (e.g. room_temp, warm, heated). Returned wherever a class is listed, always alongside heat_level_details.

heat_level_details

object | null — the full configured temperature option: key, name (display label), icon (thermometer, thermometer_sun, flame, snowflake, sun, wind, droplet, waves), description (hover text), color (slate, sky, blue, teal, emerald, lime, amber, orange, red, rose, pink, violet) and sort_order (lowest first). null when the class has no temperature set. Options are managed in Settings → Rooms & Resources.

room_name

string | null — name of the room the class runs in (e.g. "Hot Room"). Returned alongside room_id wherever a class is listed. null when no room is assigned.

SSO & Token Exchange

OAuth 2.0 flow and deep-link handoff for mobile apps

Trainer Portal Endpoints

Schedule management, booking actions, and client lookup for trainers

Staff Mobile API

Staff-scoped endpoints for the RF:Staff Hub app · version 2026-11-01

Two credentials, one call

· the app never holds the app key

The mobile app talks to its own server, never to RF:Manage directly. That server holds the app credential and calls these endpoints with it, plus the staff member’s session token. Staff identity, permissions and Hub data all stay authoritative in RF:Manage.

# App server → RF:Manage
Authorization: Bearer <STAFF_API_SECRET>
X-Staff-Token: <access token for the signed-in staff member>
Content-Type: application/json

# Base URL
https://manage.getrealfit.com/functions/

Setting it up

· one secret, one registered callback
  1. Set the STAFF_API_SECRET secret in RF:Manage (Secrets page) to a long random value, and give the same value to the app’s server. It is presented as the bearer token on every call. Until it is set, the existing PUBLIC_API_SECRET_TOKEN is accepted so the integration can be built immediately.
  2. Add the app’s callback to StaffAppConfig → redirect_uris in the RF:Manage data table — for example rfstaffhub://auth. Handoff redirects to any other address are refused, so a link cannot be used to capture a staff session.
  3. Nothing else. Roles, permissions and Hub access keep being managed where they already are — Security Roles and Staff Hub settings.

How a staff member signs in

· handoff first, emailed code as the fallback
# 1. App server builds the sign-in URL and opens it in the device browser
https://manage.getrealfit.com/functions/staffAppHandoff?redirect_uri=rfstaffhub%3A%2F%2Fauth&state=<opaque>

#    If the staff member is not signed in to RF:Manage they are sent to the
#    login page first; afterwards the browser redirects to the registered callback:
#    rfstaffhub://auth?code=<120s single-use code>&state=<opaque>

# 2. App server redeems it — exactly once
POST https://manage.getrealfit.com/functions/staffAppAuth
{ "action": "exchange_handoff", "handoff_token": "<code>",
  "device_id": "abc-123", "device_label": "Sarah's iPhone", "platform": "ios" }

# → { access_token, refresh_token, expires_in: 900,
#     refresh_expires_in: 2592000, session_id,
#     staff, permissions: { version, hub_sections, is_manager, ... }, binding }

# 3. Fallback when the browser leg is unavailable — code mailed to the address
#    already on the active staff record, never to an address the caller supplies
POST https://manage.getrealfit.com/functions/staffAppAuth
{ "action": "request_otp", "email": "staff@club.com" }        // 202 accepted, always

POST https://manage.getrealfit.com/functions/staffAppAuth
{ "action": "verify_otp", "email": "staff@club.com", "code": "123456", "device_id": "abc-123" }

# 4. Keep it alive
POST https://manage.getrealfit.com/functions/staffAppAuth  { "action": "refresh", "refresh_token": "<token>" }
POST https://manage.getrealfit.com/functions/staffAppAuth  { "action": "revoke",  "refresh_token": "<token>" }

Access tokens last 15 minutes, refresh tokens 30 days and rotate on every refresh — presenting an old one revokes the session. Handoff codes live 120 seconds, OTP codes 10 minutes; both are single-use, and a code is locked after five wrong attempts.

Who can do what

· enforced on every request

Each call re-reads the staff record and its Security Roles, so a revocation, termination or role edit applies on the next request. A section is restricted when an assigned role defines any staff_hub*granular permission — staff_hub for everything, or staff_hub.feed, .albums, .calendar, .subs, .messages per section with view and edit actions. When no role defines one, the section keeps the Staff Hub’s own rules — exactly what staff already see in the web app.

On top of that, every record is filtered: channel access for the feed, participation for conversations, invitations for events, instructor assignment for cover requests. Records outside that scope return 404, so the API never confirms they exist. The app cannot read or edit Security Roles through any of these endpoints.

Identity & session

MethodRouteAuthPermissionPurpose
GETstaffAppHandoff?redirect_uri=&state=Web sessionActive staffBrowser SSO leg — redirects to the registered callback with a 120s code
POSTstaffAppHandoffWeb sessionActive staffSame mint, returns the code as JSON
POSTstaffAppAuthApp key—action: exchange_handoff · request_otp · verify_otp · refresh · revoke
POSTstaffAppAuthStaff tokenAny sessionaction: register_device · remove_device
GETstaffAppMeStaff tokenAny sessionSession validation, staff status, permissions, version, unread
DELETEstaffAppMeStaff tokenAny sessionUnbind the staff record and end every session

Hub, media & schedule

MethodRouteAuthPermissionPurpose
GETstaffAppHub?resource=channelsStaff tokenfeed viewChannels the caller may see, with can_post
GETstaffAppHub?resource=tagsStaff tokenfeed viewActive controlled tags
GETstaffAppHub?resource=postsStaff tokenfeed viewVisible posts — limit, cursor, channel_id, tag_id, q, mentioned_me
GETstaffAppHub?resource=post&id=Staff tokenfeed viewOne post with poll results and the caller’s vote
GETstaffAppHub?resource=comments&post_id=Staff tokenfeed viewPaginated comments
POSTstaffAppHubStaff tokenfeed editposts.create · comment · react · comment_react · update · delete · follow
GETstaffAppHub?resource=albums | album&id=Staff tokenalbums viewAlbums and album detail with signed previews
POSTstaffAppHubStaff tokenalbums editalbums.create · add_media · tag · set_cover · remove_media · delete
GETstaffAppHub?resource=events&from=&to=Staff tokencalendar viewInvited events with the caller’s RSVP
POSTstaffAppHubStaff tokencalendar editevents.rsvp
GETstaffAppHub?resource=subs&status=Staff tokensubs viewCoverage requests (open | mine | all)
POSTstaffAppHubStaff tokensubs editsubs.request · volunteer · confirm · cancel
GETstaffAppHub?resource=conversationsStaff tokenmessages viewConversations with unread counts
GETstaffAppHub?resource=thread&conversation_id=Staff tokenmessages viewOne thread — participant only
POSTstaffAppHubStaff tokenmessages editmessages.send · mark_read · create_conversation
GETstaffAppHub?resource=notificationsStaff tokenAny sessionNotifications — section, unread, cursor
POSTstaffAppHubStaff tokenAny sessionnotifications.mark_read
GETstaffAppHub?resource=preferencesStaff tokenAny sessionPush categories, muted channels, theme
POSTstaffAppHubStaff tokenAny sessionpreferences.update
POSTstaffAppMediaStaff tokenAny sessionaction: upload (≤8 MB) · download (signed URL)
GETstaffAppSchedule?from=&to=Staff tokenAny sessionThe caller’s own class schedule

Actions are accepted in either form: dotted (events.rsvp, messages.send, media.upload) or a bare verb alongside a resource ({ "resource": "events", "action": "rsvp" }). The read verbs list and get are also served on POST, so a client can use one transport for every call. Media actions work on both staffAppHub and staffAppMedia.

Example: post to a channel

· writes land in the real Hub
POST https://manage.getrealfit.com/functions/staffAppHub
Authorization: Bearer <STAFF_API_SECRET>
X-Staff-Token: <access token>

{
  "resource": "posts",
  "action": "create",
  "channel_id": "<StaffChannel id>",
  "body": "Studio B is closed until 2pm — use the main floor.",
  "is_important": true,
  "tag_ids": ["<StaffTag id>"],
  "mentions": [{ "staff_id": "<Staff id>", "name": "Andrea Ruiz" }]
}

# 200
{ "api_version": "2026-11-01", "resource": "posts", "action": "create",
  "result": { "post_id": "...", "created_date": "2026-11-11T15:04:11.000Z" } }

The post appears in the web Staff Hub immediately, channel members get their normal notification, and the write is audited. Channel posting rules, announcement-only channels and manager rules all still apply.

Errors

· always { error: { code, message, details } }
HTTPcodeMeaning
401unauthorizedMissing or wrong app credential
401missing_staff_token / invalid_tokenNo staff token, bad signature or expired access token
401session_revoked / session_expired / binding_revokedSign in again — the session or the app link ended
401 / 429code_expired / code_already_used / invalid_code / code_lockedHandoff or OTP code rejected
403staff_inactive / access_revoked / no_staff_profileStaff record is not active, is terminated, or is unlinked
403permission_deniedSecurity Role does not grant the section (details.section)
403channel_not_visible / post_not_allowed / not_participantSection allowed, this record is not
404not_foundRecord missing, or outside the caller’s visibility
409already_requested / not_open / deadline_passed / ambiguous_volunteerState conflict, including multiple volunteers to choose between
413 / 415file_too_large / unsupported_media_typeRejected upload
429rate_limitedBack off — details.retry_after in seconds
400invalid_request / unknown_action / unknown_resourceMalformed call; details.allowed lists valid values

Limits: 10 handoff codes per account per 10 minutes, 5 OTP emails per staff member per hour, 120 writes per staff member per minute, 30 new posts per hour, 60 uploads per hour. Every response carries X-Api-Version and Cache-Control: no-store.

Testing it yourself

· sign in as an active staff member first
# 1. In a browser where you are signed in to RF:Manage, mint a code as the
#    staff member you are signed in as (no app key needed on this call):
GET https://manage.getrealfit.com/functions/staffAppHandoff

# 2. Redeem it
curl -s -X POST https://manage.getrealfit.com/functions/staffAppAuth \
  -H "Authorization: Bearer $STAFF_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"action":"exchange_handoff","handoff_token":"<code>"}'

# 3. Read your feed
curl -s "https://manage.getrealfit.com/functions/staffAppHub?resource=posts&limit=5" \
  -H "Authorization: Bearer $STAFF_API_SECRET" \
  -H "X-Staff-Token: <access_token>"

# 4. Confirm what the server thinks you may do
curl -s https://manage.getrealfit.com/functions/staffAppMe \
  -H "Authorization: Bearer $STAFF_API_SECRET" \
  -H "X-Staff-Token: <access_token>"

Verified against the live app: sign-in by handoff and by emailed code, feed/album/event/subs/message reads and writes, media upload and signed download, class schedule, preference and device registration, plus rejection of inactive staff, revoked bindings, missing permissions, cross-staff reads, replayed handoff codes and expired codes.

Push notifications

· sent by RF:Manage, respecting the five switches

RF:Manage remains the sender. preferences.update stores the five categories independently (feed, albums, calendar, subs, messages) plus the master switch, and delivery checks the category for the notification’s section before anything is pushed. Devices register through staffAppAuth → register_device with their APNs/FCM token; one device belongs to one staff member, and removing a device clears its token. Pushes only arrive on a build with native push credentials configured — without that, in-app notifications still work and nothing is promised.

Quick Start

A complete example: authenticate, fetch profile, book a class

JavaScript (fetch)
// 1. Login to get a session JWT
const loginRes = await fetch('https://manage.getrealfit.com/functions/publicMemberLogin', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer rfm_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ email: 'member@example.com', password: '...' })
});
const { token, member_id } = await loginRes.json();

// 2. Fetch the member's profile (includes pack_id for booking)
const profileRes = await fetch('https://manage.getrealfit.com/functions/publicMemberProfile', {
  headers: {
    'Authorization': 'Bearer rfm_your_api_key',
    'X-Member-Token': token
  }
});
const profile = await profileRes.json();

// 3. Book a class using a class pack credit
const bookRes = await fetch('https://manage.getrealfit.com/functions/publicBookClass', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer rfm_your_api_key',
    'X-Member-Token': token,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    class_session_id: 'session_123',
    resource_type: 'class_pack',
    resource_id: profile.packs_and_sessions.class_packs[0].id
  })
});
const booking = await bookRes.json();
console.log('Booked!', booking.booking_id);

RF:Manage Public API · Base URL: https://manage.getrealfit.com/functions/

Need an API key? Contact your club administrator or visit Settings → Public API in the RF:Manage dashboard.