Skip to main content
PATCH
/
mcp-gateway
/
modify-gateway
curl --request PATCH \
  --url https://api.enkryptai.com/mcp-gateway/modify-gateway \
  --header 'Content-Type: application/json' \
  --header 'X-Enkrypt-MCP-Gateway: <x-enkrypt-mcp-gateway>' \
  --header 'apikey: <api-key>' \
  --data '
{
  "servers_config": {
    "servers": [
      {
        "saved_name": "my-filesystem-server",
        "server_version": "v1",
        "input_guardrails_config": {
          "enabled": true,
          "guardrail_name": "Updated Guardrail",
          "block": [
            "topic_detector",
            "nsfw",
            "keyword_detector"
          ]
        }
      }
    ]
  }
}
'
{
  "message": "<string>",
  "data": {
    "gateway_saved_name": "<string>",
    "gateway_version": "<string>",
    "servers_config": {
      "common_overrides": {
        "input_guardrails_config": {
          "enabled": true,
          "guardrail_name": "<string>",
          "additional_config": {},
          "block": []
        },
        "output_guardrails_config": {
          "enabled": true,
          "guardrail_name": "<string>",
          "additional_config": {},
          "block": []
        },
        "server_tools_guardrails_config": {
          "enabled": true,
          "guardrail_name": "<string>",
          "additional_config": {},
          "block": []
        }
      },
      "servers": [
        {
          "saved_name": "<string>",
          "server_version": "v1",
          "input_guardrails_config": {
            "enabled": true,
            "guardrail_name": "<string>",
            "additional_config": {},
            "block": []
          },
          "output_guardrails_config": {
            "enabled": true,
            "guardrail_name": "<string>",
            "additional_config": {},
            "block": []
          }
        }
      ]
    },
    "gateway_id": "<string>",
    "project_name": "<string>",
    "is_active": true,
    "is_sample": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-MCP-Gateway
string
required

Gateway saved_name

Maximum string length: 32
Example:

"my-dev-gateway"

X-Enkrypt-MCP-Gateway-Version
string
default:v1

Gateway version (defaults to "v1")

Example:

"v1"

Body

application/json

Partial-update payload. servers_config is deep-merged onto the persisted config — keys you don't send are left untouched. See the /mcp-gateway/modify-gateway operation description for full semantics (null means delete; the servers array is keyed by saved_name + server_version with _delete: true for removal; guardrails policies replace as a unit while additional_config deep-merges).

servers_config
object

Partial servers_config. Keys not present are left untouched. null at any level deletes that key. The servers array is upserted by (saved_name, server_version); send _delete: true on an entry to remove it. Per-server entries in this PATCH context additionally accept _delete: true (boolean), which is not part of the persisted shape.

is_active
boolean

Toggle the gateway's active state.

is_sample
boolean

Mark this gateway as a sample.

Response

Gateway updated successfully

message
string

Response message

data
object