API ReferenceMarketing EmailSend Marketing Email

    Send Marketing Email

    The Marketing Email API (MAPI) is designed for promotional content, newsletters, and large-scale campaigns. It includes built-in compliance checks and asynchronous queue-based processing.

    Use credentials created in the region selected above. Changing the documentation region updates examples; it does not move your account or resources.

    POSThttps://mapi.simplysend.email/send

    Parameters

    toRequired
    string
    Email address of the recipient.
    fromRequired
    string
    The sender email address (must be a verified domain). e.g. `"Acme Newsletters" <[email protected]>` or `[email protected]`
    subjectRequired
    string
    The subject line for the email.
    htmlRequired
    string
    HTML body content. Include required template variables. The 2 MiB maximum applies to the complete email, including HTML, text, subject, headers, and other message fields; it is not a 2 MiB allowance for HTML alone. See the compliance template guidance below.
    string
    Optional identifier for the application, service, device, or instance making the send. Use it to tell calls apart when credentials are shared; it appears on each email event in analytics. Do not include personal, confidential, or sensitive information. Use 1–128 ASCII letters or digits only (A–Z, a–z, 0–9).
    array (unsupported)
    Not supported for marketing email. Do not include this field in a marketing send request; a non-empty attachments array is rejected.
    string

    The ID of the subscription group to route the email through.

    If provided, recipients must be actively subscribed to this group to receive the email. The system automatically filters out unsubscribed, bounced, or complaining addresses to safeguard compliance and deliverability.

    If omitted, the email is sent without group-level constraints, performing global contact status checks directly.

    string
    The plain text version of the email for clients that don't support HTML.
    string
    Email address for replies. e.g. `[email protected]` or `"Acme Support" <[email protected]>`
    object

    Custom headers to include in the email. e.g. { "X-Entity-ID": "user_12345", "X-Feedback-ID": "marketing_abc" }

    Note: List-Unsubscribe is automatically injected by the system.

    object

    Key-value pairs for dynamic content injection. e.g. { "first_name": "John", "discount_code": "WELCOME20" }

    These can be referenced in your HTML or text body using double curly braces, e.g. {{first_name}}.

    boolean

    Wrap all links in the email with click-tracking redirect URLs so each click is recorded as an email_clicked event. Defaults to false.

    Optional custom link redirection tracking subdomain (typically [region]-m-link.yourdomain.com, e.g. us-m-link.yourdomain.com). If verified and configured, links in the email body will be wrapped using this custom subdomain. If not verified, click tracking will fall back to using the default Simply Send tracking domain. Custom link configuration is per domain.

    boolean

    Inject a 1x1 transparent tracking pixel to record Open events. Defaults to false.

    Enables open tracking for this email.

    string

    Associate the emails with a campaign. Create the campaign first using the SimplySend UI. Email analytics events (send, delivery, open, click, bounce, etc.) are recorded against the campaign Id.

    header string

    A unique UUID string used to make the request idempotent. If the system receives a duplicate request with the same key within a 24-hour window, it returns the cached original response without processing the email send again.

    Concurrent duplicate requests will return a 409 Conflict status.

    RequestPOST

    Async response: A normal marketing send returns 202 with a jobId, queued status, and recipient list. Email Events records created for the same tracked request share that job ID, including suppressed or failed records. Tracked error responses include it in error.details.jobId; an error before a request can be tracked may not include one. When some recipients are suppressed and others are queued, the status is partial and each recipient has its own status. If an eligible send failure is accepted for retry or review, the 202 response includes the job ID, recipient email IDs, and pending status. Do not resubmit the accepted request. See email send retries.

    Permission-Based Marketing

    All recipients MUST have valid consent records. If a recipient lacks valid consent or has unsubscribed, the API will reject the send request.

    Auto-Injected Headers

    List-Unsubscribe & List-Unsubscribe-Post

    The system automatically injects required RFC 8058 compliant headers (with one-click unsubscribe support) unless explicitly overridden in the request payload.

    Compliance Templates