Unkey · API Governance Rules
Unkey API Rules
Spectral linting rules defining API design standards and conventions for Unkey.
10 Rules
error 3
warn 7
Rule Categories
unkey
Rules
warn
unkey-post-only-management
Management endpoints should use POST method with dot-notation operationId
$.paths[*]
error
unkey-operation-id-dot-notation
Operation IDs must use dot-notation (e.g. keys.createKey, ratelimit.limit)
$.paths[*][*].operationId
error
unkey-path-versioning
All API paths must start with /v2/
$.paths[*]~
warn
unkey-bearer-auth
All operations (except liveness) must require rootKey authentication
$.paths[?(!@property.match(/liveness/))][*]
warn
unkey-response-envelope
Success responses must use the meta+data envelope structure
$.paths[*][*].responses['200'].content['application/json'].schema
warn
unkey-title-case-summary
Operation summaries must use Title Case
$.paths[*][*].summary
warn
unkey-valid-tags
Operations must use defined API resource tags
$.paths[*][*].tags[*]
error
unkey-json-request-body
Request bodies must use application/json media type
$.paths[*][*].requestBody.content
warn
unkey-error-response-401
Operations requiring auth must define 401 responses
$.paths[?(!@property.match(/liveness/))][*]
warn
unkey-error-response-403
Operations with permissions must define 403 responses
$.paths[*][*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for spectral rules
4 MCP tools reach this
find_rulesBrowse and filter every ruleset in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/unkey-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.