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

# Create Company

> Creates a new company using an ATS API key. Direct client keys cannot create companies via this endpoint.

Creates a new company. This endpoint is **only available for ATS integration keys** and is used for multi-tenant ATS platforms managing multiple client companies.

## Overview

The create company endpoint allows ATS integration keys to create new companies in the InstaView system. This is essential for multi-tenant ATS platforms that need to onboard new clients and manage their data in isolation.

## ATS Key Requirement

<Warning>
  **ATS Keys Only**: This endpoint requires an ATS integration key. Regular API keys cannot create companies and will receive a `403 Forbidden` error. ATS keys must be created by InstaView administrators.
</Warning>

## Use Cases

* **Client Onboarding**: Create companies for new ATS clients
* **Multi-Tenant Management**: Set up company isolation for ATS platforms
* **White-Label Solutions**: Create companies for white-label integrations
* **Platform Integration**: Onboard companies from external ATS systems

## Basic Company Creation

```javascript theme={null}
{
  "name": "Client Company Name",
  "website": "https://clientcompany.com",
  "industry": "Technology"
}
```

## ATS Integration Workflow

```javascript theme={null}
// 1. Create company for new ATS client
const company = await createCompany({
  name: "Client Company",
  website: "https://client.com"
});

// 2. Create jobs for this company
await createJob(company.id, jobData);

// 3. Create candidates for the jobs
await createCandidate(company.id, candidateData);
```

## Company Isolation

Each company's data is completely isolated. Companies created by an ATS key can only be accessed by that ATS key (or by regular API keys belonging to that company).

## Related Resources

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

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

  <Card title="List Companies" icon="list" href="/api-reference/companies/list-companies">
    View all companies managed by your ATS key
  </Card>
</CardGroup>


## OpenAPI

````yaml POST /company
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:
    post:
      tags:
        - Companies
      summary: Create company (ATS keys only)
      description: >-
        Creates a new company using an ATS API key. Direct client keys cannot
        create companies via this endpoint.
      operationId: PublicCompanyController_createCompany_v1
      parameters:
        - 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/PublicCreateCompanyDto'
      responses:
        '201':
          description: Company created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCompanyDto'
      security:
        - bearer: []
components:
  schemas:
    PublicCreateCompanyDto:
      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 for extensibility (max 10KB, 5 levels deep, 50 keys)
          example:
            externalCompanyId: COMP-12345
            industry: Technology
            companySize: 50-200
            atsSystemId: ATS-ORG-789
        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
      required:
        - name
    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

````