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[?([email protected](/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[?([email protected](/liveness/))][*]
warn
unkey-error-response-403
Operations with permissions must define 403 responses
$.paths[*][*]