Skip to content

Usage Endpoints

These endpoints allow you to track your API usage, monitor quotas, and view historical usage data. All usage endpoints require authentication via the X-Fizzy-Token header.

All usage endpoints require a valid Fizzy Personal Access Token:

Terminal window
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage
MethodEndpointDescription
GET/api/me/usageCurrent usage statistics
GET/api/me/usage/todayToday’s usage
GET/api/me/historyUsage history

GET /api/me/usage Auth Required

Section titled “GET /api/me/usage ”

Returns your current cumulative usage statistics including total reads, writes, and current limits based on your subscription tier.

Terminal window
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage
{
"data": {
"userId": "usr_abc123def456",
"accountId": "acc_xyz789",
"tier": "pro",
"usage": {
"totalReads": 15234,
"totalWrites": 3421,
"totalRequests": 18655
},
"limits": {
"requestsPerMinute": 300,
"dailyLimit": 10000,
"monthlyLimit": 300000
},
"currentPeriod": {
"start": "2024-01-01T00:00:00.000Z",
"end": "2024-01-31T23:59:59.999Z",
"requestsUsed": 18655,
"requestsRemaining": 281345
}
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2024-01-15T10:30:00.000Z"
}
}
FieldTypeDescription
userIdstringYour unique user identifier
accountIdstringAssociated account identifier
tierstringYour subscription tier (free, pro, enterprise)
FieldTypeDescription
totalReadsnumberTotal read operations (GET requests, list operations)
totalWritesnumberTotal write operations (POST, PATCH, DELETE)
totalRequestsnumberSum of all requests
FieldTypeDescription
requestsPerMinutenumberMaximum requests per minute
dailyLimitnumberMaximum requests per day
monthlyLimitnumberMaximum requests per billing period
FieldTypeDescription
startstringPeriod start timestamp (ISO 8601)
endstringPeriod end timestamp (ISO 8601)
requestsUsednumberRequests used this period
requestsRemainingnumberRemaining requests (-1 for unlimited)
#!/bin/bash
TOKEN="fz_xxxxxxxxxxxxx"
BASE_URL="https://fizzy-mcp-hosted.ryanyogan.workers.dev"
# Get usage and check remaining quota
response=$(curl -s -H "X-Fizzy-Token: $TOKEN" "$BASE_URL/api/me/usage")
used=$(echo "$response" | jq '.data.currentPeriod.requestsUsed')
remaining=$(echo "$response" | jq '.data.currentPeriod.requestsRemaining')
tier=$(echo "$response" | jq -r '.data.tier')
echo "Tier: $tier"
echo "Used: $used requests"
echo "Remaining: $remaining requests"
# Warn if approaching limit
if [ "$remaining" != "-1" ] && [ "$remaining" -lt 1000 ]; then
echo "WARNING: Approaching usage limit!"
fi

GET /api/me/usage/today Auth Required

Section titled “GET /api/me/usage/today ”

Returns your usage statistics for the current day (UTC). Useful for monitoring daily quotas and real-time usage.

Terminal window
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage/today
{
"data": {
"date": "2024-01-15",
"timezone": "UTC",
"reads": {
"count": 523,
"limit": 5000
},
"writes": {
"count": 127,
"limit": 2500
},
"total": {
"count": 650,
"limit": 10000
},
"breakdown": {
"byHour": [
{ "hour": 0, "reads": 12, "writes": 3 },
{ "hour": 1, "reads": 8, "writes": 1 },
{ "hour": 2, "reads": 5, "writes": 0 },
{ "hour": 9, "reads": 145, "writes": 32 },
{ "hour": 10, "reads": 178, "writes": 45 },
{ "hour": 11, "reads": 175, "writes": 46 }
],
"byTool": {
"fizzy_list_cards": 312,
"fizzy_get_card": 156,
"fizzy_create_card": 89,
"fizzy_update_card": 38,
"fizzy_list_boards": 45,
"other": 10
}
},
"peakHour": {
"hour": 10,
"requests": 223
}
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2024-01-15T11:45:00.000Z"
}
}
FieldTypeDescription
datestringCurrent date in YYYY-MM-DD format
timezonestringTimezone for the date (always UTC)
readsobjectRead operation count and limit
writesobjectWrite operation count and limit
totalobjectTotal request count and limit
breakdown.byHourarrayHourly usage breakdown
breakdown.byToolobjectUsage count per MCP tool
peakHourobjectHour with highest traffic
Terminal window
TOKEN="fz_xxxxxxxxxxxxx"
curl -s -H "X-Fizzy-Token: $TOKEN" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage/today" | \
jq '{
date: .data.date,
total: "\(.data.total.count) / \(.data.total.limit)",
reads: .data.reads.count,
writes: .data.writes.count,
topTools: [.data.breakdown.byTool | to_entries | sort_by(-.value) | .[0:3] | .[].key]
}'

GET /api/me/history Auth Required

Section titled “GET /api/me/history ”

Returns historical usage data over a specified time period. Useful for analytics, billing reconciliation, and usage trends.

Terminal window
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/history?days=30"
ParameterTypeDefaultDescription
daysnumber30Number of days of history to retrieve (1-90)
{
"data": {
"period": {
"start": "2023-12-16",
"end": "2024-01-15",
"days": 30
},
"summary": {
"totalReads": 12450,
"totalWrites": 3210,
"totalRequests": 15660,
"averageDaily": 522,
"peakDay": {
"date": "2024-01-10",
"requests": 1245
}
},
"history": [
{
"date": "2024-01-15",
"reads": 523,
"writes": 127,
"total": 650,
"errors": 2
},
{
"date": "2024-01-14",
"reads": 612,
"writes": 98,
"total": 710,
"errors": 0
},
{
"date": "2024-01-13",
"reads": 234,
"writes": 45,
"total": 279,
"errors": 1
}
],
"trends": {
"weekOverWeek": "+12.5%",
"monthOverMonth": "+8.3%",
"direction": "increasing"
}
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2024-01-15T10:30:00.000Z"
}
}
FieldTypeDescription
totalReadsnumberTotal reads over the period
totalWritesnumberTotal writes over the period
totalRequestsnumberTotal requests over the period
averageDailynumberAverage daily requests
peakDayobjectDay with highest usage

Each entry contains:

FieldTypeDescription
datestringDate in YYYY-MM-DD format
readsnumberRead operations that day
writesnumberWrite operations that day
totalnumberTotal requests that day
errorsnumberError count that day
FieldTypeDescription
weekOverWeekstringChange vs previous week
monthOverMonthstringChange vs previous month
directionstringTrend direction (increasing, decreasing, stable)
Terminal window
# Get 7-day history
curl -s -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
"https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/history?days=7" | \
jq '.data.history[] | "\(.date): \(.total) requests (\(.reads) reads, \(.writes) writes)"'

Missing or invalid token:

{
"error": "AUTH_ERROR",
"message": "Invalid or missing X-Fizzy-Token header",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}

Too many requests:

{
"error": "RATE_LIMIT_ERROR",
"message": "Rate limit exceeded. Please try again in 60 seconds.",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"retryAfter": 60
}

  1. Cache usage data

    Don’t check usage on every request. Cache the response for at least 5 minutes.

  2. Set up alerts

    Monitor usage and set alerts at 75% and 90% of your limits.

  3. Use history for planning

    Analyze usage trends to predict when you might need to upgrade your tier.

  4. Track by tool

    Use the byTool breakdown to optimize your most-used operations.