Noxyr Noxyr
Zagłosuj
Add Bot Login with Discord

Server API

Read your server's ticket, sales, review and giveaway stats from your own tools.

What the API exposes

An authenticated API request reaches the Noxyr server and returns JSON with a depleting rate limit. GET /api/v1/server Authorization: Bearer •••••• Noxyr API { "id": "48213" "prefix": "!" "premium": true } RateLimit 60 33 60

The API is read-only and scoped to one server. It is meant for status pages, spreadsheets and internal tools that want the numbers the dashboard shows without a login. It cannot change settings, close tickets or create invoices.

Every endpoint lives under https://noxyrbot.com/api/v1 and returns JSON. The key identifies the server, so no endpoint takes a server ID.

GET /api/v1/
Which scopes are on for this key and the endpoints it can reach.
GET /api/v1/server
Name, icon, member count, online count, boosts and creation date.
GET /api/v1/tickets
Totals, open and closed counts, volume over 7 and 30 days, average rating.
GET /api/v1/activity?days=30
Daily messages, joins and leaves, up to 90 days.
GET /api/v1/invoices
Invoice counts, revenue by currency and payment status. With the invoice links scope, ?limit= adds recent invoices with a downloadable image URL.
GET /api/v1/reviews
Average rating, star breakdown and the five latest public reviews.
GET /api/v1/giveaways
Active and ended counts, total entries and the current giveaways.

Creating a key

Each server has one key. It is generated on the server's API page and shown once - only a hash is stored, so a lost key has to be regenerated, which invalidates the old one.

  1. Open the server on the dashboard and go to API.
  2. Press Generate and copy the key that starts with nxr_. It will not be shown again.
  3. Switch off any scope you do not need. Invoice links is off by default because it exposes customer invoice images.
  4. Optional: press Set up channel to have the bot create an API category and channel in the server with the endpoint list.

The page also shows when the key was last used and how many requests it has made, which is the quickest way to spot a leaked key. Disable it with the toggle, or revoke it to delete it entirely.

Scopes

Scopes gate endpoints, not fields. A request to an endpoint whose scope is off gets a 403 with a message naming the scope.

overview
/server
tickets
/tickets
activity
/activity
invoices
/invoices
invoiceLinks
Adds the recent invoice list with image links. Off by default.
reviews
/reviews
giveaways
/giveaways

Authentication and example request

Send the key as a Bearer token in the Authorization header. Calls are allowed from the browser (CORS is open) but a key in front-end code is a public key, so call the API from a server you control.

  1. curl -H "Authorization: Bearer nxr_your_key" https://noxyrbot.com/api/v1/tickets
  2. Response: {"total":128,"open":4,"closed":124,"opened7d":9,"opened30d":41,"closed7d":8,"averageRating":4.6,"ratingsCount":37}

Rate limits

Each key may make 60 requests per minute. The limit is returned in the standard RateLimit headers on every response, and exceeding it returns HTTP 429 with error "rate_limited". Poll no faster than the data changes - ticket and sales totals are fine to read once a minute.

Errors

Every error is JSON with a machine-readable error code and a human message.

401 unauthorized
The Authorization header is missing, not a Bearer token, or the key does not exist.
403 key_disabled
The key was switched off on the dashboard.
403 scope_disabled
That scope is off for this key.
404 not_found
Unknown endpoint. The message lists the valid ones.
404 guild_unavailable
The bot is no longer in the server.
429 rate_limited
More than 60 requests in a minute.
500 internal_error
Something failed on Noxyr's side. Retry later.