> ## 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.

# Update an integration

> Edit an integration

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


## OpenAPI

````yaml PATCH /integrations/{uniqueKey}
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:
  /integrations/{uniqueKey}:
    patch:
      summary: Edit an integration
      description: Edit an integration
      parameters:
        - name: uniqueKey
          in: path
          required: true
          schema:
            type: string
          description: The integration ID (unique_key) that you created in Nango.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                unique_key:
                  type: string
                  description: >-
                    A unique integration ID, which you will use in the other API
                    calls to reference this integration.
                display_name:
                  type: string
                  description: The integration display name.
                forward_webhooks:
                  type: boolean
                  description: Whether to forward webhooks received for this integration.
                credentials:
                  $ref: '#/components/schemas/IntegrationCredentials'
                integration_config:
                  type: object
                  additionalProperties:
                    type: string
                  description: >
                    Provider-specific configuration for providers that declare
                    an `integration_config` schema (e.g. `private-api-generic`,
                    `aws-sigv4`). Only the fields you pass are updated.
      responses:
        '200':
          description: Successfully updated an integration
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Integration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    IntegrationCredentials:
      description: Integration credentials schema for different authentication types.
      oneOf:
        - type: object
          required:
            - type
            - client_id
            - client_secret
          properties:
            type:
              type: string
              enum:
                - OAUTH1
                - OAUTH2
                - TBA
            client_id:
              type: string
              minLength: 1
              maxLength: 255
            client_secret:
              type: string
              minLength: 1
            scopes:
              anyOf:
                - type: string
                  pattern: ^[0-9a-zA-Z:/_.-]+(,[0-9a-zA-Z:/_.-]+)*$
                - type: 'null'
            webhook_secret:
              anyOf:
                - type: string
                  maxLength: 255
                - type: 'null'
        - type: object
          required:
            - type
            - app_id
            - app_link
            - private_key
          properties:
            type:
              type: string
              enum:
                - APP
            app_id:
              type: string
              minLength: 1
              maxLength: 255
            app_link:
              type: string
              minLength: 1
            private_key:
              type: string
              pattern: ^-----BEGIN RSA PRIVATE KEY----.*-----END RSA PRIVATE KEY-----$
        - type: object
          required:
            - type
            - client_id
            - client_secret
            - app_id
            - app_link
            - private_key
          properties:
            type:
              type: string
              enum:
                - CUSTOM
            client_id:
              type: string
              minLength: 1
              maxLength: 255
            client_secret:
              type: string
              minLength: 1
            app_id:
              type: string
              minLength: 1
              maxLength: 255
            app_link:
              type: string
              minLength: 1
            private_key:
              type: string
              pattern: ^-----BEGIN RSA PRIVATE KEY----.*-----END RSA PRIVATE KEY-----$
    Integration:
      type: object
      additionalProperties: false
      required:
        - unique_key
        - display_name
        - provider
        - created_at
        - updated_at
      properties:
        unique_key:
          type: string
          description: The integration ID that you created in Nango.
        display_name:
          type: string
          description: The provider display name.
        provider:
          type: string
          description: The Nango API Configuration.
        logo:
          type: string
          description: Absolute path to the logo of this integration (svg)
        created_at:
          type: string
          format: date-time
          description: When it was created
        updated_at:
          type: string
          format: date-time
          description: Last time it was updated
        forward_webhooks:
          type: boolean
          description: >-
            Whether webhooks received from this integration's provider are
            forwarded to your backend.
    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
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: The secret key from your Nango environment.

````