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

# Create Workspace

> Create a new workspace account. Workspaces can optionally be linked to an organization.



## OpenAPI

````yaml api-reference/openapi/accounts.json POST /api/workspaces
openapi: 3.1.0
info:
  title: Recoup API - Accounts
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/workspaces:
    post:
      description: >-
        Create a new workspace account. Workspaces can optionally be linked to
        an organization.
      requestBody:
        description: Workspace creation parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceRequest'
      responses:
        '201':
          description: Workspace created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWorkspaceResponse'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - access denied to organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateWorkspaceRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the workspace (defaults to "Untitled")
        account_id:
          type: string
          format: uuid
          description: >-
            UUID of the account to create the workspace for. Only applicable
            when the authenticated account has access to multiple accounts via
            organization membership. If not provided, the workspace is created
            for the API key's own account.
        organization_id:
          type: string
          format: uuid
          description: Organization to link the workspace to
    CreateWorkspaceResponse:
      type: object
      required:
        - workspace
      properties:
        workspace:
          type: object
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            account_id:
              type: string
              format: uuid
            isWorkspace:
              type: boolean
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string

````