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

# Create Workspace

> Create a new shared workspace owned by the current user.

Provisions the workspace row (baseline governance policies are seeded by
the creation hook in ``get_workspace_service``) and grants the creator
membership in the relationship graph so the workspace immediately shows up
in their accessible list and the switcher.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workspaces
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/workspaces:
    post:
      tags:
        - v1
        - protected
        - workspaces
      summary: Create Workspace
      description: >-
        Create a new shared workspace owned by the current user.


        Provisions the workspace row (baseline governance policies are seeded by

        the creation hook in ``get_workspace_service``) and grants the creator

        membership in the relationship graph so the workspace immediately shows
        up

        in their accessible list and the switcher.
      operationId: create_workspace_v1_workspaces_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateWorkspaceBody:
      properties:
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
      required:
        - name
      title: CreateWorkspaceBody
      type: object
    WorkspaceResponse:
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        slug:
          title: Slug
          type: string
        type:
          title: Type
          type: string
      required:
        - id
        - slug
        - name
        - type
      title: WorkspaceResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````