GymFlexa API reference

Every endpoint of the GymFlexa REST API, generated from the API itself.

All endpoints are relative to https://api.gymflexa.com. Authenticate every request with an API key issued for your GymFlexa organization.

apiKey — HTTP Basic auth carrying only the API key secret: Authorization: Basic base64(<key secret>).

accessToken — Operator session token issued by the GymFlexa dashboard: Authorization: Token <access token>.

Download the OpenAPI specification for use with your own tooling.

Appointments

GET/api/appointments

List appointments

Lists the appointments of your gym. Requires the appointments:read scope.

appointments:readapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdquerystring
memberIdquerystring
startTimequerystring
endTimequerystring
fieldsquerystringComma-separated projection of fields to return
Responses
StatusMeaning
200Array of appointments
401Missing or invalid credentials
403API key is missing the appointments:read scope
429API key rate limit exceeded
defaultRequest failed
POST/api/appointments

Create an appointment

Requires the appointments:write scope.

appointments:writeapiKeyaccessToken
Responses
StatusMeaning
200The created appointment
defaultRequest failed
GET/api/appointments/{appointmentId}

Get an appointment

Returns a single appointment by id. Appointments belonging to another organization respond 404. Requires the appointments:read scope.

appointments:readapiKeyaccessToken
Parameters
NameInTypeDescription
appointmentIdrequiredpathstring
Responses
StatusMeaning
200The appointment
404Not found (or owned by another organization)
defaultRequest failed
PUT/api/appointments/{appointmentId}

Update an appointment

Requires the appointments:write scope.

appointments:writeapiKeyaccessToken
Parameters
NameInTypeDescription
appointmentIdrequiredpathstring
Responses
StatusMeaning
200The updated appointment
defaultRequest failed

Gyms

GET/api/gyms

List gyms

Lists the gyms of your organization. Requires the gyms:read scope.

gyms:readapiKeyaccessToken
Responses
StatusMeaning
200Array of gyms
401Missing or invalid credentials
403API key is missing the gyms:read scope
429API key rate limit exceeded
defaultRequest failed
POST/api/gyms

Create a gym

Requires the gyms:write scope.

gyms:writeapiKeyaccessToken
Responses
StatusMeaning
200The created gym
defaultRequest failed
GET/api/gyms/{gymId}

Get a gym

Returns a single gym by id. Readable anonymously — the public whitelabel site resolves a gym without a vanity name by this id. Gyms belonging to another organization respond 404 to an authenticated caller. An API key must carry the gyms:read scope.

gyms:readapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdrequiredpathstring
Responses
StatusMeaning
200The gym
404Not found (or owned by another organization)
defaultRequest failed
PUT/api/gyms/{gymId}

Update a gym

Requires the gyms:write scope.

gyms:writeapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdrequiredpathstring
Responses
StatusMeaning
200The updated gym
defaultRequest failed
DELETE/api/gyms/{gymId}

Delete a gym

Requires the gyms:write scope.

gyms:writeapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdrequiredpathstring
Responses
StatusMeaning
200The deleted gym
defaultRequest failed

Members

GET/api/members

List members

Lists the members of your gym. Requires the members:read scope.

members:readapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdquerystring
emailquerystring
fieldsquerystringComma-separated projection of fields to return
Responses
StatusMeaning
200Array of members
401Missing or invalid credentials
403API key is missing the members:read scope
429API key rate limit exceeded
defaultRequest failed
POST/api/members

Create a member

Requires the members:write scope.

members:writeapiKeyaccessToken
Responses
StatusMeaning
200The created member
defaultRequest failed
GET/api/members/{memberId}

Get a member

Returns a single member by id. Members belonging to another organization respond 404. Requires the members:read scope.

members:readapiKeyaccessToken
Parameters
NameInTypeDescription
memberIdrequiredpathstring
Responses
StatusMeaning
200The member
404Not found (or owned by another organization)
defaultRequest failed
PUT/api/members/{memberId}

Update a member

Requires the members:write scope.

members:writeapiKeyaccessToken
Parameters
NameInTypeDescription
memberIdrequiredpathstring
Responses
StatusMeaning
200The updated member
defaultRequest failed
DELETE/api/members/{memberId}

Delete a member

Requires the members:write scope.

