Anyone got sendChatMessage to work?

Using the Jitsi Meet API I want to programmatically send a message to all in a Jitsi room but sendChatMessage does not seem to work.
I tried:-

  1. api.executeCommand(‘sendChatMessage’, message:‘Hi all’, to:’’, ignorePrivacy:false);
    but I get an error with a missing ).
  2. api.executeCommand(‘sendChatMessage’, ‘Hi all’, ‘’, false); gives no error but nothing appears in the Chat.
  3. I tried a json kinda format with {} but nothing.
    Can you share a working example?
    Many thanks