code: public ApiResponse<ApiSuccessResponse> mediaStartMonitoringWithHttpInfo(String mediatype, MediaStartMonitoringData mediaStartMonitoringData) throws ApiException {
          com.squareup.okhttp.Call call = mediaStartMonitoringValidateBeforeCall(mediatype, mediaStartMonitoringData, null, null);
          Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
docs: Start monitoring an agent
  Start supervisor monitoring of an agent on the specified media channel. When a monitored agent accepts a chat, the supervisor also receives the chat and all related notifications. If the agent is currently in a chat, the supervisor is added to the agent&#39;s next chat. The supervisor can&#39;t send messages in this mode and only another supervisor can see that the monitoring supervisor joined the chat. If the monitored agent leaves the chat but another agent is still present, the supervisor continues monitoring the chat until it&#39;s completed or placed in a queue. Once you&#39;ve enabled monitoring, you can change the monitoring mode using [/media/{mediatype}/interactions/{id}/switch-to-barge-in](/reference/workspace/Media/index.html#mediaSwicthToBargeIn), [/media/{mediatype}/interactions/{id}/switch-to-coach](/reference/workspace/Media/index.html#mediaSwicthToCoach), and [/media/{mediatype}/interactions/{id}/switch-to-monitor](/reference/workspace/Media/index.html#mediaSwicthToMonitor).
  @param mediatype The media channel. (required)
  @param mediaStartMonitoringData Request parameters. (optional)
  @return ApiResponse&lt;ApiSuccessResponse&gt;
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body