> ## Documentation Index
> Fetch the complete documentation index at: https://docs-neevlegal.neeved.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List all states with state codes

> Returns every state and union territory with its corresponding state code. Use state codes as path parameters in other court structure endpoints.



## OpenAPI

````yaml get /court-structure/states
openapi: 3.0.3
info:
  title: NeevLegal API
  description: >-
    The NeevLegal REST API provides structured, programmatic access to Indian
    court case data. Search cases, retrieve full case records by CNR number, and
    explore the court directory across district courts, high courts, and the
    Supreme Court of India.
  version: 1.0.0
servers:
  - url: https://api-neevlegal.neeved.com/api/v1
    description: Version 1
security: []
tags:
  - name: Case Detail
    description: Retrieve the complete case record for one or more CNR numbers.
  - name: Case Search
    description: >-
      Search across district courts, high courts, and the Supreme Court by party
      name, advocate, judge, FIR number, or other criteria.
  - name: Court Structure
    description: >-
      Browse the Indian court directory — states, districts, court complexes,
      and individual courts.
paths:
  /court-structure/states:
    get:
      tags:
        - Court Structure
      summary: List all states with state codes
      description: >-
        Returns every state and union territory with its corresponding state
        code. Use state codes as path parameters in other court structure
        endpoints.
      responses:
        '200':
          description: States list
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  response:
                    type: object
                    properties:
                      total:
                        type: number
                        description: Total number of states and union territories.
                        example: 28
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            stateName:
                              type: string
                              description: Full state or union territory name.
                              example: Maharashtra
                            stateCode:
                              type: string
                              description: >-
                                Two-letter state code used in court structure
                                path parameters.
                              example: MH
                          required:
                            - stateName
                            - stateCode
                    required:
                      - total
                      - data
                required:
                  - success
                  - response
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Standard error envelope returned on all non-2xx responses.
      properties:
        success:
          type: boolean
          description: Always false for error responses.
          example: false
        message:
          type: string
          description: Human-readable description of what went wrong.
          example: API key not found or has been revoked.
        moreInfo:
          type: string
          description: Additional context when available.
          example: No additional info found.
      required:
        - success
        - message
        - moreInfo
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.