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

# Update a Harness integration

> Updates selected fields. Changing the token, base URL, or gateway prefix re-verifies the credentials. A replacement token must belong to the existing Harness account. Requires the `integrations.manage_integration` permission.



## OpenAPI

````yaml /api-reference/openapi.json patch /integrations/harness/{integration_uuid}
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /integrations/harness/{integration_uuid}:
    parameters:
      - name: integration_uuid
        in: path
        required: true
        description: Harness integration UUID
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Harness integrations
      summary: Update a Harness integration
      description: >-
        Updates selected fields. Changing the token, base URL, or gateway prefix
        re-verifies the credentials. A replacement token must belong to the
        existing Harness account. Requires the `integrations.manage_integration`
        permission.
      operationId: updateHarnessIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHarnessIntegrationRequest'
      responses:
        '200':
          description: Harness integration updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HarnessIntegrationWriteResponse'
        '400':
          description: >-
            Invalid request, account mismatch, or credentials could not be
            verified
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: API access or required permission denied
        '404':
          description: Integration not found
        '409':
          description: >-
            An integration already exists for this account and organization
            allowlist
components:
  schemas:
    UpdateHarnessIntegrationRequest:
      type: object
      properties:
        secure_token:
          type: string
          writeOnly: true
          description: >-
            Replacement PAT or Service Account Token for the same Harness
            account.
        name:
          type: string
        org_allowlist:
          type: array
          items:
            type: string
        base_url:
          type: string
          format: uri
        gateway_prefix:
          type: string
    HarnessIntegrationWriteResponse:
      allOf:
        - $ref: '#/components/schemas/HarnessIntegrationResponse'
        - type: object
          required:
            - credentials_verified
          properties:
            credentials_verified:
              type: boolean
              enum:
                - true
    HarnessIntegrationResponse:
      type: object
      required:
        - status
        - integration
      properties:
        status:
          type: string
          enum:
            - ok
        integration:
          $ref: '#/components/schemas/HarnessIntegration'
    HarnessIntegration:
      type: object
      description: A Harness Code SCM integration. Credential values are never returned.
      required:
        - id
        - uuid
        - type
        - name
        - account_id
        - account_name
        - org_allowlist
        - base_url
        - gateway_prefix
        - expired
      properties:
        id:
          type: integer
        uuid:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - harness
        name:
          type: string
        account_id:
          type: string
          description: Harness account ID derived from the token.
        account_name:
          type: string
        org_allowlist:
          type: array
          description: >-
            Harness organization identifiers available to this integration. An
            empty list allows every organization accessible to the token.
          items:
            type: string
        base_url:
          type: string
          format: uri
        gateway_prefix:
          type: string
        expired:
          type: boolean
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
  responses:
    Unauthorized:
      description: Invalid or missing token
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````