MCP Gateway
ApiSessions

Clean up expired sessions

Soft delete all expired sessions. Requires admin role. This is an API-only endpoint for programmatic access — no frontend UI currently consumes it.

POST
/api/v1/sessions/cleanup

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

access_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/sessions/cleanup"
{
  "property1": 0,
  "property2": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}