/
API, CLI & UI Deliverables

API, CLI & UI Deliverables

This document identifies API endpoints and UI aspects that need to be implemented to enable complete data export and import functionality.

Mautic currently lacks comprehensive API endpoints for exporting campaign-related data types. This limits our customers' ability to:

  • Back up their data

  • Migrate to other systems and share best practice

  • Perform advanced analytics using external tools

Missing API and CLI endpoints

Endpoint / command

Purpose

Endpoint / command

Purpose

/api/export/entity/campaign&id=123&file=zip

bin/console mautic:entity:export campaign --id=1 --zip-file

bin/console mautic:entity:export campaign --id=1 --json-file

Command line has the ability to export a campaign or any specific entity

Export the campaign specified by the ID and file type

/api/import/campaign&file=$.zip&user=1

bin/console mautic:campaign:import --file=campaign_data.zip --user=1

Import the specified campaign using the attached file and assigning the audity trail action to the specified user id

Additional UI

Export

Screenshot 2025-03-07 at 12.16.20.png
  • Modify existing screens to add the export command once the user has selected at least one campaign, and had appropriate permissions

Import

import-ui.png
  • Provide a separate screen for users to select the campaign file to import into their instance

  • Mimic the screen design used for contact import for consistency

Related content