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

# Bulk create companies

> Create up to 100 companies in a single request. Each item behaves exactly like `POST /v1/company` (including per-item `mergeWithExisting`, `listId`, and custom/AI fields). Items are processed independently: the request succeeds with a per-item `results` array and a `summary`, so one invalid company does not roll back the rest.

Responses include direct Enginy app URLs when available. Each successful result includes an `appUrl` field for the company. MCP agents should return those URLs to users whenever they are present in the response.

    > **Required scope:** `COMPANIES_WRITE`
    >
    > **Rate limit:** 30 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json post /v1/companies/bulk
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/companies/bulk:
    post:
      tags:
        - Companies
      summary: Bulk create companies
      description: >-
        Create up to 100 companies in a single request. Each item behaves
        exactly like `POST /v1/company` (including per-item `mergeWithExisting`,
        `listId`, and custom/AI fields). Items are processed independently: the
        request succeeds with a per-item `results` array and a `summary`, so one
        invalid company does not roll back the rest.


        Responses include direct Enginy app URLs when available. Each successful
        result includes an `appUrl` field for the company. MCP agents should
        return those URLs to users whenever they are present in the response.

            > **Required scope:** `COMPANIES_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                companies:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Company name
                      domain:
                        type: string
                        description: Company website domain
                      website:
                        type: string
                        format: uri
                        description: Company website URL
                      companyLinkedInUrl:
                        type: string
                        format: uri
                        description: Company LinkedIn URL
                      listId:
                        type: integer
                        exclusiveMinimum: 0
                        description: ID of the list to add the company to
                      mergeWithExisting:
                        type: boolean
                        default: true
                        description: >-
                          Whether to merge with an existing company matched by
                          normalized LinkedIn URL, domain, website, or exact
                          name. Defaults to true.
                    additionalProperties: {}
                  minItems: 1
                  maxItems: 100
                  description: >-
                    Companies to create in a single request (1-100). Each item
                    accepts the same fields as `POST /v1/company`, including
                    per-item `listId`, `mergeWithExisting`, and custom/AI fields
                    by name.
              required:
                - companies
            examples:
              basic:
                summary: Create two companies, one merging by domain
                value:
                  companies:
                    - name: Analytical Engines
                      domain: analytical-engines.com
                      industry: Software
                    - companyLinkedInUrl: https://www.linkedin.com/company/acme
                      mergeWithExisting: true
                      listId: 42
      responses:
        '200':
          description: >-
            Batch processed. Each company has an entry in `data.results` (in
            request order); inspect `success` and `summary` for partial
            failures.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: integer
                              description: >-
                                Zero-based position of this company in the
                                request array.
                            success:
                              type: boolean
                              description: >-
                                Whether this company was created or merged
                                successfully.
                            company:
                              type: object
                              properties:
                                id:
                                  type: number
                                  description: ID of the created or updated company
                                appUrl:
                                  type: string
                                  format: uri
                                  description: >-
                                    Direct Enginy app URL for opening the
                                    company.
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  description: Company name
                                domain:
                                  type:
                                    - string
                                    - 'null'
                                  description: Company website domain
                                companyLinkedInUrl:
                                  type:
                                    - string
                                    - 'null'
                                  description: Company LinkedIn URL
                                createdAt:
                                  type: string
                                  format: date-time
                                  description: Date and time when the company was created
                                updatedAt:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Date and time when the company was last
                                    updated
                                outcome:
                                  type: string
                                  enum:
                                    - CREATED
                                    - MERGED_UPDATED
                                    - MERGED_NOOP
                                  description: >-
                                    Whether the company was newly created or
                                    merged
                                matchedBy:
                                  type: string
                                  enum:
                                    - LINKEDIN_URL
                                    - DOMAIN
                                    - WEBSITE
                                    - NAME
                                  description: >-
                                    How an existing company was matched when
                                    mergeWithExisting reused a record
                                warnings:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    Non-fatal warnings describing merge or no-op
                                    behavior
                              required:
                                - id
                                - appUrl
                                - name
                                - domain
                                - companyLinkedInUrl
                                - createdAt
                                - updatedAt
                                - outcome
                                - warnings
                              description: >-
                                The created or merged company. Present only when
                                `success` is true.
                            error:
                              type: object
                              properties:
                                message:
                                  type: string
                                  description: Human-readable reason this company failed.
                                details:
                                  type: object
                                  additionalProperties: {}
                                  description: >-
                                    Structured, machine-actionable error context
                                    when available.
                              required:
                                - message
                              description: >-
                                Failure detail. Present only when `success` is
                                false.
                          required:
                            - index
                            - success
                        description: >-
                          Per-item outcomes in the same order as the submitted
                          `companies` array.
                      summary:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Number of companies submitted.
                          created:
                            type: integer
                            description: Number of companies newly created.
                          merged:
                            type: integer
                            description: >-
                              Number of companies merged into an existing
                              record.
                          failed:
                            type: integer
                            description: >-
                              Number of companies that could not be created or
                              merged.
                        required:
                          - total
                          - created
                          - merged
                          - failed
                        description: Aggregate counts for the batch.
                    required:
                      - results
                      - summary
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            Bad request - the batch envelope failed validation (e.g. empty or
            too large)
        '500':
          description: Internal server error
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````