> ## 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 a gateway

> Updates an existing gateway. Tenant JWTs may not send entitlements (422). Platform tier downgrades that would leave the tenant over the new MaxInstances return 409 — delete excess gateways first.



## OpenAPI

````yaml /trustgate/api/openapi.json put /v1/gateways/{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: /
security: []
paths:
  /v1/gateways/{id}:
    put:
      tags:
        - gateways
      summary: Update a gateway
      description: >-
        Updates an existing gateway. Tenant JWTs may not send entitlements
        (422). Platform tier downgrades that would leave the tenant over the new
        MaxInstances return 409 — delete excess gateways first.
      parameters:
        - description: Gateway 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_gateway_request.UpdateGatewayRequest
        description: Gateway fields to update
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_gateway_response.GatewayResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_gateway_request.UpdateGatewayRequest:
      type: object
      properties:
        client_tls:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.ClientTLSConfig
        domain:
          type: string
        entitlements:
          description: >-
            Entitlements is optional; only platform admins may set it (tenant
            callers get 422).

            When omitted the gateway's entitlements are left unchanged.
            Downgrading when the tenant already

            has more gateways than the new MaxInstances returns 409 — delete
            excess first.
          allOf:
            - $ref: >-
                #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.Entitlements
        metadata:
          type: object
          additionalProperties:
            type: string
        session_config:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.SessionConfig
        slug:
          type: string
        status:
          type: string
        telemetry:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_telemetry.Telemetry
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_gateway_response.GatewayResponse:
      type: object
      properties:
        client_tls:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.ClientTLSConfig
        created_at:
          type: string
        domain:
          type: string
        entitlements:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.Entitlements
        hosts:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_gateway_response.GatewayHosts
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        session_config:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_gateway.SessionConfig
        slug:
          type: string
        status:
          type: string
        telemetry:
          $ref: >-
            #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_telemetry.Telemetry
        updated_at:
          type: string
        version:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_domain_gateway.ClientTLSConfig:
      type: object
      additionalProperties:
        type: array
        items:
          type: integer
    github_com_NeuralTrust_TrustGate_pkg_domain_gateway.Entitlements:
      type: object
      properties:
        burst_per_min:
          type: integer
        max_instances:
          type: integer
        quota_per_month:
          type: integer
        tier:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_domain_gateway.SessionConfig:
      type: object
      properties:
        body_param_name:
          type: string
        enabled:
          type: boolean
        header_name:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_domain_telemetry.Telemetry:
      type: object
      properties:
        enable_plugin_traces:
          type: boolean
        enable_request_traces:
          type: boolean
        exporters:
          type: array
          items:
            $ref: >-
              #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_domain_telemetry.ExporterConfig
        extra_params:
          type: object
          additionalProperties:
            type: string
        header_mapping:
          type: object
          additionalProperties:
            type: string
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_gateway_response.GatewayHosts:
      type: object
      properties:
        mcp:
          type: string
        proxy:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_domain_telemetry.ExporterConfig:
      type: object
      properties:
        class:
          description: >-
            Class binds the exporter to a data class, set from the group it is
            declared

            under in the defaults file. Empty for per-gateway configs.
          allOf:
            - $ref: >-
                #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_metrics.DataClass
        name:
          type: string
        settings:
          type: object
          additionalProperties: true
        type:
          type: string
    github_com_NeuralTrust_TrustGate_pkg_metrics.DataClass:
      type: string
      enum:
        - metadata
        - raw
      x-enum-varnames:
        - Metadata
        - Raw
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````