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

# Edit connection metadata (deprecated)

> Edit custom metadata for the connection (only overrides specified properties, not the entire metadata).

<Info>
  Requires an API key with the `environment:connections:update` scope. [Learn more about API key scopes](/reference/backend/http-api/api-keys#scopes).
</Info>

## Update *connection metadata*

Nango uses the request body as the new metadata (it must be a JSON object).

## Fetching *connection metadata*

To read the existing metadata of a *connection*, simply fetch the connection. Your custom metadata is included as part of the returned connection object.


## OpenAPI

````yaml PATCH /connection/{connectionId}/metadata
openapi: 3.1.0
info:
  title: Nango API
  description: Nango API specs used to authorize & sync data with external APIs.
  version: 1.0.0
servers:
  - url: https://api.nango.dev
    description: Production server
  - url: http://localhost:3003
    description: Local server
security:
  - bearerAuth: []
externalDocs:
  url: https://nango.dev/docs/reference/backend/http-api/authentication
paths:
  /connection/{connectionId}/metadata:
    patch:
      summary: Edit connection metadata (deprecated)
      description: >-
        Edit custom metadata for the connection (only overrides specified
        properties, not the entire metadata).
      parameters:
        - name: connectionId
          in: path
          required: true
          schema:
            type: string
          description: The connection ID used to create the connection.
        - name: Provider-Config-Key
          in: header
          required: true
          description: The integration ID used to create the connection (aka Unique Key).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Successfully updated the metadata
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
      deprecated: true
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
  schemas:
    StdError:
      type: object
      additionalProperties: false
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
          properties:
            code:
              type: string
            message:
              type: string
            errors:
              type: array
              items:
                type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: The secret key from your Nango environment.

````