MCP Gateway
ApiSessions

Update session

Update session properties such as allowed tool names for tool scoping.

PATCH
/api/v1/sessions/{session_id}

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

Path Parameters

session_id*string
Formatuuid
access_token?|

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "server_id": "820efca4-4a15-4ab7-82fc-9e76f6d61325",
  "bundle_id": "fc6f5a67-caa1-4339-9c14-a67826143b60",
  "process_state": {},
  "external_sessions": {
    "property1": "string",
    "property2": "string"
  },
  "last_accessed_at": "2019-08-24T14:15:22Z",
  "expires_at": "2019-08-24T14:15:22Z",
  "is_active": true,
  "is_expired": true,
  "is_idle": true,
  "created_at": "2019-08-24T14:15:22Z",
  "allowed_tool_names": [
    "string"
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}