Mood Metrics API Now Supports Encrypted Text Submissions! 🔒✨
- Michael Mogley
- 4 days ago
- 1 min read
Hey devs! 👋
We're super excited to roll out a brand-new optional feature: client-side encryption for text submissions. This means you can now protect sensitive or PII-heavy content (like customer reviews, support chats, or feedback forms) before it even hits our servers.
Why This is a Game-Changer for Privacy
If you're dealing with real user data, privacy is huge. With encrypted submissions:
Raw text never travels in plaintext.
You stay compliant (GDPR, CCPA, etc.) without losing real-time emotional insights.
Plaintext submissions still work too — total backward compatibility!
Boom — stronger privacy, zero hassle. 🚀
How It Works (Super Simple)
Grab the Public Certificate Hit this endpoint to get our current CA-signed RSA cert:
Encrypt Your Text Locally Use OpenSSL (it's on most machines) to wrap your text in a secure CMS envelope:
echo -n "This customer was really frustrated with the delay and lack of updates" | openssl cms -encrypt -aes-256-gcm -outform DER -recip cert.pem | base64 > payload.txtSend It to Mood Metrics POST the encrypted payload — we'll auto-detect and decrypt:
curl -X POST https://mood-metrics.p.rapidapi.com/analyses \
-H "X-RapidAPI-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "'"$(cat payload.txt)"'"}That's it — just a few lines, and your users' text stays private end-to-end.