Milestones API

The Milestones API provides the number of days since or until key milestone dates (e.g., quitting a habit, a future important date). You can store these dates in your Hyperhumans account and retrieve a days-since or days-until tally from the API. This is useful for tracking your personal journey and keeping various milestones updated in real time.


Primary URL

https://beta.hyperhumans.ai/api/milestones

Authentication

The Milestones API uses an authorization token (API key) with a rate limit for testing purposes. Upon signing up for an account, you automatically receive an API key, displayed in https://hyperhumans.ai/my-account/milestones. To authenticate requests, include the following header:

Authorization: Bearer YOUR_TOKEN


Setting Milestones

After creating your account on our website, you can set or update your milestone dates using the provided UI fields and boxes (e.g., your date of last use for each habit you want to track). These dates are stored in an encrypted and secure MySQL database, keyed to your username. You can update them at any time, and the API will automatically reflect the changes.


Rate Limit

Each token is limited to 50 calls per 24-hour period. If you need to increase your API calls during testing, please contact support.


Endpoints

The Milestones API has a single GET endpoint:

  • /milestones – Retrieves the milestone dates for your account and returns the number of days since/until each event.

Milestone Datapoints

The above GET API call will return any of the following milestones that you have set up in the UI. Common milestone datapoints include:

  • Sober from Cannabis
  • Sober from Alcohol
  • Sober from Tobacco
  • Sober from Hard Drugs
  • Sober from Gambling
  • Sober from Social Media
  • Sober from Sugar
  • Sober from Caffeine
  • Sober from Fast Food
  • Sober from Binge Eating
  • Sober from Online Shopping
  • Days Remaining & Title for 4 Countdowns

Example Request

Use the following cURL command to test the Milestones API. Update the token with your own. You will then receive a JSON object containing each tracked event and the number of days since its recorded date.

curl -H "Authorization: Bearer YOUR_TOKEN" https://beta.hyperhumans.ai/api/milestones/milestones

Example Response

The API will return a JSON object with a data field containing each event name and its corresponding days since the milestone date. Example:

{
    "data": {
        "daysSoberAlcohol": 123,
        "daysSoberGambling": 87,
        "daysCountdownOne": 5,
        "countdownOneText": "40th Birthday"
    }
}

Example Widget Path

Use these paths in your HyperDash (or similar) app to extract data for your widgets. For instance, if your response JSON includes “drinking” and “smoking,” you can access those days-since values by:

data.daysSoberAlcohol


data.daysCountdownOne