WorkOS · API Governance Rules
WorkOS API Rules
Spectral linting rules defining API design standards and conventions for WorkOS.
13 Rules
error 4
warn 6
info 3
Rule Categories
workos
Rules
error
workos-info-contact
WorkOS specs must include a contact pointing at workos.com.
$.info.contact
error
workos-server-url
Production server must be https://api.workos.com.
$.servers[*].url
warn
workos-operation-summary-title-case
Operation summaries should be Title Case (no leading lowercase letter).
$.paths.*[get,post,put,patch,delete].summary
warn
workos-operation-id-format
WorkOS operationIds follow ControllerName_method convention.
$.paths.*[get,post,put,patch,delete].operationId
info
workos-path-snake-case
WorkOS path segments use snake_case (lowercase + underscores), not kebab-case in resource names.
$.paths
warn
workos-property-snake-case
Response/request properties in WorkOS use snake_case.
$.components.schemas.*.properties
error
workos-tags-defined
Every operation must have at least one tag.
$.paths.*[get,post,put,patch,delete]
info
workos-tag-display-name
Tag definitions should include x-displayName for portal rendering.
$.tags[*]
warn
workos-list-pagination-params
List endpoints should accept limit, before, and after pagination parameters.
$.paths[?(@property.match(/.*\/(users|organizations|directories|connections|events|memberships|invitations|groups|feature_flags|api_keys|webhooks|widgets|audit_logs)$/))].get.parameters
warn
workos-list-response-list-metadata
List responses must include a list_metadata object with before/after cursors.
$.components.schemas[?(@property.match(/.*List$/))].properties
warn
workos-error-shape
Error responses should include a `message` field per WorkOS convention.
$.paths.*[get,post,put,patch,delete].responses[4??,5??].content.application/json.schema
error
workos-bearer-auth
WorkOS APIs use Bearer token (sk_*) auth.
$.components.securitySchemes
info
workos-id-prefix-convention
WorkOS resource IDs follow a prefix_ULID pattern (e.g. user_, org_, conn_, directory_, audit_).
$.components.schemas..properties.id