{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-mms-api-v2/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Webhooks","description":"Gateway to technical documentation for EGYM Platform."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhooks","__idx":0},"children":["Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks enable EGYM to push real-time notifications to your application. They offer valuable additions to user journeys for gym operators and their members. We use HTTPS to send these notifications to a URL you specify. You can create multiple webhooks for a single gym."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Prerequisites and limitations"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks are designed to work with MMS integrations. The gym-based MMS API key is used for authentication, and the EGYM ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}," is used as the member identifier."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some Webhook events require Data sharing (C2B) and Health Data consents from the member before data can be shared."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhook data must not be used for member retention."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"who-it-is-for","__idx":1},"children":["Who it is for"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any type of application can subscribe, provided an MMS API v2 integration is in place. Typical partners are third-party Class booking providers, BI tools and Member Management Software providers."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-cases","__idx":2},"children":["Use cases"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use webhook event notifications to alert your app to certain events."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Use case"},"children":["Use case"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event type"},"children":["Event type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Target tools"},"children":["Target tools"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required member consents"},"children":["Required member consents"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gym check-in / check-out"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GYM_CHECKIN"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GYM_CHECKOUT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Occurs whenever a customer has physically checked in or out of a gym"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Third-party class booking providers, BI tools"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["C2B opt-in"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Equipment check-in"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EQUIPMENT_CHECKIN"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Occurs whenever a customer has physically logged in to equipment in a gym"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MMS, third-party class booking providers, BI tools"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Membership delete"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MEMBERSHIP_DELETE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Occurs once member data gets deleted from EGYM"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MMS, third-party class booking providers, BI tools"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["C2B opt-in"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Genius onboarding completed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GENIUS_ONBOARDING_COMPLETED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Occurs when a member completes EGYM Genius onboarding"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MMS, third-party class booking providers, BI tools"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["C2B and HEALTH_DATA opt-ins"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TEST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test event for webhook endpoint verification"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any webhook endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-case-1---customer-gym-checkingym-checkout-event","__idx":3},"children":["Use Case 1 - Customer Gym Checkin/Gym Checkout Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer Gym Checkin/Gym Checkout event notifies your application once a customer has physically checked in or out of a gym."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-case-2---customer-equipment-checkin-event","__idx":4},"children":["Use Case 2 - Customer Equipment Checkin Event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer Equipment Checkin event notifies your application once a customer has logged in to equipment in a gym."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-case-3---customer-membership-delete-event","__idx":5},"children":["Use Case 3 - Customer membership delete event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer membership delete event notifies your application once member data gets deleted from EGYM."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-case-4---genius-onboarding-completed-event","__idx":6},"children":["Use Case 4 - Genius onboarding completed event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Genius onboarding completed event notifies your application once a member has completed onboarding and created a training plan with EGYM Genius."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"serve-webhook-endpoint","__idx":7},"children":["Serve webhook endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Serve this endpoint so that it can be accessed by us without additional configuration and/or VPNs."," ","Only HTTPS endpoints with valid SSL certificates are allowed."," ","Timeout for requests to your endpoint is 5 seconds, after that requests will be treated as unsuccessful."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"event-call-endpoint-definition","__idx":8},"children":["Event call endpoint definition"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Method: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Headers: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key:{your_secret}, Content-Type:application/json"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payload: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"accountId\": \"[UUID]\", \"timestamp\": 1667921312188, \"type\" : \"GYM_CHECKIN\" }"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}," - account id of the user, UUID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}," - UTC timestamp of the event"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," - event type"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-to-enable-webhooks","__idx":9},"children":["How to enable webhooks"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-via-api-current","__idx":10},"children":["Configuration via API (current)"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"API configuration will be replaced"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The webhook management API endpoints are currently used for configuration but will be replaced with a UI-based configuration interface in the future. We recommend using the API for now, and we will provide migration guidance when the UI becomes available."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To configure webhooks programmatically:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/mms-api-v2/authentication"},"children":["Authenticate"]}," with your API credentials"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/mms-api-v2/apis/mms-v2/webhooks"},"children":["Webhook API endpoints"]}," to:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create webhook subscriptions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Update webhook URLs and secrets"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["List configured webhooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Delete webhook subscriptions"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-via-ui-future","__idx":11},"children":["Configuration via UI (future)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A user-friendly interface for webhook configuration will be available in the future, eliminating the need for API-based setup."]}]},"headings":[{"value":"Webhooks","id":"webhooks","depth":1},{"value":"Who it is for","id":"who-it-is-for","depth":2},{"value":"Use cases","id":"use-cases","depth":2},{"value":"Use Case 1 - Customer Gym Checkin/Gym Checkout Event","id":"use-case-1---customer-gym-checkingym-checkout-event","depth":3},{"value":"Use Case 2 - Customer Equipment Checkin Event","id":"use-case-2---customer-equipment-checkin-event","depth":3},{"value":"Use Case 3 - Customer membership delete event","id":"use-case-3---customer-membership-delete-event","depth":3},{"value":"Use Case 4 - Genius onboarding completed event","id":"use-case-4---genius-onboarding-completed-event","depth":3},{"value":"Serve webhook endpoint","id":"serve-webhook-endpoint","depth":1},{"value":"Event call endpoint definition","id":"event-call-endpoint-definition","depth":1},{"value":"How to enable webhooks","id":"how-to-enable-webhooks","depth":1},{"value":"Configuration via API (current)","id":"configuration-via-api-current","depth":2},{"value":"Configuration via UI (future)","id":"configuration-via-ui-future","depth":2}],"frontmatter":{"seo":{"title":"Webhooks"}},"lastModified":"2026-11-12T12:19:04.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/mms-api-v2/tutorials/webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}