code: public void sendUserEvent(KeyValueCollection userData, String callUuid, String connId) throws WorkspaceApiException {
          try {
              SendUserEventDataData sendUserEventData = new SendUserEventDataData();
              sendUserEventData.setUserData(Util.toKVList(userData));
              sendUserEventData.setCallUuid(callUuid);
              sendUserEventData.setConnId(connId);
  
              SendUserEventData data = new SendUserEventData();
              data.data(sendUserEventData);
  
              ApiSuccessResponse response = this.voiceApi.sendUserEvent(data);
              throwIfNotOk("sendUserEvent", response);
          } catch (ApiException e) {
              throw new WorkspaceApiException("sendUserEvent failed.", e);
          }
      }
docs: Send EventUserEvent to T-Server with the provided attached data. For details about EventUserEvent, refer to the
  [*Genesys Events and Models Reference Manual*](https://docs.genesys.com/Documentation/System/Current/GenEM/SpecialEvents).
  @param userData The data to send. This is an array of objects with the properties key, type, and value.
  @param callUuid The universally unique identifier associated with the call. (optional)
  @param connId  The connection ID for the call. This value comes from the Tlib event. (optional)