Server API
Connect Firebase to Streakfox
Your data already lives in Firebase. Forward the action that matters from a Cloud Function and the streak takes care of itself.

FirebaseFirestore document created ✓
7day streakThe fox is proud.
M✓
T✓
W✓
T✓
F✓
S✓
S✓
What can keep the streak alive
Pick one action per program. Daily streaks count the first action each day; running totals count distinct completions.
- Firestore document created
- Any server-side action you can tie to a member
Set it up in 5 steps
- Create a program and copy its incoming URL from setup.
- Store the URL as a private STREAKFOX_INCOMING_URL secret available to a Cloud Function.
- In a Cloud Function, POST to the incoming URL after the action succeeds.
- Map a stable member email or ID to member and the source record ID to completion_id. Use the same member value as data-member in your widget.
- Trigger a test action and check processed progress before going live.
// Copy your program's incoming URL from Streakfox setup.
// Keep it in a server-only environment variable.
const response = await fetch(process.env.STREAKFOX_INCOMING_URL!, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
member: member.id,
completion_id: `lesson_complete:${completion.id}`,
}),
});
if (!response.ok) throw new Error(await response.text());Questions
How do I send Firebase events to Streakfox?
POST member and completion_id to your program's incoming URL from a Cloud Function. Keep that URL in server-only settings.
Works well with
If it can send a webhook, it can keep a streak.
Start a program, send one test action and watch the flame light up.
Start free