Embedding Mood Tracking

Example implementation for apps.

Mood Tracking allows your users to log how they’re feeling and view their emotional history over time. It’s lightweight, easy to implement, and fits naturally into daily routines, onboarding flows, dashboards, and wellbeing check-ins.

This page shows how to embed mood tracking inside your app using the therappai API.


How Mood Tracking Works

A mood entry consists of:

  • a rating (number)

  • an optional note

  • an auto-generated timestamp

Your application:

  1. Collects the user’s mood input

  2. Sends it to the API

  3. Fetches historical moods as needed

  4. Visualises or processes the data however you want

The API handles storage so you don’t need to maintain your own mood database.


1. Create a Mood Entry

Your UI collects the user’s rating (e.g., 1–5) and optional notes.

Example body:

{
  "mood": 2,
  "note": "Feeling stressed after work."
}

Send this to:

POST /moods/
Authorization: Bearer ACCESS_TOKEN

A successful response stores the mood entry for that user.


2. Fetch Mood History

To display past mood entries in charts, heatmaps, or summaries, call:

GET /moods/
Authorization: Bearer ACCESS_TOKEN

This returns a list of the user’s previous mood check-ins, including timestamps and notes.

You can use this data to build:

  • mood calendars

  • weekly insights

  • streaks

  • “how you’ve been feeling” widgets

  • trend graphs


3. Build a Mood Check-In UI

Developers typically create a simple daily check-in component using:

Rating Control

  • slider

  • set of emojis

  • numbered scale

  • colour-coded options

Optional Notes

A small textbox:

  • “What’s contributing to this mood?”

  • “Anything you’d like to note?”

Submit Button

Sends the call to /moods/.

This pairs well with your Daily Tasks, AI Therapy, or Content UI.


Mood history is ideal for:

  • line or bar charts

  • weekly summaries

  • heatmaps

  • day-by-day check-ins

  • aggregated insights

You build the visuals — the API just gives you the data.


5. Suggested Pairings

Mood tracking integrates naturally with other therappai features:

AI Therapy

  • If a user logs a very low mood, show a supportive therapist message.

  • Tailor conversation content based on trends.

Content Library

  • Recommend specific CBT/DBT exercises related to the user’s mood patterns.

Daily Tasks

  • Offer tasks designed to help stabilise or improve mood.

Crisis Buddy

  • If the user logs severe moods, make supportive options available.


Minimum Viable Mood Tracking Integration

  1. Build a mood check-in UI

  2. POST mood to /moods/

  3. GET mood history

  4. Visualise it in your app

  5. Use it to enhance therapy or content recommendations

That’s all you need to create a fully functional mood tracking feature.

Last updated