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

# Delete MCP Gateway

> Soft delete an MCP gateway (sets is_deleted flag). Requires X-Enkrypt-MCP-Gateway header.



## OpenAPI

````yaml DELETE /mcp-gateway/delete-gateway
openapi: 3.0.0
info:
  title: Enkrypt AI APIs
  version: 2.0.0
servers:
  - url: https://api.enkryptai.com
security:
  - apiKeyAuth: []
tags:
  - name: Guardrails
  - name: Code of Conduct
  - name: Endpoints
  - name: Redteam
    description: >-
      Red Team API: submit red-team / threat-modeling / playground / eval runs,
      then poll run status, records, results and compliance. Also two-phase
      threat modeling (categories + data), dataset retrieval, model health,
      findings and risk mitigation. The previous task-based Red Team API is
      under **Archived**.
  - name: Deployments
  - name: AI Proxy
  - name: Leaderboard
  - name: Archived
  - name: MCP Hub
    description: >-
      MCP Hub vulnerability scanning APIs. Submitting scans (the POST endpoints)
      is open to all authenticated callers. The scan **retrieval** APIs — Get
      Scan Job Status, Get Complete Scan Results, List Scans, and Get MCP Hub
      Scan Statistics (the GET endpoints) — are an **enterprise data-license
      feature**: they require your organization to have MCP Hub API access
      enabled by Enkrypt, otherwise they return `403`. Contact us at
      support@enkryptai.com to enable access.
  - name: MCP Registry Servers
  - name: MCP Gateways
  - name: MCP Playground
  - name: Skill Scanner
    description: >-
      Skill Scanner APIs: submit an agent skill (a directory inside a git
      repository) for security scanning, then read the verdict, the risk level
      and the full report. Scanning is asynchronous — a scan takes roughly 30–90
      seconds, so `POST /skill-hub/scan` returns a `scan_id` you poll.


      You see your organization's scans and nobody else's. The identity comes
      from your API key, never from your request — sending `user_email` is a
      `400`.


      For an organization or project API key, scans are filed under the
      **organization**, so every member sees every scan the organization has
      run, whichever project or member submitted it. For an individual account
      it is simply your own scans. Either way List Skill Scans needs no
      parameter to say who you are.
  - name: Compliance
    description: >-
      Compliance APIs: connect a ChatGPT Enterprise workspace, then keep reading
      its compliance logs and scanning every message through one of your saved
      guardrails.


      Every endpoint here — reads as well as writes — requires the **governance
      officer** role on the project your API key belongs to. The organization
      owner is **not** exempt: an owner who has not been granted the role gets
      `403` like anyone else. An individual (non-organization) account cannot
      hold the role at all, so compliance is an organization-only feature today.


      A scan is addressed by name in the `X-Enkrypt-Scan` header, within the
      project its API key belongs to. Message text is never stored: Get
      Compliance Message fetches it live from the provider, and only while the
      provider still holds it.
paths:
  /mcp-gateway/delete-gateway:
    delete:
      tags:
        - MCP Gateways
      summary: Delete MCP Gateway
      description: >-
        Soft delete an MCP gateway (sets is_deleted flag). Requires
        X-Enkrypt-MCP-Gateway header.
      operationId: deleteGateway
      parameters:
        - $ref: '#/components/parameters/MCPGatewayGatewayHeader'
        - $ref: '#/components/parameters/MCPGatewayGatewayVersionHeader'
      responses:
        '200':
          description: Gateway deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPGatewayResponseObject'
        '400':
          $ref: '#/components/responses/MCPGatewayBadRequest'
        '401':
          $ref: '#/components/responses/MCPGatewayUnauthorized'
        '403':
          $ref: '#/components/responses/MCPGatewayForbidden'
        '404':
          $ref: '#/components/responses/MCPGatewayNotFound'
        '500':
          $ref: '#/components/responses/MCPGatewayInternalError'
