WHOOP User API

Endpoints for retrieving user profile and measurement data.

OpenAPI Specification

whoop-user-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: WHOOP Activity ID Mapping User API
  description: Utility endpoints for activity ID mapping
servers:
- url: https://api.prod.whoop.com/developer
tags:
- name: User
  description: Endpoints for retrieving user profile and measurement data.
paths:
  /v2/user/measurement/body:
    get:
      tags:
      - User
      summary: Get User Body Measurements
      description: Retrieves the body measurements (height, weight, max heart rate) for the authenticated user.
      operationId: getBodyMeasurement
      responses:
        '200':
          description: Successfully retrieved body measurements
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBodyMeasurement'
        '401':
          description: Invalid authorization
        '404':
          description: Requested resource not found
        '429':
          description: Request rejected due to rate limiting
        '500':
          description: Server error occurred while making request
      security:
      - OAuth:
        - read:body_measurement
  /v2/user/profile/basic:
    get:
      tags:
      - User
      summary: Get Basic User Profile
      description: Retrieves the basic profile information (name, email) for the authenticated user.
      operationId: getProfileBasic
      responses:
        '200':
          description: Successfully retrieved user profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBasicProfile'
        '401':
          description: Invalid authorization
        '404':
          description: Requested resource not found
        '429':
          description: Request rejected due to rate limiting
        '500':
          description: Server error occurred while making request
      security:
      - OAuth:
        - read:profile
  /v2/user/access:
    delete:
      tags:
      - User
      description: Revoke the access token granted by the user. If the associated OAuth client is configured to receive webhooks, it will no longer receive them for this user.
      operationId: revokeUserOAuthAccess
      responses:
        '204':
          description: Successful request; no response body
        '400':
          description: Client error constructing the request
        '401':
          description: Invalid authorization
        '429':
          description: Request rejected due to rate limiting
        '500':
          description: Server error occurred while making request
      security:
      - OAuth: []
components:
  schemas:
    UserBasicProfile:
      required:
      - email
      - first_name
      - last_name
      - user_id
      type: object
      properties:
        user_id:
          type: integer
          description: The WHOOP User
          format: int64
          example: 10129
        email:
          type: string
          description: User's Email
          example: jsmith123@whoop.com
        first_name:
          type: string
          description: User's First Name
          example: John
        last_name:
          type: string
          description: User's Last Name
          example: Smith
    UserBodyMeasurement:
      required:
      - height_meter
      - max_heart_rate
      - weight_kilogram
      type: object
      properties:
        height_meter:
          type: number
          description: User's height in meters
          format: float
          example: 1.8288
        weight_kilogram:
          type: number
          description: User's weight in kilograms
          format: float
          example: 90.7185
        max_heart_rate:
          type: integer
          description: The max heart rate WHOOP calculated for the user
          format: int32
          example: 200
          externalDocs:
            description: 'WHOOP Locker: Understanding Max Heart Rate and Why It Matters for Training'
            url: https://www.whoop.com/thelocker/calculating-max-heart-rate/
  securitySchemes:
    OAuth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.prod.whoop.com/oauth/oauth2/auth
          tokenUrl: https://api.prod.whoop.com/oauth/oauth2/token
          scopes:
            read:recovery: Read Recovery data, including score, heart rate variability, and resting heart rate.
            read:cycles: Read cycles data, including day Strain and average heart rate during a physiological cycle.
            read:workout: Read workout data, including activity Strain and average heart rate.
            read:sleep: Read sleep data, including performance % and duration per sleep stage.
            read:profile: Read profile data, including name and email.
            read:body_measurement: Read body measurements data, including height, weight, and max heart rate.
    Trusted Partner:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.prod.whoop.com/developer/v2/partner/token
          scopes:
            whoop-partner/token: Read service requests and upload results.