API
MediaSafe API
Programmatic access to statistics and site management for integrations.
Authentication
All requests (except registration and login) require a JWT token in the header:
Authorization: Bearer YOUR_TOKEN
The token is issued on login:
POST https://api.mediasafe.cc/auth/login
Content-Type: application/json
{"email": "you@company.com", "password": "••••••••"}
Main endpoints
GET /me — profile, current plan, usage limitGET /sites — list of your sites with keys and snippetsPOST /sites — add a new site: {"domain": "example.com"}GET /stats/all?site=KEY&days=30 — full site statistics (summary, chart, campaigns, fraud reasons, blocklist)GET /stats/all?site=KEY&from=2026-07-01&to=2026-07-15 — statistics for a custom date rangeExample /stats/summary response
{
"total": 48210,
"clean": 32180,
"suspicious": 8940,
"fraud": 7090,
"fraudRate": 14.7,
"moneySaved": 3600,
"currency": "USD"
}
Rate limits
The API has no separate rate limit beyond your plan's overall event limit. Statistics can be queried without restriction.
Need access to additional endpoints (webhooks, bulk export)? Contact us.