Menu

I built a REST API that detects how your users feel in real time
πŸ–ΌοΈ

I built a REST API that detects how your users feel in real time

DEV CommunityΒ·Bendrot StudiosΒ·6 months ago
#RVYGXqFz
#webdev#api#javascript#opensource#mood
Reading 0:00
15s threshold

I got tired of not knowing why users were dropping off in my app. Heatmaps show you where people click. Analytics show you when they leave. But nothing tells you how they felt while using it.

So I built SessionMood API β€” a REST API that scores user mood in real time based on behavioral events.

How it works

You send behavioral events from your frontend:

fetch ( " https://session-mood-api-production.up.railway.app/v1/sessions/user_123/events " , { method : " POST " , headers : { " Content-Type " : " application/json " , " x-api-key " : " YOUR_API_KEY " }, body : JSON . stringify ({ type : " click " }) });

Enter fullscreen mode

Exit fullscreen mode

Then read the mood at any point:

fetch ( " https://session-mood-api-production.up.railway.app/v1/sessions/user_123/mood " , { headers : { " x-api-key " : " YOUR_API_KEY " } }) . then ( r => r . json ()) . then ( console .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.