POST Generate Email Body
Generate a complete email — subject suggestions, preview text, and body — from a short brief. This is what the “Write with AI” button in the campaign editors calls.
tone and length are validated against a fixed list and silently fall back to friendly / medium when the value is not recognised, so an unexpected value never fails the request.
Body sanitisation depends on context.output_format: gutenberg_blocks is filtered with filter_block_content(), anything else with wp_kses_post().
The call blocks for up to 45 seconds while the provider responds.
Required capability: fcrm_manage_emails
Enforced by AiPolicy::generateEmailBody().
Authorizations
WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password
Request Body
Responses
Generated email content.