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

# Create Workspace

> Establishes a new isolated security workspace for organizing and managing assets, targets, and vulnerabilities within a dedicated environment.



## OpenAPI

````yaml /api-reference/openapi.json post /api/workspaces
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/workspaces:
    post:
      tags:
        - Workspaces
      summary: Create Workspace
      description: >-
        Establishes a new isolated security workspace for organizing and
        managing assets, targets, and vulnerabilities within a dedicated
        environment.
      operationId: WorkspacesController_createWorkspace
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    CreateWorkspaceDto:
      type: object
      properties:
        name:
          type: string
          example: My Workspace
          description: The name of the workspace
        description:
          type: string
          example: This is my workspace
          description: The description of the workspace
        archivedAt:
          type: object
      required:
        - name
        - description
    Workspace:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        name:
          type: string
          example: My Workspace
          description: The name of the workspace
        description:
          type: string
          example: This is my workspace
          description: The description of the workspace
        archivedAt:
          type: object
        isAssetsDiscovery:
          type: boolean
          example: true
          default: true
          title: Asset discovery
          description: >-
            Automatically scan and detect internet-facing assets (domains, IPs)
            in workspace networks
        isAutoEnableAssetAfterDiscovered:
          type: boolean
          example: true
          default: true
          title: Auto enable assets
          description: >-
            Newly discovered assets become active immediately without manual
            review
        dek:
          type: object
          description: >-
            Encrypted Data Encryption Key (DEK) for this workspace. Encrypted
            with system KEK. Null for workspaces created before envelope
            encryption.
          nullable: true
        dekAt:
          type: object
          description: Timestamp when DEK was generated
          nullable: true
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - description
        - isAssetsDiscovery
        - isAutoEnableAssetAfterDiscovered

````