Skip to main content

Embed a Form via API

Use API embedding when you need more control than a copy-paste HTML embed gives you.

Flow

  1. Render the form in your application.
  2. Validate fields server-side.
  3. Send the submission to Mailtarget.
  4. Store consent, source, and attribution metadata.
  5. Handle the success or error state in your UI.

Do not trust browser-only validation for production lead capture or consent workflows.