Skip to content

REST API Overview

The Fizzy MCP hosted service provides a comprehensive REST API for interacting with the service programmatically. This API is separate from the MCP endpoint and is designed for administrative tasks, usage tracking, and service health monitoring.

All REST API endpoints are served from:

https://fizzy-mcp-hosted.ryanyogan.workers.dev

The REST API supports multiple authentication methods depending on the endpoint and use case.

Use your Personal Access Token in the X-Fizzy-Token header:

Terminal window
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage

This is the primary authentication method for user-specific endpoints like usage tracking.

For service-to-service communication, use an API key:

Terminal window
curl -H "X-API-Key: your-api-key" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/admin/stats/overview

When accessing the API through a web browser with an active session, cookies are used automatically.

Some endpoints are publicly accessible without authentication:

  • GET / - Service root
  • GET /api/health - Health check
  • GET /api/info - Service information

All API responses follow a consistent JSON structure.

{
"data": {
// Response payload
},
"meta": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2024-01-15T10:30:00.000Z"
}
}

When an error occurs, the API returns a structured error response:

{
"error": "RATE_LIMIT_ERROR",
"message": "Rate limit exceeded. Please try again in 60 seconds.",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeDescription
errorstringMachine-readable error code
messagestringHuman-readable error description
requestIdstringUnique request identifier for debugging
StatusDescription
200Success
201Created (for POST requests that create resources)
400Bad Request - Invalid parameters
401Unauthorized - Missing or invalid authentication
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error
CodeDescription
AUTH_ERRORAuthentication failed or token invalid
FORBIDDEN_ERRORPermission denied for this operation
NOT_FOUND_ERRORRequested resource not found
VALIDATION_ERRORInvalid request parameters
RATE_LIMIT_ERRORRate limit exceeded
API_ERRORInternal server error

API requests are rate-limited based on your service tier:

TierRequests/MinuteDaily Limit
Free601,000
Pro30010,000
Enterprise1,000Unlimited

Rate limit headers are included in all responses:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312260

Health & Info

Service status and information endpoints that don’t require authentication. View Health Endpoints

MethodEndpointDescription
GET/Service root with links and info
GET/api/healthHealth check
GET/api/infoService info with tier details
GET/mcp/infoMCP server capabilities
MethodEndpointDescription
GET/api/me/usageCurrent usage statistics
GET/api/me/usage/todayToday’s usage
GET/api/me/historyUsage history
POST/mcpMCP Streamable HTTP endpoint
MethodEndpointDescription
GET/api/admin/settingsGet all settings
PATCH/api/admin/settingsUpdate settings
POST/api/admin/settings/resetReset to defaults
GET/api/admin/stats/overviewGlobal usage stats
GET/api/admin/stats/toolsPer-tool statistics

Common headers used across the API:

HeaderRequiredDescription
Content-TypeFor POST/PATCHShould be application/json
AcceptRecommendedapplication/json or text/event-stream
X-Fizzy-TokenFor user endpointsYour Fizzy Personal Access Token
X-Fizzy-Account-SlugOptionalTarget account slug (e.g., /my-org)
X-API-KeyFor admin endpointsService API key
Terminal window
# Check service health (no auth required)
curl https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/health
# Get your usage stats (requires token)
curl -H "X-Fizzy-Token: fz_xxxxxxxxxxxxx" \
https://fizzy-mcp-hosted.ryanyogan.workers.dev/api/me/usage