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

# Delete Company

> Permanently deletes a company. This action is irreversible. ATS keys can delete companies they created; direct client keys can delete their own company.

Permanently deletes a specific company by ID. Access rules differ between regular API keys and ATS integration keys.

## Overview

The delete company endpoint permanently removes a company and all its associated resources (jobs, candidates, interviews, etc.). This action is irreversible.

## Access Rules

### Regular API Keys

Regular API keys can only delete their associated company:

```javascript theme={null}
// ✅ Can delete own company
DELETE /company/{own-company-id}

// ❌ Cannot delete other companies
DELETE /company/{other-company-id}
// Returns: 403 Forbidden
```

### ATS Integration Keys

ATS keys can delete any company they've created:

```javascript theme={null}
// ✅ Can delete companies created by this ATS key
DELETE /company/{ats-managed-company-id}

// ❌ Cannot delete companies not managed by this ATS key
DELETE /company/{unmanaged-company-id}
// Returns: 403 Forbidden
```

## Related Resources

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

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


## OpenAPI

````yaml DELETE /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}:
    delete:
      tags:
        - Companies
      summary: Permanently delete company
      description: >-
        Permanently deletes a company. This action is irreversible. ATS keys can
        delete companies they created; direct client keys can delete their own
        company.
      operationId: PublicCompanyController_deleteCompany_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Company permanently deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicBooleanResponseDto'
      security:
        - bearer: []
components:
  schemas:
    PublicBooleanResponseDto:
      type: object
      properties:
        statusCode:
          type: integer
          example: 200
        message:
          type: string
          example: Success
        data:
          type: boolean
        traceId:
          type: string
          nullable: true
      required:
        - statusCode
        - message
        - data
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key for authentication using Bearer scheme

````