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

# Create namespace

> Creates a new empty namespace



## OpenAPI

````yaml /api_v1.json post /api/v1/local/namespace
openapi: 3.1.0
info:
  title: Coral Server API
  version: '1.0'
servers: []
security: []
tags: []
externalDocs:
  url: /
paths:
  /api/v1/local/namespace:
    post:
      tags:
        - local
      summary: Create namespace
      description: Creates a new empty namespace
      operationId: createNamespace
      parameters: []
      requestBody:
        description: Namespace settings
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionNamespaceRequest'
        required: false
      responses:
        '200':
          description: Success
          headers: {}
        '400':
          description: Invalid namespace settings providewd
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
        '403':
          description: Invalid application ID or privacy key
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
      deprecated: false
      security:
        - token: []
components:
  schemas:
    SessionNamespaceRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of this namespace
          title: String
        deleteOnLastSessionExit:
          type: boolean
          description: |2-

                    If this is true the namespace will be deleted when the last session in this namespace closes.  Note that this
                    does not guarantee that the namespace will never be empty, because namespaces can be created without sessions
                
          title: Boolean
        annotations:
          type: object
          additionalProperties:
            type: string
            title: String
          title: LinkedHashMap<String,String>
      required:
        - annotations
        - deleteOnLastSessionExit
        - name
      title: SessionNamespaceRequest
    RouteException:
      type: object
      properties:
        message:
          type: string
          title: String
      required:
        - message
      title: RouteException
  securitySchemes:
    token:
      type: http
      scheme: bearer
      bearerFormat: Configured token

````