To use the Campaigns API, install the @wix/email-marketing package using npm or Yarn:
@wix/email-marketing
or
Then import { campaigns } from @wix/email-marketing:
{ campaigns }