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

# Create Workspace

> Create a new workspace record



## OpenAPI

````yaml POST /v1/workspaces
openapi: 3.1.0
info:
  title: Well Document API
  version: 1.0.0
  description: API for uploading and managing financial documents in the Well platform
servers:
  - url: https://api.wellapp.ai
security: []
paths:
  /v1/workspaces:
    post:
      summary: Create workspace
      description: Create a new workspace record
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        required: true
        content:
          application/json:
            example:
              type: workspace
              attributes:
                name: Marketing Team Workspace
                description: >-
                  Collaborative workspace for the marketing team to manage
                  campaigns and content
                avatar_color: '#FF5733'
                external_workspace_id: mkt-workspace-001
                auto_extract_enabled: false
              relationships:
                owner:
                  data:
                    type: people
                    id: temp-id1
              included:
                owner:
                  data:
                    type: people
                    id: temp-id1
                    attributes:
                      first_name: Sophie
                      last_name: Martin
            schema:
              $ref: '#/components/schemas/WorkspaceRequest'
      responses:
        '201':
          description: Workspace created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    WorkspaceRequest:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: workspace
            attributes:
              $ref: '#/components/schemas/WorkspaceCreateAttributes'
            relationships:
              $ref: '#/components/schemas/WorkspaceRelationshipsRequest'
            included:
              $ref: '#/components/schemas/WorkspaceIncludedRequest'
          required:
            - type
            - attributes
      required:
        - data
    WorkspaceResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: workspace
            id:
              type: string
              format: uuid
            attributes:
              $ref: '#/components/schemas/WorkspaceAttributes'
            relationships:
              $ref: '#/components/schemas/WorkspaceRelationshipsResponse'
            included:
              $ref: '#/components/schemas/WorkspaceIncludedipsResponse'
    BadRequestError:
      type: object
      properties:
        code:
          type: string
          example: SCHEMA_VALIDATION_ERROR
          description: Error code identifier
        status:
          type: integer
          example: 400
          description: HTTP status code
        title:
          type: string
          example: Validation Error
          description: Error title
        message:
          type: string
          example: The request is invalid
          description: Detailed error message
        details:
          type: array
          items:
            type: object
            properties:
              instancePath:
                type: string
                description: Path to the invalid field in the request
              schemaPath:
                type: string
                description: Path to the validation rule in the schema
              keyword:
                type: string
                description: Validation keyword that failed
              params:
                type: object
                description: Parameters related to the validation failure
              message:
                type: string
                description: Human-readable validation error message
          description: Array of detailed validation errors
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    UnauthorizedError:
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
          description: Error code identifier
        status:
          type: integer
          example: 401
          description: HTTP status code
        title:
          type: string
          example: Unauthorized
          description: Error title
        message:
          type: string
          example: You are not authorized to access this resource
          description: Detailed error message
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    WorkspaceCreateAttributes:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Workspace name
        description:
          type: string
          maxLength: 1000
          description: Workspace description
        avatar_color:
          type: string
          pattern: ^#[A-Fa-f0-9]{6}$
          description: 'Avatar color in hexadecimal format (e.g., #FF5733)'
        external_workspace_id:
          type: string
          minLength: 1
          maxLength: 255
          description: External workspace identifier
      required:
        - name
    WorkspaceRelationshipsRequest:
      type: object
      properties:
        owner:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: people
                id:
                  type: string
                  format: uuid
                  description: >-
                    UUID of an existing people or temp-id that references a
                    people defined in the included array
              required:
                - type
                - id
    WorkspaceIncludedRequest:
      type: object
      properties:
        owner:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: people
                id:
                  type: string
                  format: uuid
                  description: Temp-id that references a people in the relationships
                attributes:
                  $ref: '#/components/schemas/PeopleCreateAttributes'
              required:
                - type
                - id
    WorkspaceAttributes:
      type: object
      properties:
        name:
          type: string
          description: Workspace name
        desription:
          type: string
          description: Workspace description
        external_workspace_id:
          type: string
          format: uuid
          description: external workspace id
        avatar_color:
          type: string
          format: colors
          description: Color of the avatar
        created_at:
          type: string
          format: date-time
          description: Timestamp when the workspace was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the workspace was last updated
    WorkspaceRelationshipsResponse:
      type: object
      properties:
        owner:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                id:
                  type: string
    WorkspaceIncludedipsResponse:
      type: array
      items:
        type: object
        properties:
          type:
            type: string
            const: people
            examples:
              - peoplex
          id:
            type: string
            example: temp-people1
          attributes:
            type: object
            properties:
              first_name:
                type: string
                example: John
              last_name:
                type: string
                example: Doe
              full_name:
                type: string
                example: John Doe
              created_at:
                type: string
                format: timestamp
              updated_at:
                type: string
                format: timestamp
    PeopleCreateAttributes:
      type: object
      properties:
        first_name:
          type: string
          minLength: 1
          maxLength: 50
          description: First name of the person
          example: John
        last_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Last name of the person (required)
          example: Doe
      required:
        - first_name
        - last_name
      additionalProperties: false

````