Convex · API Governance Rules

Convex API Rules

Spectral linting rules defining API design standards and conventions for Convex.

7 Rules error 4 warn 3
View Rules File View on GitHub

Rule Categories

convex

Rules

error
convex-mgmt-info-title
Management API OpenAPI info.title must reference Convex Management
$.info.title
error
convex-mgmt-server-defined
At least one server URL must be defined
$.servers
error
convex-mgmt-server-host
Management API server URL must point to api.convex.dev
$.servers[*].url
error
convex-mgmt-bearer-auth
Management API must declare bearer authentication
$.components.securitySchemes
warn
convex-mgmt-tag-required
Tags must declare Projects, Deployments, Teams, AccessTokens, DeployKeys, CustomDomains, or EnvironmentVariables scope
$.tags[*].name
warn
convex-mgmt-operation-id-camelcase
Every operation must define an operationId in camelCase or snake_case
$.paths.*[get,put,post,delete,patch].operationId
warn
convex-mgmt-paths-prefix
Management API paths must live under /teams, /projects, /deployments, or /token
$.paths

Spectral Ruleset

Raw ↑
extends:
  - "spectral:oas"
documentationUrl: https://docs.convex.dev/management-api
rules:
  convex-mgmt-info-title:
    description: Management API OpenAPI info.title must reference Convex Management
    severity: error
    given: "$.info.title"
    then:
      function: pattern
      functionOptions:
        match: "(?i)Convex\\s+Management"
  convex-mgmt-server-defined:
    description: At least one server URL must be defined
    severity: error
    given: "$.servers"
    then:
      function: length
      functionOptions:
        min: 1
  convex-mgmt-server-host:
    description: Management API server URL must point to api.convex.dev
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "https://api\\.convex\\.dev/v1"
  convex-mgmt-bearer-auth:
    description: Management API must declare bearer authentication
    severity: error
    given: "$.components.securitySchemes"
    then:
      function: defined
  convex-mgmt-tag-required:
    description: Tags must declare Projects, Deployments, Teams, AccessTokens, DeployKeys, CustomDomains, or EnvironmentVariables scope
    severity: warn
    given: "$.tags[*].name"
    then:
      function: enumeration
      functionOptions:
        values:
          - AccessTokens
          - CustomDomains
          - DeployKeys
          - Deployments
          - EnvironmentVariables
          - Projects
          - Teams
  convex-mgmt-operation-id-camelcase:
    description: Every operation must define an operationId in camelCase or snake_case
    severity: warn
    given: "$.paths.*[get,put,post,delete,patch].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-zA-Z][a-zA-Z0-9_]+$"
  convex-mgmt-paths-prefix:
    description: Management API paths must live under /teams, /projects, /deployments, or /token
    severity: warn
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/(teams|projects|deployments|token|list_personal_access_tokens|create_personal_access_token|delete_personal_access_token)"

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.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/convex-management-api-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.