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

# Update a connection

> Updates a connection. Send only the fields you want to change. To replace only the credential, you can also use **Rotate a credential**.

**Required permission:** `connections:write`




## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/v1/connections/{slug}
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/connections/{slug}:
    patch:
      tags:
        - Connections
      summary: Update a connection
      description: >
        Updates a connection. Send only the fields you want to change. To
        replace only the credential, you can also use **Rotate a credential**.


        **Required permission:** `connections:write`
      operationId: updateConnection
      parameters:
        - $ref: '#/components/parameters/ConnectionSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionUpdate'
            example:
              enabled: false
              timeoutSeconds: 60
      responses:
        '200':
          description: The updated connection.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Connection'
              example:
                data:
                  id: 3f0c2a9e-0000-4000-8000-000000000001
                  slug: github-prod
                  name: GitHub Production
                  enabled: false
                  timeoutSeconds: 60
                  updatedAt: '2026-01-02T00:00:00Z'
        '400':
          description: >-
            An auth type the gateway does not apply, or invalid auth or header
            config.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Missing permission, or `bodyRetentionDays` exceeds your plan's
            retention limit.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError'
                  - $ref: '#/components/schemas/PlanError'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ZodValidationFailed'
components:
  parameters:
    ConnectionSlug:
      name: slug
      in: path
      required: true
      description: The connection's slug.
      schema:
        type: string
        example: github-prod
  schemas:
    ConnectionUpdate:
      type: object
      description: All fields are optional. `null` clears a nullable field.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        description:
          type:
            - string
            - 'null'
          maxLength: 2000
        upstreamUrl:
          type:
            - string
            - 'null'
          format: uri
        authType:
          type: string
          enum:
            - none
            - bearer
            - header
            - api_key
        authHeaderName:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
        credential:
          type: string
          minLength: 1
          maxLength: 8192
        customHeaders:
          type:
            - object
            - 'null'
          description: Merged into the stored headers. A `null` value removes that header.
          additionalProperties:
            type:
              - string
              - 'null'
        enabled:
          type: boolean
        llmProvider:
          type:
            - string
            - 'null'
        customBaseUrl:
          type:
            - string
            - 'null'
          format: uri
        allowedModels:
          type:
            - array
            - 'null'
          items:
            type: string
        logFullContent:
          type: boolean
        bodyRetentionDays:
          type: integer
          minimum: 1
          maximum: 1095
        anomalyConfig:
          type:
            - object
            - 'null'
        authConfig:
          type:
            - object
            - 'null'
        timeoutSeconds:
          type: integer
          minimum: 1
          maximum: 300
        retries:
          type: integer
          minimum: 0
          maximum: 5
        rateLimitRpm:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 100000
        denyByDefault:
          type: boolean
        logSampling:
          type: string
          enum:
            - all
            - 10pct
            - 1pct
            - errors_only
    Connection:
      type: object
      description: >
        A connection. Credentials are never returned. Custom header values come
        back blank (names only).
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        serverType:
          type: string
          enum:
            - http
            - llm
        upstreamUrl:
          type:
            - string
            - 'null'
        authType:
          type: string
          enum:
            - none
            - bearer
            - header
            - api_key
        authHeaderName:
          type:
            - string
            - 'null'
        customHeaders:
          type:
            - object
            - 'null'
          description: Header names, with every value blanked to `""`.
          additionalProperties:
            type: string
        keyVersion:
          type: integer
        enabled:
          type: boolean
        llmProvider:
          type:
            - string
            - 'null'
        customBaseUrl:
          type:
            - string
            - 'null'
        allowedModels:
          type:
            - array
            - 'null'
          items:
            type: string
        logFullContent:
          type: boolean
        bodyRetentionDays:
          type: integer
        anomalyConfig:
          type:
            - object
            - 'null'
        authConfig:
          type:
            - object
            - 'null'
        timeoutSeconds:
          type: integer
        retries:
          type: integer
        rateLimitRpm:
          type:
            - integer
            - 'null'
        denyByDefault:
          type: boolean
        logSampling:
          type: string
          enum:
            - all
            - 10pct
            - 1pct
            - errors_only
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
    PlanError:
      type: object
      description: Plan limit or plan feature errors. See Limits and errors.
      properties:
        error:
          type: string
          example: PLAN_LIMIT_REACHED
        code:
          type: string
          example: PLAN_LIMIT_REACHED
        feature:
          type: string
        detector:
          type: string
          description: The detector your plan does not include.
        limit:
          type: string
        current:
          type: integer
        max:
          type: integer
        plan:
          type: string
        currentPlan:
          type: string
        upgradeTo:
          type: string
    ZodValidationError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            name:
              type: string
              example: ZodError
            message:
              type: string
              description: JSON string of the validation issues.
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
    ZodValidationFailed:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ZodValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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