Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.0.0",
"info": {
"title": "GymFlexa API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.gymflexa.com"
}
],
"components": {
"securitySchemes": {
"apiKey": {
"type": "http",
"scheme": "basic",
"description": "HTTP Basic auth carrying only the API key secret: Authorization: Basic base64(<key secret>)."
},
"accessToken": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Operator session token issued by the GymFlexa dashboard: Authorization: Token <access token>."
}
},
"schemas": {
"Error": {
"type": "object",
"required": [
"message",
"status"
],
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
},
"name": {
"type": "string"
},
"details": {
"type": "object",
"additionalProperties": true
}
}
},
"Appointment": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"gymId": {
"type": "string"
},
"memberId": {
"type": "string"
},
"serviceId": {
"type": "string"
},
"startTime": {
"type": "string",
"format": "date-time"
},
"endTime": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string"
},
"notes": {
"type": "string"
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"Gym": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string"
},
"address": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"appointmentDuration": {
"type": "integer",
"minimum": 1
},
"openingHours": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"Member": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"gymId": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string"
},
"dateOfBirth": {
"type": "string",
"format": "date"
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"Payment": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"gymId": {
"type": "string"
},
"memberId": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"date": {
"type": "string",
"format": "date"
},
"reference": {
"type": "string"
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"Service": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"gymId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer",
"minimum": 1
},
"price": {
"type": "number"
},
"color": {
"type": "string"
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"WebhookSubscription": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"gymId": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"active": {
"type": "boolean"
},
"consecutiveFailures": {
"type": "integer",
"minimum": 0
},
"creationTime": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"lastEditTime": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": true
},
"WebhookSubscriptionWithSecret": {
"allOf": [
{
"$ref": "#/components/schemas/WebhookSubscription"
},
{
"type": "object",
"required": [
"secret"
],
"properties": {
"secret": {
"type": "string",
"readOnly": true,
"description": "Signing secret returned exactly once on creation."
}
}
}
]
},
"DeletedResource": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"paths": {
"/api/appointments": {
"get": {
"tags": [
"Appointments"
],
"summary": "List appointments",
"description": "Lists the appointments of your gym. Requires the `appointments:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "query",
"name": "gymId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "memberId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "startTime",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "endTime",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "fields",
"description": "Comma-separated projection of fields to return",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Array of appointments",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Appointment"
}
}
}
}
},
"401": {
"description": "Missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "API key is missing the `appointments:read` scope",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "API key rate limit exceeded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiAppointments"
},
"post": {
"tags": [
"Appointments"
],
"summary": "Create an appointment",
"description": "Requires the `appointments:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "The created appointment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Appointment"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "postApiAppointments"
}
},
"/api/appointments/{appointmentId}": {
"get": {
"tags": [
"Appointments"
],
"summary": "Get an appointment",
"description": "Returns a single appointment by id. Appointments belonging to another organization respond 404. Requires the `appointments:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "appointmentId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The appointment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Appointment"
}
}
}
},
"404": {
"description": "Not found (or owned by another organization)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiAppointmentsAppointmentId"
},
"put": {
"tags": [
"Appointments"
],
"summary": "Update an appointment",
"description": "Requires the `appointments:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "appointmentId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The updated appointment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Appointment"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "putApiAppointmentsAppointmentId",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Appointment"
}
}
}
}
}
},
"/api/gyms": {
"get": {
"tags": [
"Gyms"
],
"summary": "List gyms",
"description": "Lists the gyms of your organization. Requires the `gyms:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"responses": {
"200": {
"description": "Array of gyms",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Gym"
}
}
}
}
},
"401": {
"description": "Missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "API key is missing the `gyms:read` scope",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "API key rate limit exceeded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiGyms"
},
"post": {
"tags": [
"Gyms"
],
"summary": "Create a gym",
"description": "Requires the `gyms:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "The created gym",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Gym"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "postApiGyms"
}
},
"/api/gyms/{gymId}": {
"get": {
"tags": [
"Gyms"
],
"summary": "Get a gym",
"description": "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.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "gymId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The gym",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Gym"
}
}
}
},
"404": {
"description": "Not found (or owned by another organization)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiGymsGymId"
},
"put": {
"tags": [
"Gyms"
],
"summary": "Update a gym",
"description": "Requires the `gyms:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "gymId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The updated gym",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Gym"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "putApiGymsGymId",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Gym"
}
}
}
}
},
"delete": {
"tags": [
"Gyms"
],
"summary": "Delete a gym",
"description": "Requires the `gyms:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "gymId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The deleted gym",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeletedResource"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "deleteApiGymsGymId"
}
},
"/api/members": {
"get": {
"tags": [
"Members"
],
"summary": "List members",
"description": "Lists the members of your gym. Requires the `members:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "query",
"name": "gymId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "email",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "fields",
"description": "Comma-separated projection of fields to return",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Array of members",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Member"
}
}
}
}
},
"401": {
"description": "Missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "API key is missing the `members:read` scope",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "API key rate limit exceeded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiMembers"
},
"post": {
"tags": [
"Members"
],
"summary": "Create a member",
"description": "Requires the `members:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "The created member",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Member"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "postApiMembers"
}
},
"/api/members/{memberId}": {
"get": {
"tags": [
"Members"
],
"summary": "Get a member",
"description": "Returns a single member by id. Members belonging to another organization respond 404. Requires the `members:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "memberId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The member",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Member"
}
}
}
},
"404": {
"description": "Not found (or owned by another organization)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiMembersMemberId"
},
"put": {
"tags": [
"Members"
],
"summary": "Update a member",
"description": "Requires the `members:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "memberId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The updated member",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Member"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "putApiMembersMemberId",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Member"
}
}
}
}
},
"delete": {
"tags": [
"Members"
],
"summary": "Delete a member",
"description": "Requires the `members:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "path",
"name": "memberId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The deleted member",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeletedResource"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "deleteApiMembersMemberId"
}
},
"/api/payments": {
"get": {
"tags": [
"Payments"
],
"summary": "List payments",
"description": "Lists the payments of your gym. Requires the `payments:read` scope.\n",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"parameters": [
{
"in": "query",
"name": "gymId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "memberId",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "fields",
"description": "Comma-separated projection of fields to return",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Array of payments",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Payment"
}
}
}
}
},
"401": {
"description": "Missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "API key is missing the `payments:read` scope",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "API key rate limit exceeded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"description": "Request failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"operationId": "getApiPayments"
},
"post": {
"tags": [
"Payments"
],
"summary": "Create a payment",
"description": "Requires the `payments:write` scope.",
"security": [
{
"apiKey": []
},
{
"accessToken": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object
# --- truncated at 32 KB (50 KB total) ---
# Full source: https://artifacts.apis.io/gymflexa-com/openapi/_original/gymflexa-com-api-openapi.json