members:writeapiKeyaccessToken
Parameters
NameInTypeDescription
memberIdrequiredpathstring
Responses
StatusMeaning
200The deleted member
defaultRequest failed

Payments

GET/api/payments

List payments

Lists the payments of your gym. Requires the payments:read scope.

payments:readapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdquerystring
memberIdquerystring
fieldsquerystringComma-separated projection of fields to return
Responses
StatusMeaning
200Array of payments
401Missing or invalid credentials
403API key is missing the payments:read scope
429API key rate limit exceeded
defaultRequest failed
POST/api/payments

Create a payment

Requires the payments:write scope.

payments:writeapiKeyaccessToken
Responses
StatusMeaning
200The created payment
defaultRequest failed
GET/api/payments/{paymentId}

Get a payment

Returns a single payment by id. Payments belonging to another organization respond 404. Requires the payments:read scope.

payments:readapiKeyaccessToken
Parameters
NameInTypeDescription
paymentIdrequiredpathstring
Responses
StatusMeaning
200The payment
404Not found (or owned by another organization)
defaultRequest failed
PUT/api/payments/{paymentId}

Update a payment

Requires the payments:write scope.

payments:writeapiKeyaccessToken
Parameters
NameInTypeDescription
paymentIdrequiredpathstring
Responses
StatusMeaning
200The updated payment
defaultRequest failed
DELETE/api/payments/{paymentId}

Delete a payment

Requires the payments:write scope.

payments:writeapiKeyaccessToken
Parameters
NameInTypeDescription
paymentIdrequiredpathstring
Responses
StatusMeaning
200The deleted payment
defaultRequest failed

Services

GET/api/services

List services

Lists the services offered by your gym. Requires the services:read scope.

services:readapiKeyaccessToken
Parameters
NameInTypeDescription
gymIdquerystring
fieldsquerystringComma-separated projection of fields to return
Responses
StatusMeaning
200Array of services
401Missing or invalid credentials
403API key is missing the services:read scope
429API key rate limit exceeded
defaultRequest failed
POST/api/services

Create a service

Requires the services:write scope.

services:writeapiKeyaccessToken
Responses
StatusMeaning
200The created service
defaultRequest failed
GET/api/services/{serviceId}

Get a service

Returns a single service by id. Services belonging to another organization respond 404. Requires the services:read scope.

services:readapiKeyaccessToken
Parameters
NameInTypeDescription
serviceIdrequiredpathstring
Responses
StatusMeaning
200The service
404Not found (or owned by another organization)
defaultRequest failed
PUT/api/services/{serviceId}

Update a service

Requires the services:write scope.

services:writeapiKeyaccessToken
Parameters
NameInTypeDescription
serviceIdrequiredpathstring
Responses
StatusMeaning
200The updated service
defaultRequest failed
DELETE/api/services/{serviceId}

Delete a service

Requires the services:write scope.

services:writeapiKeyaccessToken
Parameters
NameInTypeDescription
serviceIdrequiredpathstring
Responses
StatusMeaning
200The deleted service
defaultRequest failed

Webhook subscriptions

GET/api/webhooksubscriptions

List webhook subscriptions

Webhook subscriptions deliver member, appointment and payment lifecycle events to your server as signed POST requests (X-Gymflexa-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of "timestamp.body">). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the secret is only returned once, on create.

accessToken
Responses
StatusMeaning
200Array of webhook subscriptions (without secrets)
defaultRequest failed
POST/api/webhooksubscriptions

Create a webhook subscription

The response includes the signing secret exactly once — store it; it cannot be retrieved again.

accessToken
Request body
FieldTypeDescription
gymIdrequiredstring
urlrequiredstring
eventsarray (member.created | member.updated | member.deleted | appointment.created | appointment.updated | appointment.deleted | payment.created)Empty array subscribes to all events
Responses
StatusMeaning
200The created subscription, including its secret
defaultRequest failed
PUT/api/webhooksubscriptions/{webhookSubscriptionId}

Update a webhook subscription

url, events and active are editable; the secret and gym are immutable. Re-enabling an auto-disabled endpoint is done by setting active back to true.

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
Responses
StatusMeaning
200The updated subscription (without secret)
defaultRequest failed
DELETE/api/webhooksubscriptions/{webhookSubscriptionId}

Delete a webhook subscription

Delete a webhook subscription

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
Responses
StatusMeaning
200Deleted
defaultRequest failed