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

# Update an auth

> Updates an existing auth.



## OpenAPI

````yaml /trustgate/api/openapi.json put /v1/gateways/{gateway_id}/auths/{id}
openapi: 3.0.0
info:
  description: >-
    Administrative API for managing gateways and their registries, policies,
    consumers, roles and auth credentials.
  title: TrustGate Admin API
  contact:
    name: NeuralTrust
    url: https://neuraltrust.ai/contact
    email: support@neuraltrust.ai
  version: '1.0'
servers:
  - url: https://agentgateway-admin.dev.neuraltrust.ai
    description: Admin API
security: []
paths:
  /v1/gateways/{gateway_id}/auths/{id}:
    put:
      tags:
        - auths
      summary: Update an auth
      description: Updates an existing auth.
      parameters:
        - description: Gateway id
          name: gateway_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: Auth id
          name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.UpdateAuthRequest
        description: Auth fields to update
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.AuthResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_helpers.ErrorBody
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_helpers.ErrorBody
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_helpers.ErrorBody
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_helpers.ErrorBody
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.UpdateAuthRequest:
      type: object
      properties:
        config:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.ConfigRequest
        enabled:
          type: boolean
        name:
          type: string
        type:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.AuthResponse:
      type: object
      properties:
        api_key:
          description: '#nosec G101'
          type: string
        config:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.ConfigResponse
        created_at:
          type: string
        enabled:
          type: boolean
        gateway_id:
          type: string
        id:
          type: string
        name:
          type: string
        type:
          type: string
        updated_at:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_helpers.ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.ConfigRequest:
      type: object
      properties:
        mtls:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.MTLSConfigRequest
        oauth2:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.OAuth2ConfigRequest
        oidc:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.OIDCConfigRequest
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.ConfigResponse:
      type: object
      properties:
        mtls:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.MTLSConfigResponse
        oauth2:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.OAuth2ConfigResponse
        oidc:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.OIDCConfigResponse
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.MTLSConfigRequest:
      type: object
      properties:
        allowed_common_names:
          type: array
          items:
            type: string
        allowed_dns_names:
          type: array
          items:
            type: string
        allowed_fingerprints:
          type: array
          items:
            type: string
        ca_cert:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.OAuth2ConfigRequest:
      type: object
      properties:
        allowed_algorithms:
          type: array
          items:
            type: string
        audiences:
          type: array
          items:
            type: string
        client_id:
          type: string
        client_secret:
          type: string
        introspection_url:
          type: string
        issuer:
          type: string
        jwks_url:
          type: string
        required_scopes:
          type: array
          items:
            type: string
        session_mode:
          type: boolean
        subject_claim:
          type: string
        userinfo_url:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_request.OIDCConfigRequest:
      type: object
      properties:
        allowed_algorithms:
          type: array
          items:
            type: string
        audiences:
          type: array
          items:
            type: string
        issuer:
          type: string
        jwks_url:
          type: string
        public_keys:
          type: array
          items:
            type: string
        required_scopes:
          type: array
          items:
            type: string
        subject_claim:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.MTLSConfigResponse:
      type: object
      properties:
        allowed_common_names:
          type: array
          items:
            type: string
        allowed_dns_names:
          type: array
          items:
            type: string
        allowed_fingerprints:
          type: array
          items:
            type: string
        ca_cert:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.OAuth2ConfigResponse:
      type: object
      properties:
        allowed_algorithms:
          type: array
          items:
            type: string
        audiences:
          type: array
          items:
            type: string
        client_id:
          type: string
        client_secret:
          type: string
        introspection_url:
          type: string
        issuer:
          type: string
        jwks_url:
          type: string
        required_scopes:
          type: array
          items:
            type: string
        session_mode:
          type: boolean
        subject_claim:
          type: string
        userinfo_url:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth_response.OIDCConfigResponse:
      type: object
      properties:
        allowed_algorithms:
          type: array
          items:
            type: string
        audiences:
          type: array
          items:
            type: string
        issuer:
          type: string
        jwks_url:
          type: string
        public_keys:
          type: array
          items:
            type: string
        required_scopes:
          type: array
          items:
            type: string
        subject_claim:
          type: string
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````