Skip to main content
nexs

Resources

API Documentation

HTTP reference for the NEXS tracker. Auto-synced from lib/api-catalog.ts on every deploy.

Playground

Try the API live

Send real requests against production — read-only GET endpoints.

https://nexs.ro/api/stats

Public

No authentication required. Used by the tracker and embeddable widgets.

5 endpoints
GET/api/statsPublic

Network activity snapshot

Aggregate counts for homepage and mega menu — online servers, live players, per-game breakdown.

Response

{ totalServers, onlineServers, totalPlayers, byGame: { [slug]: { total, online, players } } }

Example

curl "https://nexs.ro/api/stats"
GET/api/serversPublic

List tracked servers

Returns a paginated list of active servers. VIP/boosted servers sort first, then by player count.

Parameters

NameInTypeDescription
gamequerystringGame enum or ALL (default ALL). CS2, CS16, CSGO, RUST, MINECRAFT, TF2, GMOD, OTHER
tagsquerystringComma-separated tags; all must match (also matches countryCode/location)
locationquerystringFilter by location name or ISO country code
statusquerystringonline or offline
qquerystringSearch name, IP, or map
pagequeryintegerPage number (default 1)
limitqueryintegerResults per page, 1–200 (default 50)

Response

{ servers: ServerListItem[], total, page, limit, hasMore } — includes botCount, version, passwordProtected, vacSecured

Example

curl "https://nexs.ro/api/servers?game=CS2&status=online&limit=25"
GET/api/servers/{id}Public

Live server stats

Current players, ping, map, and recent metrics chart data for a server profile page.

Parameters

NameInTypeDescription
id*pathstringServer CUID

Response

{ currentPlayers, maxPlayers, botCount, ping, isOnline, peakPlayers, map, version, passwordProtected, vacSecured, lastQueriedAt, chartData }

Errors: 404 — Server not found

Example

curl "https://nexs.ro/api/servers/clxxxxxxxx"
GET/api/widget/{id}.svgPublic

Embed widget (SVG)

Server status badge/banner/button/card/minimal as SVG. Supports themes, colors, size, and field toggles via query params. Cached 30s. CORS enabled for external embeds.

Parameters

NameInTypeDescription
id*pathstringServer CUID (.svg suffix optional)
typequerystringbadge | banner | button | card | minimal (default badge)
themequerystringnexs | dark | light | midnight | neon
accentquerystringAccent hex without # (e.g. A5FF8A)
bgquerystringBackground hex without #
radiusqueryintegerCorner radius 0–24 (default 12)
wqueryintegerWidth 120–900
hqueryintegerHeight 32–400
logoquerybooleanShow NEXS branding (1/0)
mapquerybooleanShow map name
pingquerybooleanShow ping
gamequerybooleanShow game label
namequerybooleanShow server name
addressquerybooleanShow IP:port
playersquerybooleanShow player count
statusquerybooleanShow online/offline indicator

Response

image/svg+xml

Errors: 404 — Not found

Example

<img src="https://nexs.ro/api/widget/clxxxxxxxx.svg?type=banner&theme=nexs" alt="Server status" width="560" height="72" loading="lazy" />
GET/api/widget/{id}/panelPublic

Live embed panel (HTML)

Self-contained HTML document for iframe embeds — clickable panel with live stats, same customization params as SVG widgets. Auto-refreshes every 30s.

Parameters

NameInTypeDescription
id*pathstringServer CUID
typequerystringSame params as SVG widget endpoint

Response

text/html

Example

<iframe src="https://nexs.ro/api/widget/clxxxxxxxx/panel?theme=nexs" width="100%" height="200" style="max-width:420px;border:0" loading="lazy"></iframe>

Owner API

Requires an API key (Dashboard → Public API) or a logged-in session cookie for dashboard routes.

1 endpoint
GET/api/public/server/{ip:port}API key

Owned server details (API key)

Full server snapshot including metrics history. Only returns servers you own.

Parameters

NameInTypeDescription
ip:port*pathstringe.g. 1.2.3.4:27015 — URL-encoded
x-api-key*headerstringYour API key from the dashboard
keyquerystringAlternative to x-api-key header

Response

{ id, ip, port, game, name, map, maxPlayers, currentPlayers, botCount, ping, status, tags, location, countryCode, peakPlayers, version, passwordProtected, vacSecured, lastQueriedAt, metrics }

Errors: 401 — Missing/invalid API key · 404 — Server not found or not owned

Example

curl -H "x-api-key: YOUR_KEY" "https://nexs.ro/api/public/server/1.2.3.4%3A27015"

Dashboard (session)

Requires a logged-in session cookie. These routes are documented for developers — they cannot be called without valid authentication. All requests without a session return 401.

Documenting these endpoints does not expose your account. Attackers still need your session cookie or API key — neither is visible on this page.

12 endpoints
POST/api/auth/register/startPublic

Start registration (send email code)

Parameters

NameInTypeDescription
email*bodystring

Response

{ exists: true } or { exists: false, sent: true }

Errors: 400 · 429 rate limited

POST/api/auth/register/verifyPublic

Verify email code

Parameters

NameInTypeDescription
email*bodystring
code*bodystring6-digit code

Response

{ ok: true, ticket: string }

Errors: 400 · 409

POST/api/auth/register/completePublic

Complete registration

Parameters

NameInTypeDescription
ticket*bodystring
password*bodystring
namebodystring

Response

{ ok: true, user: { email, name } }

Errors: 400 · 409

PUT/api/authPublic

Login

Parameters

NameInTypeDescription
email*bodystring
password*bodystring

Response

{ ok: true, user: { email, name } }

Errors: 401 Invalid credentials

POST/api/auth/logoutSession cookie

Logout

Response

{ ok: true }
POST/api/dashboard/api-keySession cookie

Rotate public API key

Generates a new API key and revokes the previous one. Session cookie is refreshed with the new key.

Response

{ apiKey: string }

Errors: 401 · 500

GET/api/dashboard/serversSession cookie

List your servers

Response

{ user, servers: [...] }

Errors: 401 Unauthorized

POST/api/dashboard/serversSession cookie

Add or re-register server

Parameters

NameInTypeDescription
ip*bodystring
game*bodystring
name*bodystring
portbodyintegerDefault 27015
countryCodebodystring
tagsbodystring[]

Response

{ server, instructions } — hostname must include claim token

Errors: 400 · 409 Server already claimed by another owner

POST/api/dashboard/claimSession cookie

Verify server claim

Parameters

NameInTypeDescription
serverId*bodystring

Response

{ verified: true, server } or { verified: false, message }

Errors: 400 Token not in hostname · 404

GET/api/dashboard/webhooksSession cookie

List webhooks

Response

{ webhooks: [...] }
POST/api/dashboard/webhooksSession cookie

Create webhook

Parameters

NameInTypeDescription
serverId*bodystring
url*bodystringDiscord webhook URL
triggerEvents*bodystring[]OFFLINE, ONLINE, PLAYER_MILESTONE, PLAYER_RECORD
milestoneAtbodyintegerRequired for PLAYER_MILESTONE

Response

{ webhook }

Errors: 404 Claimed server not found

DELETE/api/dashboard/webhooks?id={id}Session cookie

Delete webhook

Parameters

NameInTypeDescription
id*querystring

Response

{ ok: true }
API Documentation | NEXS