{"openapi":"3.1.0","info":{"title":"EverStrongSF Client Data API","version":"1.0.0","description":"Read-only access to your own training data. Sign in with your EverStrongSF login. Trainer comments, recap notes, issue notes and trainer names are never included. Available only at studios that have enabled it."},"servers":[{"url":"https://app.everstrongsf.com/api/public/v1"}],"security":[{"bearer":[]}],"paths":{"/auth/token":{"post":{"summary":"Exchange your login for tokens","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string","const":"Bearer"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"accessExpiresAt":{"type":"string","format":"date-time"},"refreshExpiresAt":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/refresh":{"post":{"summary":"Exchange a refresh token for a new pair","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string"}}}}}},"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string","const":"Bearer"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"accessExpiresAt":{"type":"string","format":"date-time"},"refreshExpiresAt":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/revoke":{"post":{"summary":"Revoke a token pair (send either token)","responses":{"200":{"description":"Revoked"}}}},"/me":{"get":{"summary":"Who you are","responses":{"200":{"description":"Your account","content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"studio":{"type":["string","null"]},"weightUnit":{"type":"string","enum":["lbs","kg"]}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/programs":{"get":{"summary":"Your current programs and how each exercise is set up","responses":{"200":{"description":"Programs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"program":{"type":"string"},"exercises":{"type":"array","items":{"$ref":"#/components/schemas/ProgramExercise"}}}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exercises":{"get":{"summary":"Every exercise you have performed, with progress","responses":{"200":{"description":"Exercises","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Exercise"}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workouts":{"get":{"summary":"Your recorded sets, newest first","parameters":[{"name":"from","in":"query","required":false,"description":"Earliest session date, inclusive","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Latest session date, inclusive","schema":{"type":"string","format":"date"}},{"name":"exercise","in":"query","schema":{"type":"string"},"description":"Exact exercise name, case-insensitive"},{"name":"program","in":"query","schema":{"type":"string"},"description":"Program letter, e.g. A"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"One page of sets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Set"}},"nextCursor":{"type":["string","null"]}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/recaps":{"get":{"summary":"Dates of sessions that have a trainer recap, newest first (the recap text is not included)","parameters":[{"name":"from","in":"query","required":false,"description":"Earliest session date, inclusive","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Latest session date, inclusive","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Recaps","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":["string","null"],"format":"date"}}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Set":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":["string","null"],"format":"date","description":"Session date"},"exercise":{"type":"string"},"machineId":{"type":["string","null"]},"program":{"type":["string","null"]},"weight":{"type":["number","null"],"description":"In the unit from /me"},"reps":{"type":["number","null"]},"time":{"type":["string","null"],"description":"Time under load, m:ss"},"reachedFailure":{"type":"boolean","description":"Momentary muscular failure reached"},"nextWeight":{"type":["number","null"],"description":"Weight planned for next time"},"recordedAt":{"type":["string","null"],"format":"date-time"}}},"Exercise":{"type":"object","properties":{"exercise":{"type":"string"},"machineId":{"type":["string","null"]},"programs":{"type":"array","items":{"type":"string"}},"sets":{"type":"integer"},"sessions":{"type":"integer"},"firstDate":{"type":["string","null"],"format":"date"},"lastDate":{"type":["string","null"],"format":"date"},"firstWeight":{"type":["number","null"]},"bestWeight":{"type":["number","null"]},"latestWeight":{"type":["number","null"]},"growthPercent":{"type":["number","null"],"description":"First weight to best weight"}}},"ProgramExercise":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":["number","null"]},"exercise":{"type":"string"},"machineId":{"type":["string","null"]},"protocol":{"type":"string","enum":["failure","rep-max","drop-set"]},"targetReps":{"type":["number","null"]},"timeUnderTensionSeconds":{"type":["number","null"]},"repCadence":{"type":"object","properties":{"positive":{"type":["number","null"]},"static":{"type":["number","null"]},"negative":{"type":["number","null"]},"rest":{"type":["number","null"]}}},"setup":{"type":"object","properties":{"seat":{"type":["string","null"]},"back":{"type":["string","null"]},"hand":{"type":["string","null"]},"handle":{"type":["string","null"]},"pin":{"type":["string","null"]},"bodyPosition":{"type":["string","null"]}}},"note":{"type":["string","null"]},"cues":{"type":["string","null"]},"warnings":{"type":["string","null"]}}}}}}