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

# Update aggregator connection

> Edits an existing Open-Finance data-aggregator (Pluggy/Belvo) connection by id so a mistyped baseUrl is not permanent. The vendor is immutable. clientId/secret are optional: supply both to rotate the sealed credential, or omit both to leave the stored secret intact. The supplied credential is sealed before persistence and is never returned. A non-aggregator connection id returns 404.



## OpenAPI

````yaml en/openapi/v3-current/matcher.yaml put /v1/discovery/aggregator-connections/{id}
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: 4.1.0
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/discovery/aggregator-connections/{id}:
    put:
      tags:
        - Discovery
      summary: Update aggregator connection
      description: >-
        Edits an existing Open-Finance data-aggregator (Pluggy/Belvo) connection
        by id so a mistyped baseUrl is not permanent. The vendor is immutable.
        clientId/secret are optional: supply both to rotate the sealed
        credential, or omit both to leave the stored secret intact. The supplied
        credential is sealed before persistence and is never returned. A
        non-aggregator connection id returns 404.
      operationId: updateAggregatorConnection
      parameters:
        - description: Opaque aggregator connection id
          in: path
          name: id
          required: true
          schema:
            description: Opaque aggregator connection id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAggregatorConnectionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregatorConnectionResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateAggregatorConnectionRequest:
      additionalProperties: false
      properties:
        accountRef:
          description: >-
            Opaque vendor account reference (Pluggy itemId, Belvo link id) the
            webhook pull threads onto its request
          examples:
            - a1b2c3d4-5678-90ab-cdef-1234567890ab
          minLength: 1
          type: string
        baseUrl:
          description: Vendor API base URL, stored as the connection host
          examples:
            - https://api.pluggy.ai
          format: uri
          minLength: 1
          type: string
        clientId:
          description: >-
            Aggregator API client id (optional; supply with secret to rotate,
            omit both to keep the stored credential; sealed; never emitted)
          type: string
        configName:
          description: >-
            Unique connection config name (tenant-scoped); the mint endpoint
            binds a token to this name
          examples:
            - pluggy-main
          minLength: 1
          type: string
        secret:
          description: >-
            Aggregator API client secret (optional; supply with clientId to
            rotate, omit both to keep the stored credential; sealed; never
            emitted)
          type: string
      required:
        - configName
        - baseUrl
        - accountRef
      type: object
    AggregatorConnectionResponse:
      additionalProperties: false
      properties:
        accountRef:
          description: >-
            Stored opaque vendor account reference (Pluggy itemId, Belvo link
            id)
          examples:
            - a1b2c3d4-5678-90ab-cdef-1234567890ab
          type: string
        baseUrl:
          description: Stored vendor API base URL
          examples:
            - https://api.pluggy.ai
          format: uri
          type: string
        configName:
          description: Connection config name the operator mints a token against
          examples:
            - pluggy-main
          type: string
        vendor:
          description: Aggregator vendor the connection is bound to
          enum:
            - pluggy
            - belvo
          examples:
            - pluggy
          type: string
      required:
        - vendor
        - configName
        - baseUrl
        - accountRef
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````