> ## 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 Company

> Create a new company record with comprehensive business information, registration details, tax information, and various relationships including people, workspaces, and other entities.



## OpenAPI

````yaml POST /v1/companies
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/companies:
    post:
      tags:
        - Companies
      summary: Create a new company
      description: >-
        Create a new company record with comprehensive business information,
        registration details, tax information, and various relationships
        including people, workspaces, and other entities.
      operationId: createCompany
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyPost'
            example:
              type: company
              attributes:
                description: Enterprise open source solutions company.
                locale: en
                domain_name_primary_link_url: acme.com
                tax_id:
                  value: DE123456789
                  type: VAT
                registration:
                  trade_name: TechSol
                  registered_name: Tech Solutions GmbH
                registration_number:
                  business_type: GmbH
                  value: HRB 123456
                  registry_name: Handelsregister Berlin
                  registry_country: DE
              relationships:
                created_by:
                  data:
                    type: people
                    id: people1
                media:
                  data:
                    - type: media
                      id: media1
                web_links:
                  data:
                    - type: web_link
                      id: sl1
                emails:
                  data:
                    - type: email
                      id: email1
                phones:
                  data:
                    - type: phone
                      id: phone1
                locations:
                  data:
                    - type: location
                      id: loc1
                people:
                  data:
                    - type: people
                      id: people1
                      meta:
                        relationship_type: owner
                parents:
                  data:
                    type: company
                    id: parent_company1
                subsidiaries:
                  data:
                    - type: company
                      id: subsidiary1
                workspaces:
                  data:
                    - type: workspace
                      id: workspace_tenant
              included:
                - type: people
                  id: people1
                  attributes:
                    first_name: John
                    last_name: Doe
                    full_name: John Doe
                - type: media
                  id: media1
                  attributes:
                    file_name: company_logo.png
                    media_type: logo
                    is_primary: true
                - type: web_link
                  id: sl1
                  attributes:
                    url: https://www.linkedin.com/company/acme
                    platform: linkedin
                - type: email
                  id: email1
                  attributes:
                    value: contact@acme.com
                    label: work
                    is_primary: true
                - type: phone
                  id: phone1
                  attributes:
                    e164_number: '+33123456789'
                    label: work
                    is_primary: true
                - type: location
                  id: loc1
                  attributes:
                    street: 123 Tech Street
                    city: Berlin
                    postal_code: '10115'
                    country: DE
                    is_primary: true
                - type: workspace
                  id: workspace_tenant
                  attributes:
                    name: Main Workspace
                    description: Primary workspace for ACME operations
                - type: company
                  id: parent_company1
                  attributes:
                    name: ACME Global Holdings
                    description: Parent company of ACME
                    registration:
                      registered_name: ACME Global Holdings GmbH
                - type: company
                  id: subsidiary1
                  attributes:
                    name: ACME France
                    description: French subsidiary of ACME
                    registration:
                      registered_name: ACME France SAS
                - type: document
                  id: 550e8400-e29b-41d4-a716-446655440016
                  attributes:
                    name: company_registration.pdf
                    file_size: 245678
                    content_type: application/pdf
                    created_at: '2025-09-25T10:00:00.000Z'
      responses:
        '201':
          description: Company created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyPostResponse'
              example:
                data:
                  type: company
                  id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                  attributes:
                    description: Enterprise open source solutions company.
                    locale: en
                    domain_name_primary_link_url: acme.com
                    tax_id:
                      value: DE123456789
                      type: VAT
                    registration:
                      trade_name: TechSol
                      registered_name: Tech Solutions GmbH
                    registration_number:
                      business_type: GmbH
                      value: HRB 123456
                      registry_name: Handelsregister Berlin
                      registry_country: DE
                    created_at: '2025-09-30T14:30:00.000Z'
                    updated_at: '2025-09-30T14:30:00.000Z'
                  relationships:
                    created_by:
                      data:
                        type: people
                        id: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
                    media:
                      data:
                        - type: media
                          id: 550e8400-e29b-41d4-a716-446655440010
                    web_links:
                      data:
                        - type: web_link
                          id: 550e8400-e29b-41d4-a716-446655440011
                    emails:
                      data:
                        - type: email
                          id: 550e8400-e29b-41d4-a716-446655440012
                    phones:
                      data:
                        - type: phone
                          id: 550e8400-e29b-41d4-a716-446655440013
                    locations:
                      data:
                        - type: location
                          id: 550e8400-e29b-41d4-a716-446655440015
                    people:
                      data:
                        - type: people
                          id: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
                    documents:
                      data:
                        - type: document
                          id: 550e8400-e29b-41d4-a716-446655440016
                    parents:
                      data:
                        type: company
                        id: 550e8400-e29b-41d4-a716-446655440019
                    subsidiaries:
                      data:
                        - type: company
                          id: 550e8400-e29b-41d4-a716-446655440020
                    workspaces:
                      data:
                        - type: workspace
                          id: 550e8400-e29b-41d4-a716-446655440001
                included:
                  - type: people
                    id: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
                    attributes:
                      first_name: Alexandre
                      last_name: Dubois
                      full_name: Alexandre Dubois
                      relationship_type: owner
                  - type: workspace
                    id: 550e8400-e29b-41d4-a716-446655440001
                    attributes:
                      name: Development Team
                      description: >-
                        Main development workspace for software engineering
                        projects and client solutions
                      created_at: '2025-09-10T08:00:00.000Z'
                      updated_at: '2025-09-15T16:45:00.000Z'
                  - type: media
                    id: 550e8400-e29b-41d4-a716-446655440010
                    attributes:
                      file_name: company_logo.png
                      content_type: image/png
                      file_size: 15678
                  - type: web_link
                    id: 550e8400-e29b-41d4-a716-446655440011
                    attributes:
                      url: https://www.linkedin.com/company/acme
                      platform: linkedin
                  - type: email
                    id: 550e8400-e29b-41d4-a716-446655440012
                    attributes:
                      value: contact@acme.com
                      label: work
                      is_primary: true
                  - type: phone
                    id: 550e8400-e29b-41d4-a716-446655440013
                    attributes:
                      e164_number: '+4930123456789'
                      label: work
                      is_primary: true
                  - type: location
                    id: 550e8400-e29b-41d4-a716-446655440015
                    attributes:
                      street: Unter den Linden 1
                      city: Berlin
                      postal_code: '10117'
                      country: DE
                      is_primary: true
                  - type: document
                    id: 550e8400-e29b-41d4-a716-446655440016
                    attributes:
                      name: company_registration.pdf
                      file_size: 245678
                      content_type: application/pdf
                      created_at: '2025-09-25T10:00:00.000Z'
                  - type: company
                    id: 550e8400-e29b-41d4-a716-446655440019
                    attributes:
                      name: ACME Global Holdings
                      description: Parent company of ACME
                      registration:
                        registered_name: ACME Global Holdings GmbH
                  - type: company
                    id: 550e8400-e29b-41d4-a716-446655440020
                    attributes:
                      name: ACME France
                      description: French subsidiary of ACME
                      registration:
                        registered_name: ACME France SAS
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
              examples:
                missing_required_field:
                  summary: Missing required registered_name
                  value:
                    code: VALIDATION_ERROR
                    status: 400
                    title: Validation Error
                    message: The registration.registered_name field is required
                    meta:
                      log_id: 550e8400-e29b-41d4-a716-446655440999
                      errors:
                        - field: registration.registered_name
                          code: REQUIRED
                          message: This field is required
                invalid_tax_id_format:
                  summary: Invalid tax ID format
                  value:
                    code: VALIDATION_ERROR
                    status: 400
                    title: Validation Error
                    message: Invalid tax ID format for the specified type
                    meta:
                      log_id: 550e8400-e29b-41d4-a716-446655440998
                      errors:
                        - field: tax_id.value
                          code: INVALID_FORMAT
                          message: >-
                            VAT number format is invalid for the specified
                            country
        '401':
          description: Unauthorized - invalid API key
          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:
    CompanyPost:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: company
            attributes:
              $ref: '#/components/schemas/CompanyCreateAttributes'
            relationships:
              $ref: '#/components/schemas/CompanyRelationshipsPost'
            included:
              $ref: '#/components/schemas/CompanyIncludedPost'
          required:
            - type
            - attributes
      required:
        - data
        - included
      example:
        data:
          type: company
          attributes:
            name: TechCorp AI Solutions
            description: An innovative technology company focused on AI solutions
          relationships:
            workspace:
              data:
                type: workspace
                id: temp-workspace-1
            people:
              data:
                - type: people
                  id: temp-owner-1
                  meta:
                    relationship_type: owner
                - type: people
                  id: temp-employee-1
                  meta:
                    relationship_type: employee
        included:
          - type: workspace
            id: temp-workspace-1
            attributes:
              workspace_id: 632860b5-48b7-49eb-9dd1-8bddc634f387
          - type: people
            id: temp-owner-1
            attributes:
              first_name: John
              last_name: Doe
          - type: people
            id: temp-employee-1
            attributes:
              first_name: Sarah
              last_name: Martin
    CompanyPostResponse:
      type: object
      properties:
        type:
          type: string
          const: company
        id:
          type: string
          format: uuid
          description: UUID of the created company
          example: 550e8400-e29b-41d4-a716-446655440000
        attributes:
          $ref: '#/components/schemas/CompanyAttributes'
        relationships:
          $ref: '#/components/schemas/CompanyRelationshipsPostResponse'
        included:
          $ref: '#/components/schemas/CompanyIncludedResponse'
    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
    CompanyCreateAttributes:
      type: object
      properties:
        locale:
          type: string
          pattern: ^[a-z]{2}(-[A-Z]{2})?$
          description: >-
            Language settings.That’s the locale for the business relationship.
            Emails or documents can be used to identify the locale. Default EN.
          example: en-US
        domain_name_primary_link_url:
          type: string
          format: uri
          description: >-
            The domain url from the website or email address of the company.
            Used as unique identifier in some cases.
          example: https://www.techcorp.com
        tax_id:
          type: object
          properties:
            value:
              type: string
              description: Tax ID issued by local or national tax authority.
              example: DE123456789
            type:
              type: string
              description: >-
                Type of tax ID, useful for applying formatting and validation
                rules.[all tax id types](/enums/tax-id) See all available labels
                for complete list.
              example:
                - VAT
                - TVA
                - IVA
                - ...
        registration:
          oneOf:
            - type: object
              properties:
                trade_name:
                  type: string
                  description: >-
                    Commercial or branding name (if different from registered
                    name).
                  example: TechSol
                registered_name:
                  type: string
                  description: Legal company name
                  example: TechCorp AI Solutions LLC
              required:
                - registered_name
            - type: object
              properties:
                trade_name:
                  type: string
                  description: >-
                    Commercial or branding name (if different from registered
                    name).
                  example: TechSol
                registered_name:
                  type: string
                  description: Legal company name
                  example: TechCorp AI Solutions LLC
              required:
                - trade_name
        registration_number:
          type: object
          properties:
            business_type:
              type: string
              enum:
                - Inc
                - Corp
                - LLC
                - GmbH
                - Ltd
                - SA
                - SAS
              description: >-
                Legal entity structure type. See [all business entity
                types](/enums/business-entity-by-country) for complete list.
              example: GmbH
            value:
              type: string
              description: Official company registration number.
              example: HRB 123456
            registry_name:
              type: string
              description: >-
                Name of the official registration body. See [all available
                registry name](/enums/registry-name) for complete list.
              example: Handelsregister Berlin
            registry_country:
              type: string
              pattern: ^[A-Z]{2}$
              description: |-
                Country of the registry authority. 
                 Must be valid ISO country code
              example: DE, FR, US, etc.
        description:
          type: string
          minLength: 1
          maxLength: 500
          description: Company description explaining business purpose in max 2 sentences.
          example: An innovative technology company focused on AI solutions
      required:
        - registration
    CompanyRelationshipsPost:
      type: object
      description: >-
        Relationships define how the company connects to other resources. To
        link an existing object, just put its ID. To create a new object, add it
        to the 'included' section with a temporary ID that matches the
        relationship reference.
      properties:
        media:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    description: >-
                      UUID of an existing medias or temp-id that references a
                      medias defined in the included array
                    example: media1
                required:
                  - type
                  - id
          description: >-
            Media files associated with this company. Reference by type and id.
            Use the 'include' query parameter to get full attributes in the
            included array.
        web_links:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: web_link
                  id:
                    type: string
                    description: >-
                      UUID of an existing web-links or temp-id that references a
                      web-links defined in the included array
                    example: sl1
                required:
                  - type
                  - id
          description: >-
            Web links associated with this company. Reference by type and id.
            Use the 'include' query parameter to get full attributes in the
            included array.
        emails:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: email
                  id:
                    type: string
                    description: >-
                      UUID of an existing emails or temp-id that references a
                      emails defined in the included array
                    example: email1
                required:
                  - type
                  - id
          description: >-
            Email addresses associated with this company. Reference by type and
            id. Use the 'include' query parameter to get full attributes in the
            included array.
        phones:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: phone
                  id:
                    type: string
                    description: >-
                      UUID of an existing phones or temp-id that references a
                      phones defined in the included array
                    example: phone1
                required:
                  - type
                  - id
          description: >-
            Phone numbers associated with this company. Reference by type and
            id. Use the 'include' query parameter to get full attributes in the
            included array.
        locations:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: location
                  id:
                    type: string
                    description: >-
                      UUID of an existing locations or temp-id that references a
                      locations defined in the included array
                    example: loc1
                required:
                  - type
                  - id
          description: >-
            Locations/addresses associated with this company. Reference by type
            and id. Use the 'include' query parameter to get full attributes in
            the included array.
        people:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: people
                  id:
                    type: string
                    description: >-
                      UUID of an existing people or temp-id that references a
                      people defined in the included array
                    example: people1
                  meta:
                    type: object
                    properties:
                      relationship_type:
                        type: string
                        enum:
                          - contact
                          - employee
                          - owner
                          - ...
                        description: >-
                          Relationship type of the person in the company. See
                          [all company roles](/enums/company-roles) for complete
                          list.
                        example: owner
                required:
                  - type
                  - id
          description: >-
            People associated with this company. Reference by type and id. The
            meta.relationship_type field specifies the person's role. Use the
            'include' query parameter to get full attributes in the included
            array.
        parents:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: company
                id:
                  type: string
                  description: >-
                    UUID of an existing parents or temp-id that references a
                    parents defined in the included array
                  example: parent_company1
              required:
                - type
                - id
          description: >-
            Parent company of this company. Reference by type and id. Use the
            'include' query parameter to get full attributes in the included
            array.
        subsidiaries:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    description: >-
                      UUID of an existing subsidiaries or temp-id that
                      references a subsidiaries defined in the included array
                    example: subsidiary1
                required:
                  - type
                  - id
          description: >-
            Subsidiary companies of this company. Reference by type and id. Use
            the 'include' query parameter to get full attributes in the included
            array.
        workspaces:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    description: >-
                      UUID of an existing workapces or temp-id that references a
                      workspaces defined in the included array
                    example: workspace_tenant
                required:
                  - type
                  - id
          description: >-
            Workspaces associated with this company. Reference by type and id.
            Use the 'include' query parameter to get full attributes in the
            included array.
    CompanyIncludedPost:
      type: object
      description: >-
        Object containing included resources referenced in relationships,
        organized by resource type.
      properties:
        people:
          type: object
          description: People associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: people
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a person defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/PeopleCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        parents:
          type: object
          description: Parent company of this company
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: company
                id:
                  type: string
                  format: uuid
                  description: >-
                    temp-id that references a parents defined in the
                    relationship array
                attributes:
                  $ref: '#/components/schemas/CompanyCreateAttributes'
              required:
                - type
                - id
                - attributes
        subsidiaries:
          type: object
          description: Subsidiary companies of this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a subsdiaries defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/CompanyCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        workspaces:
          type: object
          description: Workspaces associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a workspace defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/WorkspaceCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        emails:
          type: object
          description: Email addresses associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: email
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a emails defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/EmailCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        phones:
          type: object
          description: Phone numbers associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: phone
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a phones defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/PhoneCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        locations:
          type: object
          description: Locations/addresses associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: location
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a location defined in the
                      relationship array
                  attributes:
                    $ref: '#/components/schemas/LocationCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        media:
          type: object
          description: Media files associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                    description: >-
                      temp-id that references a media defined in the
                      relationship array
                  attributes:
                    type: object
                    properties:
                      file:
                        type: string
                        format: binary
                        description: Image in png, jpg or svg format
                      type:
                        type: string
                        const: media
                        description: Resource type identifier
                      media_type:
                        type: string
                        enum:
                          - avatar
                          - logo
                          - banner
                        description: Type of media (avatar, logo, banner)
                      is_primary:
                        type: boolean
                        default: true
                        description: 'Marks preferred media. Default: true'
                    required:
                      - file
                      - type
                required:
                  - type
                  - id
                  - attributes
        web_links:
          type: object
          description: Web links associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: web_link
                  id:
                    type: string
                    format: uuid
                    description: >-
                      UUID of an existing web-links or temp-id that references a
                      web-links defined in the included array
                  attributes:
                    $ref: '#/components/schemas/WebLinkCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        documents:
          type: object
          description: Documents associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: document
                  id:
                    type: string
                    format: uuid
                    description: >-
                      UUID of an existing documents or temp-id that references a
                      documents defined in the included array
                  attributes:
                    $ref: '#/components/schemas/DocumentCreateAttributes'
                  required:
                    - type
                    - id
                    - attributes
    CompanyAttributes:
      type: object
      properties:
        description:
          type: string
        domain_name_primary_link_url:
          type: string
          format: url
          maxLength: 500
          description: >-
            The domain url from the website or email address of the company.
            Used as unique identifier in some cases.
          examples:
            - acme.com
        tax_id:
          type: object
          properties:
            value:
              description: Tax ID issued by local or national tax authority.
              type: string
              examples:
                - DE123456789
            type:
              description: >-
                Type of tax ID, useful for applying formatting and validation
                rules.
              type: string
              examples:
                - VAT
        registration:
          type: object
          properties:
            trade_name:
              description: Commercial or branding name (if different from registered name).
              type: string
              examples:
                - TechSol
            registered_name:
              description: Legal company name.
              type: string
              minLength: 1
              maxLength: 100
              examples:
                - Red Hat Inc.
        registration_number:
          type: object
          properties:
            business_type:
              description: Legal entity structure type.
              type: string
              examples:
                - GmbH
            value:
              description: Official company registration number.
              type: string
              examples:
                - HRB 123456
            registry_name:
              description: Name of the official registration body.
              type: string
              examples:
                - Handelsregister Berlin
            registry_country:
              description: Country of the registry authority. (string (ISO 3166-1 alpha-2))
              type: string
              examples:
                - DE
        workspace_id:
          type: string
          format: uuid
          description: UUID of the workspace associated with this company
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CompanyRelationshipsPostResponse:
      type: object
      properties:
        created_by:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: people
                id:
                  type: string
                  format: uuid
                  description: UUID of the person who created this company
                  example: 550e8400-e29b-41d4-a716-446655440001
        medias:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                    description: UUID of the media file
                    example: 550e8400-e29b-41d4-a716-446655440002
        web_links:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: web_link
                  id:
                    type: string
                    format: uuid
                    description: UUID of the web link
                    example: 550e8400-e29b-41d4-a716-446655440003
        emails:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: email
                  id:
                    type: string
                    format: uuid
                    description: UUID of the email
                    example: 550e8400-e29b-41d4-a716-446655440004
        phones:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: phone
                  id:
                    type: string
                    format: uuid
                    description: UUID of the phone
                    example: 550e8400-e29b-41d4-a716-446655440005
        locations:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: location
                  id:
                    type: string
                    format: uuid
                    description: UUID of the location
                    example: 550e8400-e29b-41d4-a716-446655440007
        people:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: people
                  id:
                    type: string
                    format: uuid
                    description: UUID of the person
                    example: 550e8400-e29b-41d4-a716-446655440008
                  meta:
                    type: object
                    properties:
                      relationship_type:
                        type: string
                        enum:
                          - contact
                          - employee
                          - owner
                          - other
                        description: Relationship type of the person in the company
                        example: employee
        documents:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: document
                  id:
                    type: string
                    format: uuid
                    description: UUID of the document
                    example: 550e8400-e29b-41d4-a716-446655440009
        parents:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    format: uuid
                    description: UUID of the parent company
                    example: 550e8400-e29b-41d4-a716-446655440012
        subsidiaries:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    format: uuid
                    description: UUID of the subsidiary company
                    example: 550e8400-e29b-41d4-a716-446655440013
        workspaces:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                    description: UUID of the workspace
                    example: 632860b5-48b7-49eb-9dd1-8bddc634f387
    CompanyIncludedResponse:
      type: object
      description: >-
        Object containing included resources referenced in relationships,
        organized by resource type. These are the actual created/linked
        resources with real UUIDs.
      properties:
        created_by:
          type: object
          description: Person who created this company
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: people
                id:
                  type: string
                  format: uuid
                  description: UUID of the person
                attributes:
                  $ref: '#/components/schemas/PeopleAttributes'
        people:
          type: object
          description: Person associated with the company
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: people
                id:
                  type: string
                  format: uuid
                  description: UUID of the person
                attributes:
                  $ref: '#/components/schemas/PeopleAttributes'
        parents:
          type: object
          description: Parent company of this company
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: company
                id:
                  type: string
                  format: uuid
                  description: UUID of the parent company
                attributes:
                  $ref: '#/components/schemas/CompanyAttributes'
        subsidiaries:
          type: object
          description: Subsidiary companies of this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: company
                  id:
                    type: string
                    format: uuid
                    description: UUID of the subsidiary company
                  attributes:
                    $ref: '#/components/schemas/CompanyAttributes'
        workspaces:
          type: object
          description: Workspaces associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                    description: UUID of the workspace
                  attributes:
                    $ref: '#/components/schemas/WorkspaceAttributes'
        emails:
          type: object
          description: Email addresses associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: email
                  id:
                    type: string
                    format: uuid
                    description: UUID of the email
                  attributes:
                    $ref: '#/components/schemas/EmailAttributes'
                required:
                  - type
                  - id
                  - attributes
        phones:
          type: object
          description: Phone numbers associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: phone
                  id:
                    type: string
                    format: uuid
                    description: UUID of the phone
                  attributes:
                    $ref: '#/components/schemas/PhoneAttributes'
        locations:
          type: object
          description: Locations/addresses associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: location
                  id:
                    type: string
                    format: uuid
                    description: UUID of the location
                  attributes:
                    $ref: '#/components/schemas/LocationAttributes'
        media:
          type: object
          description: Media files associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                    description: UUID of the media
                  attributes:
                    $ref: '#/components/schemas/MediaAttributes'
        web_links:
          type: object
          description: Web links associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: web_link
                  id:
                    type: string
                    format: uuid
                    description: UUID of the web link
                  attributes:
                    $ref: '#/components/schemas/WebLinkAttributes'
        documents:
          type: object
          description: Documents associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: document
                  id:
                    type: string
                    format: uuid
                    description: UUID of the document
                  attributes:
                    $ref: '#/components/schemas/DocumentAttributes'
    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
    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
    EmailCreateAttributes:
      type: object
      properties:
        value:
          type: string
          format: email
          description: Email address value
          example: sarah.wilson@techcorp.com
        is_primary:
          type: boolean
          default: true
          description: >-
            Whether this is the primary email address. Defaults to 'false',
            unless no other email is marked as primary (in which case it becomes
            'true'). Only one email can be marked as primary per person/company.
          example: true
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Email label type. See [all available labels](/enums/label) for
            complete list.
          default: work
          example: work
    PhoneCreateAttributes:
      type: object
      properties:
        number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: Phone number in E164 format
          example: '+14155552671'
        is_primary:
          type: boolean
          description: Whether this is the primary phone number
          default: true
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Phone label type. See [all available labels](/enums/label) for
            complete list.
          default: work
      required:
        - number
    LocationCreateAttributes:
      type: object
      properties:
        address_line1:
          type: string
          description: Primary address line
        address_line2:
          type: string
          description: Secondary address line (optional)
        city:
          type: string
          description: City name
        region:
          type: string
          description: State, province, or region
        postal_code:
          type: string
          description: Postal or ZIP code
        country:
          type: string
          description: Two-letter ISO country code (e.g., 'US', 'GB')
        latitude:
          type: number
          format: float
          description: Geographic latitude coordinate
        longitude:
          type: number
          format: float
          description: Geographic longitude coordinate
        is_primary:
          type: boolean
          description: Whether this is the primary location
          default: false
        is_registered:
          type: boolean
          description: Whether this is a registered business address
          default: false
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Email label type. See [all available labels](/enums/label) for
            complete list.
      required:
        - address_line1
        - country
    WebLinkCreateAttributes:
      type: object
      properties:
        platform:
          type: string
          enum:
            - website
            - linkedin
            - x
            - github
          description: Web platform type
        url:
          type: string
          minLength: 1
          maxLength: 500
          description: Full profile URL
      required:
        - url
    DocumentCreateAttributes:
      type: object
      properties:
        file_name:
          type: string
        status:
          type: string
        file_type:
          type: string
        size_bytes:
          type: integer
    PeopleAttributes:
      type: object
      properties:
        first_name:
          type: string
          description: The person's first name
        last_name:
          type: string
          description: The person's last name
        full_name:
          type: string
          description: The person's full name (typically first_name + last_name)
        created_at:
          type: string
          format: date-time
          description: Timestamp when the person was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the person was last updated
      additionalProperties: false
    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
    EmailAttributes:
      type: object
      properties:
        value:
          type: string
          format: email
          description: Email address value
          example: sarah.wilson@techcorp.com
        is_primary:
          type: boolean
          default: true
          description: >-
            Whether this is the primary email address. Defaults to 'false',
            unless no other email is marked as primary (in which case it becomes
            'true'). Only one email can be marked as primary per person/company.
          example: true
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Email label type. See [all available labels](/enums/label) for
            complete list.
          default: work
          example: work
        created_at:
          type: string
          format: date-time
          description: Timestamp when the email was created
          example: '2023-06-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the email was last updated
          example: '2023-06-15T10:30:00Z'
    PhoneAttributes:
      type: object
      properties:
        number:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: Full international phone number in E164 format
          example: '+14155552671'
        label:
          type: string
          enum:
            - work
            - personal
            - other
            - ...
          description: >-
            Phone label type. See [all available labels](/enums/label) for
            complete list.
        is_primary:
          type: boolean
          description: Whether this is the primary phone number
        created_at:
          type: string
          format: date-time
          description: Timestamp when the phone was created
    LocationAttributes:
      type: object
      properties:
        full_address:
          type: string
          description: Complete formatted address
        address_line1:
          type: string
          description: Primary address line
        address_line2:
          type: string
          description: Secondary address line
        city:
          type: string
          description: City name
        region:
          type: string
          description: State, province, or region
        postal_code:
          type: string
          description: Postal or ZIP code
        country:
          type: string
          description: Two-letter ISO country code
        latitude:
          type: number
          format: float
          description: Geographic latitude coordinate
        longitude:
          type: number
          format: float
          description: Geographic longitude coordinate
        is_primary:
          type: boolean
          description: Whether this is the primary location
        is_registered:
          type: boolean
          description: Whether this is a registered business address
        label:
          type: string
          description: Custom label for the location
        created_at:
          type: string
          format: date-time
          description: Date and time when the location was created
        updated_at:
          type: string
          format: date-time
          description: Date and time when the location was last updated
    MediaAttributes:
      type: object
      properties:
        media_type:
          type: string
          enum:
            - avatar
            - logo
            - banner
        url:
          type: string
          format: uri
          description: URL to the media file
        is_primary:
          type: boolean
          description: Whether this is the primary media
        processed_at:
          type:
            - string
          format: date-time
          description: Timestamp when media processing completed
        uploaded_at:
          type: string
          format: date-time
    WebLinkAttributes:
      type: object
      properties:
        platform:
          type: string
          enum:
            - website
            - linkedin
            - x
            - github
          description: Web platform type
        url:
          type: string
          description: Full profile URL
        created_at:
          type: string
          format: date-time
          description: Date and time when the web link was created
        updated_at:
          type: string
          format: date-time
          description: Date and time when the web link was updated
    DocumentAttributes:
      type: object
      properties:
        file_name:
          type: string
        status:
          type: string
        uploaded_at:
          type: string
          format: date-time
        processed_at:
          type: string
          format: date-time
        file_type:
          type: string
        size_bytes:
          type: integer

````