Articles in this section

How to Send Campaigns to Dynamic Audiences

Published:

Overview

Send to Segment (POST /api/v1/send-segment) allows you to send emails to a dynamic group of contacts based on defined criteria. Instead of manually selecting recipients, you create a segment once, and MailerLogic automatically finds all matching contacts at the time of sending.

This feature is ideal for newsletters, marketing campaigns, product announcements, event invitations, drip campaigns, and re-engagement emails.

Check the API documentation on this here.


How It Works

Step 1: Create a Segment

Define your audience using filters such as:

  • Contact status

  • Tags

  • Location

  • Engagement activity

  • Date fields

  • Custom properties

Example segment:

{ "name": "Newsletter Subscribers", "match_type": "all", "filters": [ { "field": "status", "operator": "equals", "value": "subscribed" }, { "field": "tags", "operator": "contains", "value": "newsletter" } ] }

Create segment:

POST /api/v1/customer/segments

Step 2: Send to the Segment

POST /api/v1/send-segment { "segment_id": "seg_newsletter_001", "from_email": "newsletter@yourbrand.com", "from_name": "Your Brand", "subject": "Weekly Update for {{first_name}}", "html": "<h1>Hello {{first_name}}</h1><p>Here’s what’s new...</p>", "track_opens": true, "track_clicks": true }

MailerLogic automatically:

  • Finds all contacts matching the segment

  • Personalizes content using merge tags

  • Respects unsubscribe preferences

  • Skips bounced or invalid emails

  • Tracks opens and clicks


Common Use Cases

1. Newsletters

Send weekly or monthly updates to subscribers with a specific tag or status.

2. Product Announcements

Target active customers or specific plan types.

3. Re-Engagement Campaigns

Send to users who have not opened emails in a defined time period.

4. Event Invitations

Target contacts by city, state, or country.

5. Behavioral Campaigns

Send to users who signed up recently but have not completed onboarding.

6. VIP Communications

Target high-value customers using tags or lifetime value filters.


Personalization with Merge Tags

You can dynamically personalize content:

<h1>Hello {{first_name}}</h1> <p>Your plan: {{plan_type}}</p> <p>Member since: {{created_at}}</p>

Conditional content is also supported:

{{#if premium_member}} <p>You have early access to this feature.</p> {{else}} <p>Upgrade to premium for early access.</p> {{/if}}

Best Practices

  • Always filter by status = subscribed

  • Send a test email before sending to the full segment

  • Enable open and click tracking

  • Avoid over-emailing the same segment

  • Keep segments specific and well-defined

  • Review engagement metrics after each send


When Not to Use Send to Segment

Use other endpoints for:

  • Transactional emails (POST /api/v1/send)

  • One-off personal emails

  • Security alerts or time-sensitive notifications

  • Emails requiring completely different content per recipient (POST /api/v1/batch)


API Summary

Create Segment

POST /api/v1/customer/segments

Send to Segment

POST /api/v1/send-segment

Check Segment Details

GET /api/v1/customer/segments/{segment_id}

Email Usage & Limits

Emails sent via segments count toward your monthly email limit based on the actual number of contacts matched at send time.

Example:
If your segment contains 5,000 contacts, sending one campaign uses 5,000 emails from your monthly quota.


Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied