@wppconnect-team/wppconnect - v2.3.5
    Preparing search index...

    Function create

    • Create a new list and optionally add chats to it. Available when WhatsApp enables list editing for the account. Throws list_editing_not_available when the native feature is disabled.

      The color must be one of the WhatsApp palette entries - pass either its index or its hex code. Use getColorPalette to list them. When omitted, business accounts use the next available color and personal accounts leave the color unset in the native action.

      Parameters

      Returns Promise<string>

      const id = await WPP.lists.create('Family', ['number@c.us', 'number2@c.us']);
      console.log(id); // '42'

      // with an explicit color, by index or hex code
      await WPP.lists.create('Work', [], 3);
      await WPP.lists.create('Friends', [], '#64c4ff');