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

# Update company

> Update an existing company's information including name, domain, description, custom field values, and do-not-contact status. Only provided fields are updated; omitted fields remain unchanged.

**Do-not-contact**: Pass `do_not_contact: true` to flag the company (blocks outreach to anyone whose current company is this one) or `false` to clear it. Optionally include a `do_not_contact_reason` (free text) and `do_not_contact_expiration_date` (ISO 8601 timestamp). When the expiration field is omitted on a new do-not-contact flag, the team default from `auth_organization_settings.auto_dnc_company_on_search_days` is applied (days-from-now); pass `null` explicitly for an indefinite do-not-contact.



## OpenAPI

````yaml /api-reference/openapi-v1.json patch /v1/companies/{id}
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
paths:
  /v1/companies/{id}:
    patch:
      tags:
        - Companies
      summary: Update company
      description: >-
        Update an existing company's information including name, domain,
        description, custom field values, and do-not-contact status. Only
        provided fields are updated; omitted fields remain unchanged.


        **Do-not-contact**: Pass `do_not_contact: true` to flag the company
        (blocks outreach to anyone whose current company is this one) or `false`
        to clear it. Optionally include a `do_not_contact_reason` (free text)
        and `do_not_contact_expiration_date` (ISO 8601 timestamp). When the
        expiration field is omitted on a new do-not-contact flag, the team
        default from
        `auth_organization_settings.auto_dnc_company_on_search_days` is applied
        (days-from-now); pass `null` explicitly for an indefinite
        do-not-contact.
      operationId: updateCompany
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            description: Company ID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyRequest'
      responses:
        '200':
          description: Company updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCompanyResponse'
              example:
                success: true
                data:
                  message: Company updated successfully
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  schemas:
    UpdateCompanyRequest:
      type: object
      properties:
        name:
          type: string
          description: Company name.
        domain:
          type: string
          description: Website domain.
        linkedin_url:
          type: string
          description: LinkedIn company page URL.
        description:
          type: string
          description: Company description.
        location:
          type: string
          description: Company headquarters location.
        phone:
          type: string
          description: Company phone number.
        is_client:
          type: boolean
          description: Whether to mark the company as a client.
        client_status_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Client status UUID, or null to clear. Use GET /v1/companies/statuses
            to get available status IDs. Setting a status automatically marks
            the company as a client.
        do_not_contact:
          type: boolean
          description: >-
            Set to true to mark this company as do-not-contact (blocks outreach
            to anyone whose current company is this one), or false to clear the
            flag.
        do_not_contact_reason:
          type: string
          description: >-
            Free-text reason for the do-not-contact flag (e.g. "Active client —
            protect from sourcing"). Only meaningful when do_not_contact is
            true. When omitted, any existing reason is preserved.
        do_not_contact_expiration_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            ISO 8601 timestamp when do-not-contact should automatically expire.
            Only meaningful when do_not_contact is true. Pass an explicit date
            to set a custom expiration, or null for an indefinite
            do-not-contact. When omitted on a NEW do-not-contact flag, the team
            default from
            auth_organization_settings.auto_dnc_company_on_search_days is used
            (computed as that many days from now); if no default is configured,
            the do-not-contact is indefinite. When omitted on an existing
            do-not-contact flag, the current expiration is preserved.
        custom_fields:
          type: array
          items:
            type: object
            properties:
              attribute_id:
                type: string
                format: uuid
                description: >-
                  Custom attribute definition UUID. Get from GET
                  /v1/custom-fields/companies.
              value:
                anyOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
                  - type: 'null'
                description: >-
                  For scalar types: the value to set, or null to clear. For
                  single-select: pass the tag NAME or the tag option UUID from
                  GET /v1/custom-fields/companies.
              add_values:
                type: array
                items:
                  type: string
                description: >-
                  Tags to add for multi-select fields. Pass tag NAMES or tag
                  option UUIDs.
              remove_values:
                type: array
                items:
                  type: string
                description: >-
                  Tags to remove for multi-select fields. Pass tag NAMES or tag
                  option UUIDs.
              add_team_member_ids:
                type: array
                items:
                  type: string
                  format: uuid
                description: Team member UUIDs to add for multi-team-member fields.
              remove_team_member_ids:
                type: array
                items:
                  type: string
                  format: uuid
                description: Team member UUIDs to remove for multi-team-member fields.
              clear_all:
                type: boolean
                description: >-
                  When true, removes all existing values for this multi-select
                  or multi-team-member attribute.
            required:
              - attribute_id
          description: >-
            Custom field values to update. Get attribute definitions from GET
            /v1/custom-fields/companies.
    UpdateCompanyResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - success
        - data
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````