components:
  parameters:
    MCPGatewayGatewayHeader:
      name: X-Enkrypt-MCP-Gateway
      in: header
      required: true
      description: Gateway saved_name
      schema:
        type: string
        maxLength: 32
        example: my-dev-gateway
    MCPGatewayGatewayVersionHeader:
      name: X-Enkrypt-MCP-Gateway-Version
      in: header
      required: false
      description: Gateway version (defaults to "v1")
      schema:
        type: string
        default: v1
        example: v1
  schemas:
    MCPGatewayResponseObject:
      type: object
      properties:
        message:
          type: string
          description: Response message
        data:
          $ref: '#/components/schemas/MCPGatewayObject'
    MCPGatewayObject:
      type: object
      properties:
        gateway_saved_name:
          type: string
          description: User-given name for the gateway
        gateway_version:
          type: string
          description: Gateway version
        servers_config:
          $ref: '#/components/schemas/MCPGatewayServersConfig'
        gateway_id:
          type: string
          description: Hashed gateway ID
        project_name:
          type: string
          description: Project name
        is_active:
          type: boolean
          description: Whether the gateway is enabled (distinct from is_deleted)
        is_sample:
          type: boolean
          description: Whether this is a sample gateway
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        created_by:
          type: string
          format: uuid
          nullable: true
          description: User ID who created this gateway
        updated_by:
          type: string
          format: uuid
          nullable: true
          description: User ID who last updated this gateway
    MCPGatewayErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
    MCPGatewayServersConfig:
      type: object
      properties:
        common_overrides:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayCommonOverrides'
          description: >-
            Gateway-wide overrides applied to every server in this gateway.
            **`common_overrides` always wins** — for any key set here, the same
            key on a per-server entry in `servers` is ignored at expansion time.
            Common and per-server can both be persisted, but for any given key
            common takes precedence.
        servers:
          type: array
          items:
            $ref: '#/components/schemas/MCPGatewayServerReference'
          description: >-
            Array of server references with optional per-server overrides. A
            per-server override is only effective for keys that
            `servers_config.common_overrides` does not also set; common always
            wins on conflict.
    MCPGatewayCommonOverrides:
      type: object
      description: >-
        Gateway-level override block. Any field set here replaces the
        corresponding field on every server's base `mcp_config`. Use this to
        avoid repeating the same override on each entry in
        `servers_config.servers[]`. `input_guardrails_config` and
        `output_guardrails_config` may also be set per-server in
        `servers_config.servers[i]`; **`common_overrides` always wins on
        conflict** for those keys. `server_tools_guardrails_config` is
        gateway-wide only — there is no per-server equivalent.
      properties:
        input_guardrails_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
          description: Gateway-wide override for every server's `input_guardrails_config`.
        output_guardrails_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
          description: Gateway-wide override for every server's `output_guardrails_config`.
        server_tools_guardrails_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
          description: >-
            Gateway-wide guardrails policy applied by the MCP Gateway when it
            checks server info and tool listings for guardrails violations. The
            `input` section of the configured guardrail is what is evaluated,
            with `X-Enkrypt-Mode: prompt`. This field is only supported in
            `common_overrides` — it has no per-server equivalent and is not a
            field on the registry server's base `mcp_config`.
    MCPGatewayServerReference:
      type: object
      required:
        - saved_name
      description: >-
        Reference to a registry server with optional per-server overrides.
        `input_guardrails_config` or `output_guardrails_config` set here
        override the corresponding fields on the registry server's base
        `mcp_config` for this server only — **unless** the same key is also set
        in `servers_config.common_overrides`, in which case the common value
        wins and the per-server value is ignored. The gateway-wide
        `server_tools_guardrails_config` may only be set in `common_overrides`.
      properties:
        saved_name:
          type: string
          description: Reference to registry server saved_name
        server_version:
          type: string
          default: v1
          description: Server version to reference
        input_guardrails_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
          description: Override for the registry server's `input_guardrails_config`.
        output_guardrails_config:
          allOf:
            - $ref: '#/components/schemas/MCPGatewayGuardrailsPolicy'
          description: Override for the registry server's `output_guardrails_config`.
    MCPGatewayGuardrailsPolicy:
      type: object
      description: Guardrails configuration
      properties:
        enabled:
          type: boolean
          description: Enable guardrails enforcement
        guardrail_name:
          type: string
          description: Guardrail identifier
        additional_config:
          type: object
          additionalProperties: true
          description: Detector-specific settings
        block:
          type: array
          items:
            type: string
            enum:
              - policy_violation
              - injection_attack
              - topic_detector
              - nsfw
              - toxicity
              - pii
              - keyword_detector
              - bias
              - sponge_attack
              - adherence
              - relevancy
              - hallucination
          description: >-
            Violation types triggering rejection. Note - adherence, relevancy,
            and hallucination are typically used for output guardrails only.
  responses:
    MCPGatewayBadRequest:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayUnauthorized:
      description: Unauthorized - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayForbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
    MCPGatewayInternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MCPGatewayErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apikey

````

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