Builder launch

Please follow these steps in order to launch the builder with valid pre-requisites. Endpoints were made in accordance with UI provided here, https://mailmailmail.dev.xenioo.com/ (steps for creating campaign)

Builder API on this host: Swagger UI (/documentation) — lists, templates, newsletters, launch token. Main App / CRUD (login, campaigns list): Authentication → Login user and Newsletters on the hosted Swagger.

All requests to this builder host (except login on the CRUD host) require Authorization: Bearer <access_token>. Use Builder API documentation to try builder endpoints below.

Prerequisite: Authenticate

Open the Main App API docs and use Try it out where available.

Step 1: Get lists and segments

From the returned data, select at least one list (and optionally segments) for the campaign.

Step 2: Choose one source for the campaign

Pick one of the following and get the ID (or use blank):

Step 3: Store the campaign (create newsletter)

API documentation → Newsletters → Create newsletter

Step 4: Get launch token & open the builder

Frontend: Save and Save as template from your app

If you embed the builder in an iframe and want Save and Save as template buttons in your own UI (outside the iframe), use the postMessage protocol so the parent app triggers save and receives the result. Enable those buttons only on the builder Builder tab (SAVE_STATE messages).