6.3.0
API v6.3.0 — New /badge endpoint: a standalone SVG badge, in v6.
- New GET /badge in
v6: it draws a standalone SVG badge, a pill that works in a plain<img>. Onlylabelis required.startandendgive a gradient,inkthe color of the text and of the icons andborderan outline.iconandtrailtake the name of one of106bundled icons (105from Lucide, plusdiscord).messageadds a second part, in the manner of shields.io, with its ownmessageStart,messageEndandmessageInk.sizegoes fromxstolg(16to28px),radius,angleandliftshape the badge, andfontandweightset the text. - The texts are bounded and checked:
labelandmessagehold64characters at most and refuse control, zero-width and bidirectional formatting characters, andlift,radiusandangletake a plain decimal with at most two decimals. Any invalid value is refused with a400and a message that names it. The image is sent withCache-Control: public, max-age=86400andContent-Security-Policy: default-src 'none'. - Nothing else changes:
v4andv5do not have/badgeand answer404withEndpoint not available in v4.orEndpoint not available in v5., and no other endpoint is touched.
- New
badgeexport, available from@moxon/api/v6and from the package root, which resolves to it: it takes the options of the query string, withlift,radiusandangleas numbers, and returns{ contentType, body },bodybeing the SVG. It throws anErrorwith the message of the HTTP400.@moxon/api/v4and@moxon/api/v5do not export it. - The icons come from Lucide, whose ISC licence and the MIT licence of the portions derived from Feather are kept in the source code.
- The new Badge page documents the parameters in three tables (text and icons, colors, shape and font), the bundled icons by family, the two-part badge, the response and its headers, the use from Node.js and every error message, with a Try panel that shows the badge it draws.
- The catalogue now lists
50endpoints,8of them in Images.
Last updated on November 15, 2026