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

# Create workspace

> Creates a new workspace with the given name and thumbnail.



## OpenAPI

````yaml post /workspaces
openapi: 3.0.0
info:
  title: Mudstack API
  version: 2.41.0
servers:
  - url: https://api.mudstack.com
security: []
tags: []
paths:
  /workspaces:
    post:
      tags:
        - Workspace
      description: Creates a new workspace with the given name and thumbnail.
      parameters:
        - $ref: '#/components/parameters/account_id'
        - $ref: '#/components/parameters/workspace_id'
        - in: query
          name: name
          schema:
            type: string
          required: true
          description: The name of the workspace
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                body:
                  type: object
      responses:
        '200':
          description: Successfully created workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
      security:
        - Authentication: []
components:
  parameters:
    account_id:
      name: x-account-id
      in: header
      required: true
      schema:
        type: string
        format: uuid
    workspace_id:
      name: x-workspace-id
      in: header
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the workspace.
        account_id:
          type: string
          format: uuid
          description: Unique identifier for the account associated with the workspace.
        name:
          type: string
          description: Name of the workspace.
        thumbnail_file_id:
          type: string
          format: uuid
          description: >-
            Unique identifier for the thumbnail file associated with the
            workspace.
        defaultAvatar:
          type: integer
          description: Default avatar for the workspace.
          minimum: 1
          maximum: 10
          default: 1
        created_by_user_id:
          type: string
          format: uuid
          description: Unique identifier for the user who created the workspace.
        sequence:
          type: string
          format: bigint
          description: Sequence number for the workspace.
        roles:
          $ref: '#/components/schemas/WorkspaceMember'
          description: Roles associated with the workspace.
        usage:
          type: object
          description: Usage information for the workspace.
    WorkspaceMember:
      type: object
      required:
        - workspace_id
        - user_id
        - roles
      properties:
        workspace_id:
          type: string
          description: The ID of the workspace.
        user_id:
          type: string
          description: The ID of the user.
        roles:
          type: array
          items:
            type: string
          description: The roles assigned to the user in the workspace.
        user:
          $ref: '#/components/schemas/User'
          description: The user details.
    User:
      type: object
      description: User model
      properties:
        id:
          type: string
          description: Unique identifier for the user
        auth0UserID:
          type: string
          description: Auth0 user ID
        username:
          type: string
          description: Username of the user
        email:
          type: string
          description: Email address of the user
        firstName:
          type: string
          description: First name of the user
        lastName:
          type: string
          description: Last name of the user
        avatar_file_id:
          type: string
          description: File ID of the user's avatar
        defaultAvatar:
          type: number
          description: Default avatar identifier
        industry:
          type: string
          description: Industry the user works in
        occupation:
          type: string
          description: Occupation of the user
        company:
          type: string
          description: Company the user works for
        emailVerified:
          type: boolean
          description: Whether the user's email is verified
        isActive:
          type: boolean
          description: Whether the user is active
        city:
          type: string
          description: City where the user resides
        state:
          type: string
          description: State where the user resides
        country:
          type: string
          description: Country where the user resides
        zipCode:
          type: string
          description: Zip code of the user's location
        invited_by_user:
          $ref: '#/components/schemas/User'
          description: User who invited this user
  securitySchemes:
    Authentication:
      type: http
      scheme: bearer
      bearerFormat: JWT

````