Email Document State API
Create an email model from HTML and CSS, read and update its document state, and get the JSON Schema of the document state, all without opening the editor.
The document state is the JSON representation of the email content and styles, the same structure the editor works with. Fetch the schema from the schema method and validate your document states against it instead of relying on a fixed copy: the schema evolves together with the editor.
All methods require a plugin token with the API role. The email is identified
by the ES-PLUGIN-UI-DATA header, which carries a URL-encoded JSON object with
the emailId, the same value you pass in metadata on editor initialization.
The schema method does not need this header.
When the Email Resources Permissions API is enabled in your plugin settings,
Stripo asks your endpoint for an EMAIL permission before every email operation:
READ for reading the document state and MODIFY for updating it and for creating
an email. MODIFY does not imply READ.