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

# Update connection

> Updates a connection owned by the caller's account. Only the fields present in the
request body are changed; connectionName, description, fields, and
metadata are each left unchanged when omitted (null). Supplying fields or
metadata replaces the entire map, it does not merge with the existing one.



## OpenAPI

````yaml /developers/api-reference/openapi.json put /v1/connections/{connectionId}
openapi: 3.0.0
info:
  title: Engini API
  version: v1
  description: The Engini public API.
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Auth
    description: Identify the caller a Developer API request is authenticated as.
  - name: On-prem agents
    description: >-
      Provision and manage agents that run Engini tasks inside a customer's
      network.
  - name: Applications
    description: >-
      Discover the applications (toolkits) available in Engini and their
      connection requirements.
  - name: Tools
    description: Browse and execute the tools exposed by Engini applications.
  - name: Toolsets
    description: Manage toolsets - named groupings of connections and tools.
  - name: McpServers
    description: >-
      Inspect and maintain MCP servers - the account-wide endpoints that expose
      Engini tools and workflows over the Model Context Protocol. Distinct from
      the MCPClient connection kind, which is Engini consuming a third-party MCP
      server.
  - name: Connections
    description: >-
      Manage connections to applications, including OAuth sign-in and
      default-connection selection.
  - name: Triggers
    description: >-
      Create triggers that fire when something changes in a connected app, and
      manage the destinations their events are delivered to.
paths:
  /v1/connections/{connectionId}:
    put:
      tags:
        - Connections
      summary: Update connection
      description: >-
        Updates a connection owned by the caller's account. Only the fields
        present in the

        request body are changed; connectionName, description, fields, and

        metadata are each left unchanged when omitted (null). Supplying fields
        or

        metadata replaces the entire map, it does not merge with the existing
        one.
      operationId: Connections_UpdateConnection
      parameters:
        - name: connectionId
          in: path
          required: true
          description: The identifier of the connection to update.
          schema:
            type: integer
            format: int32
          x-position: 1
      requestBody:
        x-name: request
        description: The fields to update on the connection.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConnectionRequest'
        required: true
        x-position: 2
      responses:
        '200':
          description: The updated connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPublicDetail'
        '400':
          description: Bad request - malformed body or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid bearer token or API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - the caller lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - the resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests - rate limit exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error - an unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
        - ApiKey: []
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            from engini import Engini


            client = Engini()  # reads ENGINI_API_KEY


            client.connections.update(481, name="prod key", fields={"apiKey":
            "sk-new"})
        - lang: typescript
          label: TypeScript
          source: >-
            import { Engini } from "@engini/sdk";


            const client = new Engini(); // reads ENGINI_API_KEY


            await client.connections.update(481, { name: "prod key", fields: {
            apiKey: "sk-new" } });
        - lang: bash
          label: CLI
          source: >-
            engini connections update 481 --name "prod key" --field
            apiKey=sk-new
components:
  schemas:
    UpdateConnectionRequest:
      type: object
      description: Request body for updating a connection; null members are left unchanged.
      additionalProperties: false
      properties:
        connectionName:
          type: string
          description: New display name; null leaves it unchanged.
          nullable: true
        description:
          type: string
          description: New description; null leaves it unchanged.
          nullable: true
        fields:
          type: object
          description: >-
            Connection field values to update, keyed by field name; null leaves
            them unchanged.
          nullable: true
          additionalProperties:
            type: string
        metadata:
          type: object
          description: Metadata to update, keyed by name; null leaves it unchanged.
          nullable: true
          additionalProperties:
            type: string
        oauthState:
          type: string
          description: >-
            Opaque state from the sign-in URL. When set on an OAuth method,
            credentials are taken from the stored sign-in and any
            client-supplied values for those keys are ignored.
          nullable: true
    ConnectionPublicDetail:
      allOf:
        - $ref: '#/components/schemas/ConnectionPublicListItem'
        - type: object
          description: >-
            Public-shape detail for /v1/Connections/{id} and create/update
            responses.
          additionalProperties: false
          properties:
            authenticationId:
              type: integer
              description: Identifier of the authentication method used by the connection.
              format: int32
            authenticationType:
              type: string
              description: Name of the authentication type used by the connection.
            fields:
              type: object
              description: >-
                Connection field values, keyed by field name (sensitive values
                may be masked).
              additionalProperties:
                type: string
                nullable: true
            useSelectDBObjects:
              type: boolean
              description: Whether the connection uses selected database objects.
            connectionError:
              type: string
              description: Last connection error message, if any.
              nullable: true
            isAlive:
              type: boolean
              description: Whether the connection is currently healthy/reachable.
            metadata:
              type: object
              description: Additional connection metadata, keyed by name.
              nullable: true
              additionalProperties:
                type: string
    ErrorResponse:
      type: object
      description: >-
        Unified machine-readable error envelope returned by every non-200
        Developer API response.
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
      properties:
        errorCode:
          type: string
          description: Machine-readable error code identifying the failure.
        message:
          type: string
          description: Human-readable error message.
        requestId:
          type: string
          description: Identifier of the request, for support/correlation.
        timestamp:
          type: string
          description: Timestamp when the error occurred (ISO 8601).
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ConnectionPublicListItem:
      type: object
      description: >-
        Public-shape list item for /v1/Connections.

        Applications are identified by slug only (no ApplicationId in the wire
        response).

        Internal queries continue to use ConnectionList which carries both.
      additionalProperties: false
      required:
        - connectionId
        - connectionName
        - applicationSlug
        - kind
        - isPublic
        - createdBy
        - createdDate
      properties:
        connectionId:
          type: integer
          description: Identifier of the connection.
          format: int32
        connectionName:
          type: string
          description: Display name of the connection.
        description:
          type: string
          description: Description of the connection.
          nullable: true
        applicationSlug:
          type: string
          description: Slug of the connection's application.
        applicationName:
          type: string
          description: Display name of the connection's application.
          nullable: true
        applicationLogo:
          type: string
          description: URL of the application's logo image.
          nullable: true
        kind:
          type: string
          description: >-
            Which kind of connection this is: Regular, Key or MCPClient.

            Mirrors the parent application's AppConnectionType. The engini.io
            Connections page's

            "Keys" tab is exactly the Key subset. On-premise agents are served
            by

            /v1/on-prem-agents.
        isPublic:
          type: boolean
          description: Whether the connection is shared/public.
        createdBy:
          type: string
          description: Identifier of the user who created the connection.
          format: uuid
        createdDate:
          type: string
          description: When the connection was created.
          format: date-time
        updatedBy:
          type: string
          description: >-
            Identifier of the user who last updated the connection; null if
            never updated.
          format: uuid
          nullable: true
        updatedDate:
          type: string
          description: When the connection was last updated; null if never updated.
          format: date-time
          nullable: true
    ErrorDetail:
      type: object
      description: A single field-level error detail within an ErrorResponse.
      additionalProperties: false
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: Name of the field the issue relates to.
        issue:
          type: string
          description: Description of the issue with the field.
  securitySchemes:
    Bearer:
      type: http
      description: Enter your JWT token
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: >-
        Opaque Developer API key (prefix `eng_`). Authenticates as the key's
        owner and resolves the account automatically.
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.