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

# Link Companies to Person

> Link existing companies to a person



## OpenAPI

````yaml POST /v1/people/{peopleId}/relationships/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/people/{peopleId}/relationships/companies:
    post:
      summary: Link companies to a person
      description: Link existing companies to a person
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - name: peopleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the person to link companies to
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PeopleRelationshipsCompaniesRequest'
      responses:
        '200':
          description: Companies successfully linked to person
          content:
            application/json:
              example:
                data:
                  - type: company
                    id: 8a4db4c2-bb41-4099-8240-4f2b0faf2c6e
                included:
                  - type: company
                    id: 8a4db4c2-bb41-4099-8240-4f2b0faf2c6e
                    attributes:
                      name: TechCorp Solutions
                      description: An innovative technology company focused on AI solutions
                      created_at: '2025-08-04T07:39:06.956Z'
                      updated_at: null
              schema:
                $ref: '#/components/schemas/PeopleRelationshipsCompaniesResponse'
        '400':
          description: Bad request - invalid data or invalid company IDs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          $ref: '#/components/responses/PersonNotFound'
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    PeopleRelationshipsCompaniesRequest:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                const: company
              id:
                type: string
                format: uuid
                description: UUID of the existing company to link
              meta:
                type: object
                properties:
                  relationship_type:
                    type: string
                    enum:
                      - contact
                      - employee
                      - owner
                      - other
                    description: Type of relationship with the company
            required:
              - type
              - id
      required:
        - data
    PeopleRelationshipsCompaniesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                example: company
              id:
                type: string
                format: uuid
        included:
          $ref: '#/components/schemas/PeopleRelationshipsCompaniesIncluded'
    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
    PeopleRelationshipsCompaniesIncluded:
      type: array
      items:
        type: object
        properties:
          type:
            type: string
            example: company
          id:
            type: string
            format: uuid
          attributes:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              created_at:
                type: string
                format: date-time
              updated_at:
                type: string
                format: date-time
  responses:
    PersonNotFound:
      description: Person not found
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: PERSON_NOT_FOUND
                description: Error code identifier
              status:
                type: integer
                example: 404
                description: HTTP status code
              title:
                type: string
                example: Person Not Found
                description: Error title
              message:
                type: string
                example: The requested person could not be found
                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

````