Briefing

SessionMood API: Real‑Time User Mood Scoring Based on Behavioral Events

ai-dev
by Bendrot Studios ·

Implement the SessionMood API by sending behavioral events with the provided endpoint and retrieving real‑time mood scores.

What to do now

Deploy the SessionMood API and integrate event tracking to capture user mood in real time.

Summary

SessionMood API is a REST API that scores user mood in real time based on behavioral events, built with Node.js, Supabase, and Railway, and available on RapidAPI. The API accepts event ingestion at /v1/sessions/{id}/events and mood retrieval at /v1/sessions/{id}/mood, supporting event types such as click, rage_click, scroll, idle, page_view, error, hover, focus, blur, copy, paste, and navigation. The response includes mood, confidence, suggested_action, signals, and event_count, with mood states mapped to frustrated, engaged, bored, confused, curious, and satisfied. The scoring engine uses a weighted signal system where each event type adds or subtracts from mood scores across all six states, and the highest score wins. The API has a free tier of 5,000 sessions/month on RapidAPI, full docs on RapidAPI and a separate docs site, and requires an API key in the x-api-key header. The article provides example fetch calls for event ingestion and mood retrieval, and notes that the API uses no SDKs, just fetch() calls. The API is designed to be lightweight and easy to integrate, and the article invites feedback on which behavioral signals matter most for detecting user mood.

Key changes

  • REST API endpoints for event ingestion (/v1/sessions/{id}/events) and mood retrieval (/v1/sessions/{id}/mood)
  • Supports event types: click, rage_click, scroll, idle, page_view, error, hover, focus, blur, copy, paste, navigation
  • Returns mood state, confidence, suggested_action, signals, and event_count
  • Mood states: frustrated, engaged, bored, confused, curious, satisfied
  • Weighted signal system where each event type adds or subtracts from mood scores
  • Built with Node.js, Supabase, Railway; no SDKs needed
  • Free tier of 5,000 sessions/month on RapidAPI
  • Full docs available on RapidAPI and separate docs site

Affects

internal

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting