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

# List Namespaces

> List all namespaces in an environment.

<RequestExample>
  ```bash cURL theme={null}
  curl --url http://localhost:8080/api/v2/environments/{environmentKey}/namespaces \
    --header 'Accept: application/json'
  ```
</RequestExample>


## OpenAPI

````yaml https://raw.githubusercontent.com/flipt-io/flipt/refs/heads/v2/rpc/v2/environments/openapi.yaml GET /api/v2/environments/{environmentKey}/namespaces
openapi: 3.0.3
info:
  title: Management API
  description: Flipt Management REST API
  version: 2.9.0
servers: []
security: []
tags:
  - name: EnvironmentsService
paths:
  /api/v2/environments/{environmentKey}/namespaces:
    get:
      tags:
        - EnvironmentsService
      description: List all namespaces within a given environment.
      operationId: listNamespaces
      parameters:
        - name: environmentKey
          in: path
          description: the environment identifier, e.g. 'production'.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListNamespacesResponse'
components:
  schemas:
    ListNamespacesResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Namespace'
          description: The list of namespaces.
        revision:
          type: string
          description: The resource revision for optimistic concurrency.
      description: The response message for listing namespaces.
    Namespace:
      type: object
      properties:
        key:
          type: string
          description: The namespace key.
        name:
          type: string
          description: The namespace name.
        description:
          type: string
          description: The namespace description.
        protected:
          type: boolean
          description: The namespace protection status.
      description: Namespace represents a grouping of related flags and segments.

````

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