nysxl

Plugin API

An API so scripts and AI agents can manage plugins: change details, upload new versions, set which version is current and keep the roadmap up to date. Machine-readable spec: /api/v1/openapi.json (OpenAPI 3.1).

1. Get a token

In Admin → Shop → Agent API, press New token, give it the agent's name (that name shows in the audit log and Discord), tick the scopes it needs and optionally limit it to some plugins. The token (nxu_…) is shown once. Give it to the agent as a secret or environment variable, for example NYSXL_TOKEN. Revoke it on the same page at any time; it stops working instantly.

ScopeLets the agent
plugins:readRead plugins, versions and roadmaps.
plugins:writeCreate plugins and change their details, price, pictures and published state.
versions:publishUpload versions, set the latest one and roll back.
roadmap:writeAdd, change and delete roadmap items.
tickets:readRead bug reports and feature requests (no customer emails).
monitor:readRead the security and health summary (no customer emails or secrets).

2. Basics

Base URL https://nysxl.org/api/v1. Send Authorization: Bearer $NYSXL_TOKEN. Bodies and replies are JSON (uploads are multipart). Errors look like {"error":{"code":"missing_scope","message":"…"}} with a matching HTTP status (400 bad input, 401 bad token, 403 missing scope, 404 not found, 409 conflict, 429 too many calls). Limits: 300 calls an hour per token and 30 uploads an hour. Every call is recorded in the admin audit log under agent:<label>.

3. Endpoints

MethodPathScopeWhat it does
GET/meanyWhich token this is: label, scopes, plugins.
GET/pluginsplugins:readAll plugins (drafts too) with their latest version.
POST/pluginsplugins:writeCreate a plugin. Starts as an unpublished draft.
GET/plugins/{slug}plugins:readOne plugin with every field and all versions.
PATCH/plugins/{slug}plugins:writeChange details: name, tagline, description, price_cents, compat, faq, guide, config, demo, media, published…
POST/plugins/{slug}/mediaplugins:writeUpload a picture (raw PNG/JPEG/GIF/WebP body, 2 MB max). Added to the plugin's media.
GET/plugins/{slug}/versionsplugins:readVersions, latest first.
POST/plugins/{slug}/versionsversions:publishUpload a new .jar. It becomes the latest and a Discord release alert goes out.
PATCH/plugins/{slug}/versions/{version}versions:publishFix a version's changelog or compat badges.
POST/plugins/{slug}/versions/{version}/latestversions:publishMake that version the one customers download.
POST/plugins/{slug}/rollbackversions:publishGo back to the version before the current one.
GET/plugins/{slug}/roadmapplugins:readRoadmap items (status planned, in-progress or done).
POST/plugins/{slug}/roadmaproadmap:writeAdd a roadmap item.
PATCH/plugins/{slug}/roadmap/{id}roadmap:writeChange a roadmap item.
DELETE/plugins/{slug}/roadmap/{id}roadmap:writeDelete a roadmap item.
GET/plugins/{slug}/ticketstickets:readBug reports, feature requests and support tickets (read only; ?kind=feature). No customer details.
GET/plugins/{slug}/tickets/{id}tickets:readOne ticket's messages.
GET/monitor?hours=24monitor:readSecurity and health summary: admin logins, failed logins, sensitive changes, errors, uptime, last backup, order counts.
GET/plugins/{slug}/latestnonePublic latest version of a published plugin, for update checkers.

4. Examples

List plugins

curl -s https://nysxl.org/api/v1/plugins \
  -H "Authorization: Bearer $NYSXL_TOKEN"

Upload a new version (safe to retry)

curl -s https://nysxl.org/api/v1/plugins/nysxl-relics/versions \
  -H "Authorization: Bearer $NYSXL_TOKEN" \
  -H "Idempotency-Key: relics-1.4.2" \
  -F file=@build/libs/NysxlRelics-1.4.2.jar \
  -F version=1.4.2 \
  -F "changelog=Fixed relic cooldowns after relog" \
  -F "compat=Paper 26.3, Needs NSU" \
  -F publish=true

publish=true also publishes the plugin if it's still a draft. Sending the same Idempotency-Key again returns the first result instead of uploading twice.

Change details

curl -s -X PATCH https://nysxl.org/api/v1/plugins/nysxl-relics \
  -H "Authorization: Bearer $NYSXL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tagline":"Collectable relics with real abilities","compat":["Paper 26.3","Needs NSU"],"price_cents":0}'

Upload a picture

curl -s https://nysxl.org/api/v1/plugins/nysxl-relics/media \
  -H "Authorization: Bearer $NYSXL_TOKEN" \
  -H "Content-Type: image/png" \
  --data-binary @screenshot.png

Roll back, or pick the current version

curl -s -X POST https://nysxl.org/api/v1/plugins/nysxl-relics/rollback -H "Authorization: Bearer $NYSXL_TOKEN"
curl -s -X POST https://nysxl.org/api/v1/plugins/nysxl-relics/versions/1.4.1/latest -H "Authorization: Bearer $NYSXL_TOKEN"

Roadmap

curl -s https://nysxl.org/api/v1/plugins/nysxl-relics/roadmap \
  -H "Authorization: Bearer $NYSXL_TOKEN" -H "Content-Type: application/json" \
  -d '{"title":"Relic trading","note":"Trade relics between players","status":"planned"}'

curl -s -X PATCH https://nysxl.org/api/v1/plugins/nysxl-relics/roadmap/ITEM_ID \
  -H "Authorization: Bearer $NYSXL_TOKEN" -H "Content-Type: application/json" \
  -d '{"status":"done"}'

Feature requests

curl -s "https://nysxl.org/api/v1/plugins/nysxl-relics/tickets?kind=feature" -H "Authorization: Bearer $NYSXL_TOKEN"

Public update check (no token)

curl -s https://nysxl.org/api/v1/plugins/nysxl-relics/latest