# Create or Update a company

You can create or update a company.
Companies will be only visible in Intercom when there is at least one associated user.
Companies are looked up via `company_id` in a `POST` request, if not found via `company_id`, the new company will be created, if found, that company will be updated.
You can set a unique `company_id` value when creating a company. However, it is not possible to update `company_id`. Be sure to set a unique value once upon creation of the company.

Endpoint: POST /companies
Version: 2.7
Security: bearerAuth

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `name` (string)
    The name of the Company
    Example: Intercom

  - `company_id` (string)
    The company id you have defined for the company. Can't be updated
    Example: 625e90fc55ab113b6d92175f

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

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

  - `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

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

  - `remote_created_at` (integer)
    The time the company was created by you.
    Example: 1394531169

  - `monthly_spend` (integer)
    How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2**31-1 or 2147483647..
    Example: 1000

## Response 200 fields (application/json):

  - `type` (string)
    Value is `company`
    Enum: "company"

  - `id` (string)
    The Intercom defined id representing the company.
    Example: 531ee472cce572a6ec000006

  - `name` (string)
    The name of the company.
    Example: Example Company Inc.

  - `app_id` (string)
    The Intercom defined code of the workspace the company is associated to.
    Example: ecahpwf5

  - `plan` (object)

  - `plan.type` (string)
    Value is always "plan"
    Example: plan

  - `plan.id` (string)
    The id of the plan
    Example: 269315

  - `plan.name` (string)
    The name of the plan
    Example: Pro

  - `company_id` (string)
    The company id you have defined for the company.
    Example: 6

  - `remote_created_at` (integer)
    The time the company was created by you.
    Example: 1663597223

  - `created_at` (integer)
    The time the company was added in Intercom.
    Example: 1663597223

  - `updated_at` (integer)
    The last time the company was updated.
    Example: 1663597223

  - `last_request_at` (integer)
    The time the company last recorded making a request.
    Example: 1663597223

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

  - `website` (string)
    The URL for the company website.
    Example: https://www.intercom.com

  - `industry` (string)
    The industry that the company operates in.
    Example: Software

  - `monthly_spend` (integer)
    How much revenue the company generates for your business.
    Example: 100

  - `session_count` (integer)
    How many sessions the company has recorded.
    Example: 100

  - `user_count` (integer)
    The number of users in the company.
    Example: 100

  - `tags` (object)
    The list of tags associated with the company

  - `tags.type` (string)
    The type of the object
    Enum: "tag.list"

  - `tags.tags` (array)

  - `tags.tags.type` (string)
    value is "tag"
    Example: tag

  - `tags.tags.id` (string)
    The id of the tag
    Example: 123456

  - `tags.tags.name` (string)
    The name of the tag
    Example: Test tag

  - `segments` (object)
    The list of segments associated with the company

  - `segments.type` (string)
    The type of the object
    Enum: "segment.list"

  - `segments.segments` (array)

  - `segments.segments.type` (string)
    The type of object.
    Enum: "segment"

  - `segments.segments.id` (string)
    The unique identifier representing the segment.
    Example: 56203d253cba154d39010062

  - `segments.segments.name` (string)
    The name of the segment.
    Example: Active

  - `segments.segments.created_at` (integer)
    The time the segment was created.
    Example: 1394621988

  - `segments.segments.updated_at` (integer)
    The time the segment was updated.
    Example: 1394622004

  - `segments.segments.person_type` (string)
    Type of the contact: contact (lead) or user.
    Enum: "contact", "user"

  - `segments.segments.count` (integer)
    The number of items in the user segment. It's returned when `include_count=true` is included in the request.
    Example: 3

## Response 400 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 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

