Build Your Own Website or App with the Member API

6 min read Updated today

The member API v4 lets your own website or app do what the member portal does. Members and visitors can see your timetable, join online, ask for a free trial, book classes and personal training (PT), and pay. Your website calls the API, and GymMaster keeps the members, bookings and payments. Your developer can use it to integrate your website with GymMaster, embed the timetable and booking forms in your site, or build a custom member app.

The member API v4 is in development. Ask the GymMaster Support Team if it is available for your club before you start.


Before you start

Make sure that you have:

  • Your club address, for example yourclub.gymmasteronline.com
  • Membership types that are available online. Refer to Create a Membership Type.
  • Classes and services that members can book online
  • A Stripe account connected to GymMaster, if your website must take payment
  • A test member that your staff made for testing. Do not use a real member.

You set the signup and enquiry form fields in GymMaster. The API gives your website the same fields. Refer to Customise Your Online Signup Form.


How the API works

Each club has its own address. All member API paths start with /v4/m:

https://yourclub.gymmasteronline.com/v4/m/<path>
  • Some paths need no login, for example the timetable (GET /class/schedule) and the membership list (GET /club/membership).
  • Other paths need a member token. Send the email and password to POST /login. Then send the token in the X-GM-AUTH header of each request. A token is valid for 30 days.
  • A signup (POST /signup) and an enquiry (POST /signup/prospect) also give a token, so the new person is logged in at once.
  • An error has a status and a message, for example {“error”: “This class is full”}. Show the message to the member.
  • Your website never sends prices. GymMaster calculates each price from your settings.

For each path, its fields and examples, refer to the GymMaster API documentation.


Show the timetable

  1. Get your locations with GET /club.
  2. Get the filter lists (class types, locations, instructors) with GET /class/filter_option.
  3. Get the classes for a week with GET /class/schedule. Send week (a Monday) or date and days.
  4. Show the class name, time, instructor and free spaces. Show unbookable_reason when a class cannot be booked.

No login is necessary. When a member is logged in, the timetable also shows the classes they booked.


Online signup

  1. Show the membership types with GET /club/membership.
  2. Show the agreements of the membership type with GET /membershiptype/{membershiptypeid}/agreement.
  3. Get the form with GET /signup/form/SIGNUP. Show the fields in the order given. A group (for example address or emergency contact) has its own fields. Send each field with its key. Fields that are MANDATORY or REQUIRED must have a value.
  4. Send the form and the membershiptypeid to POST /signup.
  5. If email_confirm_due is true, ask for the code that GymMaster sent by email. Send it to POST /signup/{ref}/email/confirm.
  6. If paid is false, take payment for the ref. Refer to Take payment.

Free trial and enquiries

A visitor who is not ready to join becomes a prospect.

  1. Get the form with GET /signup/form/CONTACT_US for an enquiry, or GET /signup/form/CASUAL_BOOKING for a free trial or casual visit.
  2. Send the form to POST /signup/prospect, with target set to the form name. Send landing_page_url with the utm details, so you can see where your leads come from.
  3. Keep the token from the answer. The prospect can now book a trial class or PT session.

If the token is empty, the person is already in GymMaster. Ask them to log in, or to reset their password with POST /password/request_reset.

For a trial membership, make a free or one-off membership type and use the online signup steps.


Book a class

  1. Log the member in, or use the token from the signup or enquiry.
  2. Show the classes the member can book with GET /class/session. It gives the price for this member.
  3. If the class has a seat map, show it with GET /class/session/{bookingid}/seat.
  4. Send the booking to POST /checkout:
{"line_list": [{"type": "class_booking", "bookingid": 804283}]}
  1. If paid is false, take payment for the ref.

Show the member their bookings with GET /member/{memberid}/booking/future. Cancel a booking with POST /booking/{bookingid}/cancel.


Book personal training

  1. Log the member in, or use the token from the signup or enquiry.
  2. Show the services and their prices with GET /servicetype. A member also sees the membership benefits that pay for a service.
  3. Show the free times with GET /service/{serviceid}/availability. Send week (a Monday). Each row is one trainer at one time.
  4. Send the time the member selects to POST /checkout. Copy the values from the availability row:
{"line_list": [{"type": "service_booking", "serviceid": 1, "date": "2026-11-02",
  "start_time": "06:00:00", "end_time": "06:30:00", "resourceid": 56791}]}
  1. If paid is false, take payment for the ref.

Take payment

The API takes payment with Stripe.

  1. Show the charges with GET /member/{memberid}/payment/{ref}.
  2. Start the payment with POST /member/{memberid}/payment/{ref}/start. The answer has a Stripe publishable_key and client_secret.
  3. Show the Stripe Payment Element with these values, and let the member pay.
  4. Send POST /member/{memberid}/payment/{ref}/confirm. When paid is true, the payment is complete.

If the member does not pay for a booking or purchase, release it with POST /checkout/{ref}/reverse.


Use an AI agent to build it

An AI agent, for example Claude or ChatGPT, can build the website for you. Connect it to GymMaster first. Refer to Connect Your Own AI Agent.

The agent gets the full API from the GymMaster tool get_member_portal_api. The tool has a step-by-step guide for each part of a website: timetable, signup, free trial, class bookings, PT bookings, payment, member account and testing.

Example request to your agent:

Use get_member_portal_api to build a website for my club. Include the timetable, online signup, a free trial form, class bookings and PT bookings with Stripe payment. Follow the testing guide before you test.


Test safely

There is no test copy of your club. Signups, enquiries and bookings that you make in a test go into your live GymMaster.

  • Test with a member that your staff made for testing.
  • Give test signups a clear name, for example Test Website, and remove them after the test.
  • Start with the paths that only read data: GET /club, GET /club/membership, GET /class/schedule and GET /servicetype.
  • Use Stripe test cards only when the publishable_key starts with pk_test_. Other payments are real charges.
  • Release unpaid test bookings with POST /checkout/{ref}/reverse.

Limits

  • Browsers can call the API only from the website set for each club location in GymMaster (with or without www.), and from http://localhost while you build the site. To use another address, change the club website first, or send the requests through your own website server.
  • The API takes payment only with Stripe. With other billing providers, charges stay on the member’s account.
  • Logins are limited to 16 attempts in 20 minutes for each IP address and each email address.

To send events from GymMaster to your own system, refer to Webhooks for GymMaster.