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

# Update a source

> Updates fields in a source.

Only non-null fields are updated. Any missing or null field is ignored.



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json put /agency/source/{sourceId}
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /agency/source/{sourceId}:
    put:
      tags:
        - Source
      summary: Update a source
      description: "Updates fields in a source.\r\n\r\nOnly non-null fields are updated. Any missing or null field is ignored."
      parameters:
        - name: sourceId
          in: path
          description: The source ID.
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        description: The fields to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSourceInput'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateSourceInput'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateSourceInput'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/SourceDto'
            application/json:
              schema:
                $ref: '#/components/schemas/SourceDto'
            text/json:
              schema:
                $ref: '#/components/schemas/SourceDto'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                type: string
            text/json:
              schema:
                type: string
components:
  schemas:
    UpdateSourceInput:
      type: object
      properties:
        name:
          type: string
          nullable: true
        autoShutoff:
          type: boolean
          nullable: true
        gracefulGoodbye:
          type: boolean
          nullable: true
        isAvailabilityContactTimezone:
          type: boolean
          nullable: true
        botRespondWindows:
          type: array
          items:
            $ref: '#/components/schemas/BotSourceAvailabilityDto'
          nullable: true
        isBotRespondWindowsQuietHours:
          type: boolean
          nullable: true
        respondWindows:
          type: array
          items:
            $ref: '#/components/schemas/SourceAvailabilityDto'
          nullable: true
        doNotRespondWindows:
          type: array
          items:
            $ref: '#/components/schemas/SourceDoNotRespondWindowDto'
          nullable: true
        summarizeAttachments:
          type: boolean
          nullable: true
        respondToReactions:
          type: boolean
          nullable: true
        markConversationsAsUnread:
          type: boolean
          nullable: true
        wallet:
          $ref: '#/components/schemas/UpdateSourceWalletInput'
        accountsWithAccess:
          type: array
          items:
            type: string
          nullable: true
        webhookCallback:
          type: string
          nullable: true
        scriptDomainAllowList:
          type: array
          items:
            type: string
          nullable: true
        hubSpotOwnerId:
          type: string
          nullable: true
        timezone:
          type: string
          nullable: true
      additionalProperties: false
    SourceDto:
      type: object
      properties:
        agencyId:
          type: string
          nullable: true
        sourceId:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        category:
          type: string
          nullable: true
        key:
          type: string
          nullable: true
        accessToken:
          type: string
          nullable: true
        address:
          type: string
          nullable: true
        connected:
          type: boolean
        autoShutoff:
          type: boolean
        gracefulGoodbye:
          type: boolean
        bots:
          type: array
          items:
            $ref: '#/components/schemas/SourceBotDto'
          nullable: true
        accountsWithAccess:
          type: array
          items:
            type: string
          nullable: true
        isAvailabilityContactTimezone:
          type: boolean
        respondWindows:
          type: array
          items:
            $ref: '#/components/schemas/SourceAvailabilityDto'
          nullable: true
        doNotRespondWindows:
          type: array
          items:
            $ref: '#/components/schemas/SourceDoNotRespondWindowDto'
          nullable: true
        botRespondWindows:
          type: array
          items:
            $ref: '#/components/schemas/BotSourceAvailabilityDto'
          nullable: true
        isBotRespondWindowsQuietHours:
          type: boolean
        summarizeAttachments:
          type: boolean
        respondToReactions:
          type: boolean
        markConversationAsUnread:
          type: boolean
        webhookCallback:
          type: string
          nullable: true
        scriptInstalled:
          type: boolean
        scriptLastSeenAt:
          type: string
          format: date-time
          nullable: true
        scriptLastSeenDomain:
          type: string
          nullable: true
        scriptLastSeenEndpoint:
          type: string
          nullable: true
        scriptDomainAllowList:
          type: array
          items:
            type: string
          nullable: true
        wallet:
          $ref: '#/components/schemas/SourceWalletDto'
        hubSpotOwnerId:
          type: string
          nullable: true
      additionalProperties: false
    BotSourceAvailabilityDto:
      type: object
      properties:
        dayOfWeekUtc:
          type: string
          nullable: true
        startTimeUtc:
          type: string
          nullable: true
        duration:
          type: string
          nullable: true
        channel:
          type: string
          nullable: true
      additionalProperties: false
    SourceAvailabilityDto:
      type: object
      properties:
        dayOfWeekUtc:
          type: string
          nullable: true
        startTimeUtc:
          type: string
          nullable: true
        duration:
          type: string
          nullable: true
      additionalProperties: false
    SourceDoNotRespondWindowDto:
      type: object
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
      additionalProperties: false
    UpdateSourceWalletInput:
      type: object
      properties:
        reBilling:
          type: boolean
          nullable: true
        autoRefill:
          type: boolean
          nullable: true
        topUpAmount:
          type: integer
          format: int32
          nullable: true
        refillThreshold:
          type: integer
          format: int32
          nullable: true
        responseUnitCostOverride:
          type: string
          nullable: true
        storageUnitCostOverride:
          type: string
          nullable: true
        userUnitCostOverride:
          type: string
          nullable: true
        stripeCustomerId:
          type: string
          nullable: true
      additionalProperties: false
    SourceBotDto:
      type: object
      properties:
        id:
          type: string
          nullable: true
        botName:
          type: string
          nullable: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/ContactTag'
          nullable: true
        tagFilterConfig:
          $ref: '#/components/schemas/TagFilterConfig'
        channels:
          type: array
          items:
            type: string
          nullable: true
        personaNameOverride:
          type: string
          nullable: true
        enabled:
          type: boolean
      additionalProperties: false
    SourceWalletDto:
      type: object
      properties:
        reBilling:
          type: boolean
        autoRefill:
          type: boolean
        topUpAmount:
          type: integer
          format: int32
        refillThreshold:
          type: integer
          format: int32
        stripeCustomerId:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
        responseUnitCostOverride:
          type: string
          nullable: true
        storageUnitCostOverride:
          type: string
          nullable: true
        userUnitCostOverride:
          type: string
          nullable: true
      additionalProperties: false
    ContactTag:
      type: object
      properties:
        name:
          type: string
          nullable: true
        approveDeny:
          type: boolean
        id:
          type: string
          nullable: true
      additionalProperties: false
    TagFilterConfig:
      type: object
      properties:
        operator:
          type: string
          nullable: true
        groups:
          type: array
          items:
            $ref: '#/components/schemas/TagFilterGroup'
          nullable: true
      additionalProperties: false
    TagFilterGroup:
      type: object
      properties:
        operator:
          type: string
          nullable: true
        rules:
          type: array
          items:
            $ref: '#/components/schemas/TagFilterRule'
          nullable: true
      additionalProperties: false
    TagFilterRule:
      type: object
      properties:
        tagName:
          type: string
          nullable: true
        tagId:
          type: string
          nullable: true
        condition:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````