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

# Update Company

> Updates the details of an existing company using its unique identifier.



## OpenAPI

````yaml PATCH /public/v2/companies/{company_id}
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/v2/companies/{company_id}:
    patch:
      tags:
        - public
      description: Updates the details of an existing company using its unique identifier.
      operationId: Modify company_2
      parameters:
        - in: path
          name: company_id
          schema:
            type: integer
          required: true
        - in: query
          name: structure
          schema:
            type: string
            enum:
              - FLAT
              - NESTED
            default: NESTED
          description: >-
            Format of custom fields in response. NESTED returns array of objects
            with id, field_name, field_value. FLAT returns object with field
            names as keys.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCompanyPatchRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedCompanyPatchRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedCompanyPatchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyPatchRequest'
          description: OK. The company was successfully updated.
        '400':
          description: Bad Request. Invalid data has been provided.
        '401':
          description: Unauthorized. Company does not belong to this client.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: Not Found. Company with this ID does not exist.
        '409':
          description: Conflict. A company with this domain already exists for this client.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    PatchedCompanyPatchRequest:
      type: object
      properties:
        name:
          type: string
        domain:
          type: string
        company_status:
          type: string
        company_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CompanyCustomFieldPatch'
    CompanyPatchRequest:
      type: object
      properties:
        name:
          type: string
        domain:
          type: string
        company_status:
          type: string
        company_custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CompanyCustomFieldPatch'
    CompanyCustomFieldPatch:
      type: object
      properties:
        field_name:
          type: string
        field_value:
          type: string
          nullable: true
      required:
        - field_name

````