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

# Update a company

> Updates a company. Only the fields sent in the body are modified.

<Accordion title="Required scope">
`companies:write`
</Accordion>



## OpenAPI

````yaml /en/api-reference/openapi.json patch /v1/companies/{id}
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints for registering applications and managing OAuth 2.1 tokens.
  version: 1.0.0
  contact:
    name: Vendaze Support
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: People
  - name: Companies
  - name: Deals
  - name: Pipelines
  - name: Tasks
  - name: Task Types
  - name: Products
  - name: Tags
  - name: Lists
  - name: Custom Fields
  - name: Webhooks
paths:
  /v1/companies/{id}:
    patch:
      tags:
        - Companies
      summary: Update a company
      description: |-
        Updates a company. Only the fields sent in the body are modified.

        <Accordion title="Required scope">
        `companies:write`
        </Accordion>
      operationId: updateCompany
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyRequest'
      responses:
        '200':
          description: Company updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyWithEmbeddedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the resource.
  schemas:
    UpdateCompanyRequest:
      type: object
      description: All fields are optional. Only fields included in the body are modified.
      properties:
        full_name:
          type: string
          maxLength: 70
        emails:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmail'
        phones:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhone'
        owner_email:
          type: string
          format: email
          nullable: true
          description: >-
            Email of the workspace member to set as owner. Pass `null` to remove
            the owner. Must be a member of this workspace.
          example: joao@company.com
        avatar_image:
          type: string
          description: >-
            Public HTTPS URL or full base64 data URI of the image (e.g.
            `data:image/png;base64,...`). Replaces the current avatar. Accepted
            formats: JPEG, PNG, WebP, GIF, BMP, TIFF.
          example: data:image/png;base64,iVBORw0KGgo...
        tags:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 30
          description: >-
            Tag names (keys) to associate. Behavior depends on
            `association_mode`. If a tag doesn't exist, it will be automatically
            created.
        list_ids:
          type: array
          items:
            type: string
            format: uuid
          description: List IDs to associate. Behavior depends on `association_mode`.
        custom_fields:
          type: array
          items:
            type: object
            required:
              - field_key
              - value
            properties:
              field_key:
                type: string
                maxLength: 35
                example: industry
                description: >-
                  Key of the custom field (e.g. `industry`). If no field with
                  this key exists in the workspace, it is created automatically
                  with type `text`.
              value:
                type: string
                description: Field value as a string.
          description: >-
            Custom field values. Behavior depends on `association_mode`. In
            `append` mode, replaces the value for each `field_key` sent without
            touching others.
        association_mode:
          type: string
          enum:
            - append
            - replace
          default: append
          description: >-
            Controls how associations (`tags`, `list_ids`, `custom_fields`) are
            applied. `append`: adds new associations without removing existing
            ones. `replace`: removes all current associations of each sent type
            and inserts the new ones. Sending an empty array with `replace`
            removes all associations of that type.
    CompanyWithEmbeddedResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CompanyWithEmbedded'
    ContactEmail:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          example: contact@acme.com
        type:
          type: string
          enum:
            - personal
            - work
            - other
          description: Email type.
          example: work
    ContactPhone:
      type: object
      required:
        - phone
      properties:
        phone:
          type: string
          example: '+551130000000'
        type:
          type: string
          enum:
            - mobile
            - work
            - residential
            - other
          description: Phone type.
          example: work
    CompanyWithEmbedded:
      allOf:
        - $ref: '#/components/schemas/Company'
        - type: object
          properties:
            tags:
              type: array
              items:
                $ref: '#/components/schemas/Tag'
            lists:
              type: array
              items:
                $ref: '#/components/schemas/ContactList'
            custom_fields:
              type: array
              items:
                $ref: '#/components/schemas/CustomFieldValue'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
    Company:
      type: object
      properties:
        id:
          type: string
          format: uuid
        full_name:
          type: string
          maxLength: 70
          example: Acme Corp
        emails:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ContactEmail'
          example:
            - email: contact@acme.com
              type: work
        phones:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ContactPhone'
          example:
            - phone: '+551130000000'
              type: work
        owner:
          $ref: '#/components/schemas/Owner'
        avatar_url:
          type: string
          format: uri
          nullable: true
          example: >-
            https://storage.vendaze.com/client/workspaces/abc/companies/xyz/avatar/avatar_WWT1BGs9ma.webp
        entity_id:
          type: string
          example: g7wwkh0
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Tag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the tag.
        name:
          type: string
          maxLength: 30
          description: Display name of the tag.
          example: Hot Lead
        key:
          type: string
          maxLength: 30
          description: >-
            Unique key within the workspace. Lowercase letters, digits, and
            underscores only (e.g. `hot_lead`). Used to reference the tag in
            association arrays.
          example: hot_lead
        color_text:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Text color in hex RGB format. `null` means the workspace default is
            applied.
          example: '#ffffff'
        color_background:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Background color in hex RGB format. `null` means the workspace
            default is applied.
          example: '#ef4444'
        created_at:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp of when the tag was created.
    ContactList:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        created_at:
          type: string
          format: date-time
    CustomFieldValue:
      type: object
      properties:
        id:
          type: string
          format: uuid
        value: {}
        field:
          type: object
          properties:
            id:
              type: string
              format: uuid
            label:
              type: string
            key:
              type: string
            type:
              type: string
    Owner:
      type: object
      nullable: true
      description: >-
        Workspace member responsible for this task. `null` when no owner is
        assigned.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: John Smith
        email:
          type: string
          format: email
          example: john@company.com
  responses:
    BadRequest:
      description: 'Malformed request body or empty update. Error code: `bad_request`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: bad_request
              message: Request body must be valid JSON.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: >-
        Token missing, invalid, or expired. Possible error codes:
        `unauthorized`, `token_expired`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Missing or invalid Authorization header.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InsufficientScope:
      description: 'Token lacks the required scope. Error code: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: >-
        Webhook not found or belongs to another integration. Error code:
        `not_found`. Message: `"Webhook not found."`
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Webhook not found.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: >-
        Input validation failed. Error code: `validation_error`. The `fields`
        object maps each invalid field to a description of the problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: 'Unexpected server error. Error code: `internal_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.1 access token.

````