Events API

The Events API is the way in which Wellhub will receive details of usage events by our users within your application, this will form the basis for payment calculations.

Wellhub Events API does not have rate limiting. We do limit the request body's size to up to 5MB.

POST - Create events

https://api.wellness.gympass.com/events

Note:

  • The POST payload is an array of events. Multiple events can be sent in one request. If one event of the array has an issue, the entire payload will be invalidated.
  • All events related to the previous month should be received by latest the 5th of the following month in order to be considered for payment purposes. Ex. Usages from September must be received by Wellhub by the 5th of October.
  • It is strongly recommended that usage events are sent in chronological order. Ex. Send usages for days 1, 2, 3, 4 of the month in this order, and not 1, 4, 3, 2 of the month in the wrong order.

IMPORTANT || Usage events need to be sent to Wellhub as soon as the action has occurred. This must be the same day it occurred, or as close as possible to the action that has taken place by the user to guarantee they are correctly processed. If a user's usage is sent/received after they have canceled their subscription with Wellhub; This event will be ignored and it will not be considered for payment calculation.

(e.g. usage happened on Oct 20th and 10 days later - Oct 30th - The user cancels their subscriptions with Wellhub, but the usage events were sent on Nov 5th, these events will not be considered).

Request

Example
1curl --location --request POST 'https://api.wellness.gympass.com/events' \
2--header 'Content-Type: application/json' \
3--header 'Authorization: Bearer <gpw-api-key>' \
4--data-raw '[
5 {
6 "email": "email@wellhub.com",
7 "event_type": "signin",
8 "timestamp": "2020-05-04T09:44:40Z",
9 "gpw_id": "gpw-fa1c0eab-8de3-4f35-9e79-85ae486a75d6",
10 "user_id": "1234567890",
11 "event_subcategory": "workout",
12 "event_title": "video",
13 "event_subtitle": "Training",
14 "event_equipment": ["no equipment"],
15 "timezone": "UTC-5",
16 "event_duration": 30,
17 "viewing_duration": 15,
18 "geo_latitude": 38.722252,
19 "geo_longitude": -9.139337,
20 "device": "49c53afb-cdf4-49a9-bef7-73c399a913c9",
21 "ip": "127.0.0.1"
22 }
23]'

The timezone field will not be considered or converted at all. Payment calculations will be made considering the timestamp as it is sent to Wellhub by the partner.

Headers

FieldDescription
Content-Typeapplication/json
AuthorizationBearer gpw-api-key (this key is shared with you in the Welcome Email)
Params
FieldTypeRequiredDescriptionValidations
emailstringfalseUser emailValid email format
event_typestringtrueThe type of event the user participated inList of valid event types below
timestampstringtrueUsage event timestampShould be a timestamp from the past
Format RFC3339 (e.g 2025-04-11T10:20:30Z)
NOTE: Old formats are deprecated and should not be used
gpw_idstringtrueWellhub Wellness user IDValid ID format gpw-<uuid>
user_idstringfalsePartner user ID-
event_subcategorystringfalseCategory of activity the user participated inString size between 2 and 50 characters
event_titlestringfalseTitle of the event the user participated inString size between 2 and 50 characters
event_subtitlestringfalseSubtitle of the event the user participated inString size between 2 and 50 characters
event_equipmentarray of stringfalseEquipment required for the eventString size of each entry between 2 and 50 characters
NOTE: Size from 0 to 2 is currently supported BUT deprecated
timezonestringfalseTimezone of the timestamp-
event_durationintegerfalseTotal time, in minutes, of the eventBetween 0 and 500
viewing_durationintegerfalseNumber of minutes that the user actually participated in the eventBetween 0 and 500
geo_latitudefloatfalseUsers device geolocation (latitude)Between -90 and 90
geo_longitudefloatfalseUsers device geolocation (longitude)Between -180 and 180
devicestringfalseDevice associated with the user's participation in the event-
ipstringfalseIP associated with the user's participation in the eventValid IPv4 pattern
Event Types
Event TypeDescription
signupSign-up event
signinSign-in / Log-in
signoutSign-out / Log-out
audioListened to audio
videoWatched a video (recorded or live)
cancellationUser cancelled a session
chatUsed chat function
content_viewViewed content (valid for any type of content)
create_recordUser created a record inside the app (input information)
no_showUser did not take scheduled session
1_on_1_sessionUser performed individual one-on-one session (ex. therapy)
renewReturning user signing up for the partner app again
otherMiscellaneous category for anything else

Response

Status CodeBodyDescription
200emptyRequest was successfully received and validated
400description of payload errorRequest payload has an error
401emptyUnauthorized request, missing API key or wrong API key

Only events that are accurately received will be taken into account in the payment calculation. Consequently, the partner must implement the appropriate retry policy for 5xx status code. On the other hand, for 4xx status code, the partner must ensure that the request data is well-defined.