# Bulk create or update companies

You can bulk create or update companies by submitting an array of company objects. Each company is matched on the `company_id` you have defined for it: a new company is created if none exists with that `company_id`, otherwise the matching company is updated. This mirrors the single [Create or update a company](/docs/references/preview/rest-api/api.intercom.io/companies/createorupdatecompany) endpoint.
The endpoint creates an async job that processes the items in the background. Use the returned job ID with `GET /companies/bulk/{id}` to check the job status.
If an item fails validation, that item is rejected and the job's `state` ends as `completed_with_errors`. The other companies in the same request are still processed. The job `state` from `GET /companies/bulk/{id}` is the signal that one or more items were rejected.
- Maximum of 100 companies per request.
- You can append tasks to an existing job by including `job.id` in the request body.

Endpoint: POST /companies/bulk
Version: Preview
Security: bearerAuth

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `companies` (array, required)
    An array of company objects to create or update. Maximum 100 companies per request.

  - `companies.company_id` (string)
    The company id you have defined for the company. Used to match an existing company; a new one is created if none matches.
    Example: 625e90fc55ab113b6d92175f

  - `companies.name` (string)
    The name of the company.
    Example: Acme Corp

  - `companies.plan` (string)
    The name of the plan you have associated with the company.
    Example: Enterprise

  - `companies.size` (integer)
    The number of employees in this company.
    Example: 100

  - `companies.website` (string)
    The URL for this company's website. Please note that the value specified here is not validated. Accepts any string.
    Example: https://www.example.com

  - `companies.industry` (string)
    The industry that this company operates in.
    Example: Manufacturing

  - `companies.custom_attributes` (object)
    A hash of key/value pairs containing any other data about the company you want Intercom to store.

  - `companies.remote_created_at` (integer)
    The time the company was created by you, in Unix timestamp format.
    Example: 1394531169

  - `companies.monthly_spend` (integer)
    How much revenue the company generates for your business. Note that this will truncate floats — only whole integers are stored, so 155.98 is truncated to 155, with an upper limit of 2147483647.
    Example: 1000

  - `companies.update_last_request_at` (boolean)
    Set to true to update the company's last seen time to now.
    Example: true

  - `job` (object)
    Optional. Include to append tasks to an existing job.

  - `job.id` (string)
    The ID of an existing bulk job to append to.
    Example: job_v2_1

## Response 202 fields (application/json):

  - `id` (string)
    The unique identifier for the bulk job.
    Example: job_v2_1

  - `type` (string)
    The type of the object.
    Enum: "companies.bulk.job"

  - `state` (string)
    The current state of the job.
    Enum: "pending", "running", "completed", "completed_with_errors"

  - `created_at` (integer)
    The time the job was created as a UNIX timestamp.
    Example: 1713360000

  - `updated_at` (integer)
    The time the job was last updated as a UNIX timestamp.
    Example: 1713360060

  - `completed_at` (integer)
    The time the job completed as a UNIX timestamp. Null if not yet completed.
    Example: 1713360120

  - `tasks` (array)
    The tasks that make up this bulk job.

  - `tasks.id` (string)
    The unique identifier for the task.
    Example: task_v2_1

  - `tasks.item_count` (integer)
    The number of items in this task.
    Example: 2

  - `tasks.state` (string)
    The current state of the task.
    Enum: "pending", "running", "completed", "completed_with_errors"

  - `tasks.created_at` (integer)
    The time the task was created as a UNIX timestamp.
    Example: 1713360000

  - `tasks.started_at` (integer)
    The time the task started as a UNIX timestamp. Null if not yet started.
    Example: 1713360060

  - `tasks.completed_at` (integer)
    The time the task completed as a UNIX timestamp. Null if not yet completed.
    Example: 1713360120

  - `url` (string)
    The URL to check the job status.
    Example: https://api.intercom.io/companies/bulk/job_v2_1

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 403 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 404 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 422 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

