Developers
Explore our API documentation.
How the BYOViral API works
The REST API gives you the same data as your dashboard, in JSON: the stats of each website (pages, referrers, search engines, countries, browsers, devices and more), the websites on your account, and your account details. Use it to pull numbers into a spreadsheet, a client report, a status board or your own app.
Basics
- Base URL:
https://www.byoviral.com/api/v1/ - Authentication: send your API key as a Bearer token in the
Authorizationheader. Find the key on your API page. - Format: responses are JSON. Send
Accept: application/jsonwith every request. - Rate limit: 120 requests a minute per account. Above that the API answers
429 Too Many Requestsuntil the minute resets. - Health check:
GET /api/v1/statusneeds no key and answers{"message":"Online.","status":200}.
Endpoints
- Stats:
GET /api/v1/stats/{website_id}returns one report for a website, chosen withname, for the dates infromandto, with search, sorting and paging. - Websites: list, add, read, update and delete the websites on your account.
- Account:
GET /api/v1/accountreturns the account the key belongs to.
Keep the key secret: it has the same access as your login. Call the API from your server or a scheduled script, never from JavaScript that visitors can read in their browser. If a key leaks, generate a new one on the API page and the old one stops working.