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

# Update Company

> Updates company details. ATS keys can update companies they created; direct client keys can update their own company.

Updates an existing company using partial updates. Access rules differ between regular API keys and ATS integration keys.

## Overview

The update company endpoint allows you to modify company information without recreating it. This supports partial updates, meaning you only need to provide the fields you want to change. Regular API keys can update their own company, while ATS keys can update companies they've created.

## Access Rules

### Regular API Keys

Regular API keys can only update their associated company:

```javascript theme={null}
// ✅ Can update own company
PATCH /company/{own-company-id}
{
  "name": "Updated Company Name"
}
```

### ATS Integration Keys

ATS keys can update any company they've created:

```javascript theme={null}
// ✅ Can update companies created by this ATS key
PATCH /company/{ats-managed-company-id}
{
  "name": "Updated Client Company Name"
}
```

## Use Cases

* **Company Profile Updates**: Update company name, website, or industry
* **Settings Management**: Modify company settings (timezone, locale)
* **Client Management**: Update client company information for ATS platforms

## Partial Updates

You can update any combination of fields:

```javascript theme={null}
// Update only name
PATCH /company/{id}
{
  "name": "New Company Name"
}

// Update multiple fields
PATCH /company/{id}
{
  "name": "Updated Name",
  "website": "https://newwebsite.com",
  "industry": "Technology"
}
```

## Error Scenarios

* **404 Not Found**: Company doesn't exist
* **403 Forbidden**: Company is not accessible or updatable with your API key type
* **400 Bad Request**: Invalid field values or validation errors

## Related Resources

<CardGroup cols={2}>
  <Card title="ATS Integration Guide" icon="plug" href="/guides/ats-integration">
    Learn about ATS integration keys
  </Card>

  <Card title="Companies Resource Guide" icon="building" href="/guides/resources/companies">
    Understand company management
  </Card>

  <Card title="Get Company" icon="eye" href="/api-reference/companies/get-company">
    Retrieve current company information
  </Card>
</CardGroup>


## OpenAPI

````yaml PATCH /company/{id}
openapi: 3.0.0
info:
  title: InstaView API
  description: |-
    InstaView API Documentation

    ## Authentication

    All endpoints require API key authentication using Bearer token:
    ```
    Authorization: Bearer sk_your_api_key_here
    ```

    ## API Key Management

    The API Key module provides comprehensive key management for:
    - **Direct Client Keys**: Company-scoped keys for your applications
    - **ATS Partner Keys**: Resource-scoped keys for ATS integrations

    ### Key Features
    - HMAC-SHA256 hashing for API key storage
    - Configurable rate limiting
    - Comprehensive audit logging
    - Company-level isolation
    - Resource scoping for ATS partners
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.instaview.sk
    description: Production API Gateway
security: []
tags: []
paths:
  /company/{id}:
    patch:
      tags:
        - Companies
      summary: Update company
      description: >-
        Updates company details. ATS keys can update companies they created;
        direct client keys can update their own company.
      operationId: PublicCompanyController_updateCompany_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: uuid
        - name: companyId
          required: false
          in: query
          description: >-
            Required for ATS API keys to specify which company to access.
            Ignored for standard company API keys.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicUpdateCompanyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCompanyDto'
      security:
        - bearer: []
components:
  schemas:
    PublicUpdateCompanyDto:
      type: object
      properties:
        name:
          type: string
          description: Company name
          example: Acme Corporation
          minLength: 2
          maxLength: 100
        description:
          type: string
          description: Company description
          example: Leading technology company specializing in enterprise software
          minLength: 1
          maxLength: 1000
        metadata:
          type: object
          description: >-
            Custom metadata (merged with existing metadata, max 10KB, 5 levels
            deep, 50 keys)
          example:
            industry: Technology
            size: 50-200
        ownerEmail:
          type: string
          format: email
          maxLength: 254
          description: >-
            Email of the company owner. If provided, the system will
            automatically assign or invite the user.
          example: owner@example.com
    PublicCompanyDto:
      type: object
      properties:
        id:
          type: string
          description: Company ID
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: Company name
          example: Acme Corporation
        description:
          type: string
          description: Company description
          example: Leading technology company
        ownerEmail:
          type: string
          format: email
          maxLength: 254
          description: Email of the company owner
          example: owner@example.com
        metadata:
          type: object
          description: Custom metadata
          example:
            externalCompanyId: COMP-12345
            industry: Technology
        createdAt:
          type: string
          description: Created timestamp
          example: '2024-11-16T10:30:00Z'
        updatedAt:
          type: string
          description: Updated timestamp
          example: '2024-11-16T10:30:00Z'
      required:
        - id
        - name
        - createdAt
        - updatedAt
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key for authentication using Bearer scheme

````