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

# Update a client

> Updates an existing client/company in your CRM. Only provided fields will be updated.



## OpenAPI

````yaml /openapi.json patch /clients/{id}
openapi: 3.1.1
info:
  title: Heffl Public API (Legacy v1)
  version: 1.0.0
  description: >-
    Legacy Heffl REST API v1. Maintained for existing integrations. For new
    projects, use API v2 at https://docs.heffl.com/api-v2/introduction.
  contact:
    name: Heffl Support
    url: https://heffl.com/support
    email: support@heffl.com
servers:
  - url: https://api.heffl.com/api/v1
    description: Production API Server
security:
  - ApiKeyAuth: []
paths:
  /clients/{id}:
    patch:
      tags:
        - Clients
      summary: Update a client
      description: >-
        Updates an existing client/company in your CRM. Only provided fields
        will be updated.
      operationId: clients.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Client public ID
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  enum:
                    - company
                    - contact
                  description: 'Client type: company for companies, contact for contacts'
                name:
                  type: string
                  description: Company name (required for companies, optional for contacts)
                firstName:
                  type: string
                  description: First name (required for contacts, optional for companies)
                lastName:
                  type: string
                  description: Last name (optional for contacts)
                salutation:
                  type: string
                  description: Title (Mr., Mrs., Dr., etc.)
                phone:
                  type: string
                  description: Phone number with country code
                email:
                  anyOf:
                    - type: string
                      format: email
                    - type: 'null'
                  description: Email address
                jobTitle:
                  type: string
                  description: Job title or position
                website:
                  anyOf:
                    - {}
                    - type: 'null'
                  description: Company website URL
                taxNumber:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: Tax ID or VAT number
                billingAddress:
                  anyOf:
                    - type: object
                      properties:
                        city:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: City
                        address:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Street address
                        landmark:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Nearby landmark
                        state:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: State or province
                        country:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Country code (2 letters, e.g., US, GB)
                        postalCode:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Postal code or ZIP code
                    - type: 'null'
                  description: Billing address details
                primaryContact:
                  type: object
                  properties:
                    firstName:
                      type: string
                      minLength: 1
                    lastName:
                      type: string
                    email:
                      anyOf:
                        - type: string
                          format: email
                        - type: 'null'
                    phone:
                      type: string
                    salutation:
                      type: string
                    jobTitle:
                      type: string
                  required:
                    - firstName
                  additionalProperties: {}
                  description: Optional primary contact for company records
              required: []
              additionalProperties: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Client public ID
                  number:
                    type: string
                    description: Auto-generated client number
                  name:
                    type: string
                    description: Client name
                  type:
                    enum:
                      - company
                      - contact
                    description: Client type
                  firstName:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: First name (for contacts)
                  lastName:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Last name (for contacts)
                  email:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Email address
                  phone:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Phone number
                  website:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Website URL
                  stageId:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Client stage public ID
                  createdAt:
                    type: string
                    format: date-time
                    x-native-type: date
                    description: When the client was created
                  customFields:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      - type: 'null'
                    description: Custom field values
                required:
                  - id
                  - number
                  - name
                  - type
                  - createdAt
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        app.heffl.com/settings/developers

````