API Naming Conventions: The Complete Cheat Sheet for REST & OpenAPI (2026)

Master standard naming conventions for URIs, path parameters, JSON keys, query filters, and HTTP headers across REST APIs and OpenAPI specs.

Consistency in naming conventions separates professional enterprise APIs from ad-hoc internal endpoints. Adopting predictable casing rules across URIs, parameters, and payload keys simplifies SDK generation and client integration.

1. Standard Casing Rules Summary

API TargetRecommended CasingCorrect ExampleIncorrect Example
URI Pathslower-kebab-case/v1/user-profiles/v1/userProfiles or /v1/user_profiles
Path ParameterscamelCase or lower-kebab-case/v1/users/{userId}/v1/users/{user_id}
Query ParameterscamelCase?startingAfter=usr_100?starting_after=usr_100
JSON KeyscamelCase{"firstName": "Jane"}{"first_name": "Jane"}
HTTP HeadersTrain-Case (Hyphenated)X-Request-IDx_request_id or requestid

Canonical Casing Standards across API Surface

2. Resource Path Rules

  • Use Plural Nouns: Represent resource collections with plural nouns (e.g. /v1/orders, /v1/products).
  • Avoid Verbs in Path: Use HTTP methods (POST, DELETE) to express actions instead of /v1/createOrder.
  • Nested Resources: Limit nested hierarchy depth to 2 levels (e.g. /v1/users/{userId}/orders). If deeper relations are needed, make sub-resources top-level with query filters.

Check API Naming Quality Automatically

Scan your specification with APIForge to catch mixed casing, path verbs, and deeply nested URIs instantly.

Check Naming Score โ†’

Ready to score and validate your API?

Paste any OpenAPI specification URL or YAML file into APIForge for instant 0-100 quality scoring, schema linting, and zero-CORS proxy testing.

Try APIForge Workbench โ†’
Share:๐• Postin Share

Frequently Asked Questions

Why shouldn't I use verbs in REST API path URLs?
HTTP verbs (GET, POST, PUT, DELETE, PATCH) already specify the operation. Adding verbs to paths creates redundant URIs like POST /create-user instead of clean RESTful URIs like POST /users.

Related Resources