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.
| Scope | Lets the agent |
|---|---|
plugins:read | Read plugins, versions and roadmaps. |
plugins:write | Create plugins and change their details, price, pictures and published state. |
versions:publish | Upload versions, set the latest one and roll back. |
roadmap:write | Add, change and delete roadmap items. |
tickets:read | Read bug reports and feature requests (no customer emails). |
monitor:read | Read 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
| Method | Path | Scope | What it does |
|---|---|---|---|
| GET | /me | any | Which token this is: label, scopes, plugins. |
| GET | /plugins | plugins:read | All plugins (drafts too) with their latest version. |
| POST | /plugins | plugins:write | Create a plugin. Starts as an unpublished draft. |
| GET | /plugins/{slug} | plugins:read | One plugin with every field and all versions. |
| PATCH | /plugins/{slug} | plugins:write | Change details: name, tagline, description, price_cents, compat, faq, guide, config, demo, media, published… |
| POST | /plugins/{slug}/media | plugins:write | Upload a picture (raw PNG/JPEG/GIF/WebP body, 2 MB max). Added to the plugin's media. |
| GET | /plugins/{slug}/versions | plugins:read | Versions, latest first. |
| POST | /plugins/{slug}/versions | versions:publish | Upload a new .jar. It becomes the latest and a Discord release alert goes out. |
| PATCH | /plugins/{slug}/versions/{version} | versions:publish | Fix a version's changelog or compat badges. |
| POST | /plugins/{slug}/versions/{version}/latest | versions:publish | Make that version the one customers download. |
| POST | /plugins/{slug}/rollback | versions:publish | Go back to the version before the current one. |
| GET | /plugins/{slug}/roadmap | plugins:read | Roadmap items (status planned, in-progress or done). |
| POST | /plugins/{slug}/roadmap | roadmap:write | Add a roadmap item. |
| PATCH | /plugins/{slug}/roadmap/{id} | roadmap:write | Change a roadmap item. |
| DELETE | /plugins/{slug}/roadmap/{id} | roadmap:write | Delete a roadmap item. |
| GET | /plugins/{slug}/tickets | tickets:read | Bug reports, feature requests and support tickets (read only; ?kind=feature). No customer details. |
| GET | /plugins/{slug}/tickets/{id} | tickets:read | One ticket's messages. |
| GET | /monitor?hours=24 | monitor:read | Security and health summary: admin logins, failed logins, sensitive changes, errors, uptime, last backup, order counts. |
| GET | /plugins/{slug}/latest | none | Public 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