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

# Update Source

> Update an existing source

Patch a source based on its Hightouch ID



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json patch /sources/{sourceId}
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /sources/{sourceId}:
    patch:
      summary: Update Source
      description: |-
        Update an existing source

        Patch a source based on its Hightouch ID
      operationId: UpdateSource
      parameters:
        - description: The source's ID
          in: path
          name: sourceId
          required: true
          schema:
            type: number
            format: double
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceUpdate'
            example:
              name: postgres-connection2
              configuration:
                port: '5555'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Source'
                  - $ref: '#/components/schemas/ValidateErrorJSON'
                  - $ref: '#/components/schemas/InternalServerError'
              examples:
                Example 1:
                  value:
                    id: 426
                    name: postgres-connection2
                    slug: postgres-connection2
                    workspaceId: 1
                    createdAt: '2022-12-12T22:46:57.618Z'
                    updatedAt: '2022-12-15T20:23:22.319Z'
                    type: postgres
                    configuration:
                      host: example.example.us-east-1.rds.amazonaws.com
                      port: '5555'
                      user: dbUserName
                      database: dbName
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
        '500':
          description: Something went wrong
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    SourceUpdate:
      description: The input for updating a Source
      properties:
        name:
          type: string
          description: The source's name
        configuration:
          properties: {}
          additionalProperties: {}
          type: object
          description: >-
            The source's configuration. This specifies general metadata about
            sources, like connection details

            Hightouch will use this configuration to connect to underlying
            source.


            The schema depends on the source type.


            Consumers should NOT make assumptions on the contents of the

            configuration. It may change as Hightouch updates its internal code.
      type: object
      additionalProperties: false
    Source:
      description: >-
        The database or warehouse where your data is stored. The starting point
        for

        a Hightouch data pipeline.
      properties:
        id:
          type: number
          format: double
          description: The source's id
        name:
          type: string
          description: The source's name
        slug:
          type: string
          description: The source's slug
        workspaceId:
          type: number
          format: double
          description: The id of the workspace that the source belongs to
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the source was created
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the source was last updated
        configuration:
          properties: {}
          additionalProperties: {}
          type: object
          description: >-
            The source's configuration. This specifies general metadata about
            sources, like connection details

            Hightouch will use this configuration to connect to underlying
            source.


            The schema depends on the source type.


            Consumers should NOT make assumptions on the contents of the

            configuration. It may change as Hightouch updates its internal code.
        type:
          type: string
          description: The source's type (e.g. snowflake or postgres).
      required:
        - id
        - name
        - slug
        - workspaceId
        - createdAt
        - updatedAt
        - configuration
        - type
      type: object
      additionalProperties: false
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
    InternalServerError:
      type: string
      enum:
        - Internal Server Error
      nullable: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````