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

# Patch client settings

> Update the active Client's branding (LogoUrl, PrimaryColour), bill-approval link TTL, Gmail connector settings (enabled flag + allowed OAuth redirect hosts), the pay-by-bank opt-in, and the AR-email kill switch (ArEmailsEnabled). Caller must be Admin/Owner of the Client.



## OpenAPI

````yaml /api-reference/openapi.json patch /clients/{clientId}
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /clients/{clientId}:
    patch:
      tags:
        - Clients
      summary: Patch client settings
      description: >-
        Update the active Client's branding (LogoUrl, PrimaryColour),
        bill-approval link TTL, Gmail connector settings (enabled flag + allowed
        OAuth redirect hosts), the pay-by-bank opt-in, and the AR-email kill
        switch (ArEmailsEnabled). Caller must be Admin/Owner of the Client.
      parameters:
        - name: clientId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchClientRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientResponse'
        '400':
          description: >-
            Client.InvalidColour — PrimaryColour must be a valid hex colour
            (e.g. #2DD4BF)


            Client.InvalidBillReviewTtl — BillReviewTimeAfterDueDate must be a
            positive integer


            Client.InvalidGmailRedirectHost — GmailAllowedRedirectHosts entries
            must be valid hostnames (no scheme, port, or path)


            Client.InvalidPaymentRedirectHost — PaymentAllowedRedirectHosts
            entries must be valid hostnames (no scheme, port, or path)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Member.Forbidden — caller is not an Admin or Owner of this Client
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: >-
            Client.NotFound — the client does not exist or is not visible to the
            caller
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    PatchClientRequest:
      type: object
      properties:
        logoUrl:
          type:
            - 'null'
            - string
        primaryColour:
          type:
            - 'null'
            - string
        billReviewTimeAfterDueDate:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        gmailConnectorEnabled:
          type:
            - 'null'
            - boolean
        gmailAllowedRedirectHosts:
          type:
            - 'null'
            - array
          items:
            type: string
        paymentAllowedRedirectHosts:
          type:
            - 'null'
            - array
          items:
            type: string
        payByBankEnabled:
          type:
            - 'null'
            - boolean
        arEmailsEnabled:
          type:
            - 'null'
            - boolean
    ClientResponse:
      required:
        - name
        - gmailAllowedRedirectHosts
        - paymentAllowedRedirectHosts
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          $ref: '#/components/schemas/ClientType'
        paymentRevenueSharePercent:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        dolfinRevenueSharePercent:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        logoUrl:
          type:
            - 'null'
            - string
        primaryColour:
          type:
            - 'null'
            - string
        billReviewTimeAfterDueDate:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        gmailConnectorEnabled:
          type: boolean
        gmailAllowedRedirectHosts:
          type: array
          items:
            type: string
        paymentAllowedRedirectHosts:
          type: array
          items:
            type: string
        payByBankEnabled:
          type: boolean
        arEmailsEnabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        createdBy:
          type:
            - 'null'
            - string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type:
            - 'null'
            - string
          format: uuid
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    ClientType:
      enum:
        - Live
        - Sandbox

````