openapi: 3.2.0 info: title: mcpgate-backend Support Admin API version: 0.4.20 tags: - name: support-admin paths: /admin/support/active: get: tags: - support-admin summary: List Active operationId: list_active_admin_support_active_get parameters: - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ActiveCustomersResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /admin/support/sessions: get: tags: - support-admin summary: List Sessions description: 'Paginated listing of every support session ever recorded. Companion to ``/active`` which only shows the live slice. This endpoint surfaces history for audit, sales, and billing — closed sessions stay forever per D33 retention.' operationId: list_sessions_admin_support_sessions_get parameters: - name: customer in: query required: false schema: anyOf: - type: string - type: 'null' title: Customer - name: state in: query required: false schema: anyOf: - type: string pattern: ^(active|idle|closed)$ - type: 'null' title: State - name: limit in: query required: false schema: type: integer maximum: 200 minimum: 1 default: 50 title: Limit - name: offset in: query required: false schema: type: integer minimum: 0 default: 0 title: Offset - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /admin/support/sessions/{session_id}: get: tags: - support-admin summary: Get Session Detail description: 'Per-session detail. Returns full session row + the linked instance metadata + every message text. ``initial_message`` is nulled out after the D33 retention window so a returned None just means "old session".' operationId: get_session_detail_admin_support_sessions__session_id__get parameters: - name: session_id in: path required: true schema: type: integer minimum: 1 title: Session Id - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ActiveCustomerRow: properties: customer_id: type: string title: Customer Id display_name: type: string title: Display Name instance_url: type: string maxLength: 2083 minLength: 1 format: uri title: Instance Url session_id: type: integer title: Session Id started_at: type: string format: date-time title: Started At expires_at: type: string format: date-time title: Expires At unread_count: type: integer title: Unread Count type: object required: - customer_id - display_name - instance_url - session_id - started_at - expires_at - unread_count title: ActiveCustomerRow ActiveCustomersResponse: properties: active: items: $ref: '#/components/schemas/ActiveCustomerRow' type: array title: Active type: object required: - active title: ActiveCustomersResponse ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError