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

# Create Workspace



## OpenAPI

````yaml post /api/v1/workspaces
openapi: 3.1.0
info:
  title: AskUI Workspaces API
  version: 0.2.15
servers: []
security: []
paths:
  /api/v1/workspaces:
    post:
      tags:
        - workspaces
      summary: Create Workspace
      operationId: create_workspace_api_v1_workspaces_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceRequestDto'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWorkspaceResponseDto'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
        - Basic: []
components:
  schemas:
    CreateWorkspaceRequestDto:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          title: Name
        firstMemberId:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstmemberid
        billingAccountEmail:
          type: string
          format: email
          title: Billingaccountemail
      type: object
      required:
        - name
        - billingAccountEmail
      title: CreateWorkspaceRequestDto
    CreateWorkspaceResponseDto:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        name:
          type: string
          title: Name
        memberships:
          items:
            $ref: >-
              #/components/schemas/workspaces__entrypoints__http__routers__workspaces__main__CreateWorkspaceResponseDto__WorkspaceMembershipDto
          type: array
          title: Memberships
      type: object
      required:
        - name
        - memberships
      title: CreateWorkspaceResponseDto
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    workspaces__entrypoints__http__routers__workspaces__main__CreateWorkspaceResponseDto__WorkspaceMembershipDto:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        userId:
          type: string
          title: Userid
        workspaceId:
          type: string
          format: uuid4
          title: Workspaceid
        privileges:
          items:
            $ref: '#/components/schemas/WorkspacePrivilege'
          type: array
          title: Privileges
        accessTokens:
          items:
            $ref: '#/components/schemas/WorkspaceAccessToken'
          type: array
          title: Accesstokens
          default: []
      type: object
      required:
        - userId
        - workspaceId
        - privileges
      title: WorkspaceMembershipDto
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkspacePrivilege:
      type: string
      enum:
        - ROLE_WORKSPACE_OWNER
        - ROLE_WORKSPACE_ADMIN
        - ROLE_WORKSPACE_MEMBER
      title: WorkspacePrivilege
    WorkspaceAccessToken:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        name:
          type: string
          title: Name
        hash:
          type: string
          title: Hash
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - name
        - hash
        - expires_at
      title: WorkspaceAccessToken
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
    Basic:
      type: apiKey
      in: header
      name: Authorization

````