WHMCS · API Governance Rules
WHMCS API Rules
Spectral linting rules defining API design standards and conventions for WHMCS.
10 Rules
error 5
warn 5
Rule Categories
whmcs
Rules
error
whmcs-path-must-include-action
All WHMCS API paths must include an ?action= query parameter identifying the operation.
$.paths[*]~
warn
whmcs-operation-id-camel-case
WHMCS operation IDs must use camelCase to match the API command naming convention.
$.paths[*][*].operationId
error
whmcs-post-only
All WHMCS API operations must use POST method. WHMCS does not support GET, PUT, or DELETE.
$.paths[*]
error
whmcs-auth-required
All WHMCS API operations must reference the AuthCredentials schema for authentication.
$.paths[*].post.requestBody.content['application/x-www-form-urlencoded'].schema
warn
whmcs-response-json
WHMCS API responses must support application/json content type.
$.paths[*].post.responses[*].content
warn
whmcs-operation-summary-required
All WHMCS API operations must have a summary in Title Case.
$.paths[*].post.summary
warn
whmcs-operation-tags-required
All WHMCS API operations must have at least one tag for categorization.
$.paths[*].post.tags
error
whmcs-request-form-urlencoded
WHMCS API request bodies must use application/x-www-form-urlencoded content type.
$.paths[*].post.requestBody.content
warn
whmcs-response-result-field
All WHMCS API responses must include a 'result' field indicating success or error.
$.components.schemas[*].properties
error
whmcs-info-version-required
WHMCS API spec must include a version in the info object.
$.info.version