Sending email

Marketing campaigns

Send to your lists and segments, with consent and the unsubscribe footer handled for you.

A campaign goes to the people on your lists and segments, the same as a campaign made in the app (it shows in the app's Campaigns list too). YouSendIt sends only to people who subscribed, skips anyone who unsubscribed, opted out of the campaign's topic or is suppressed, and adds the unsubscribe footer with your postal address and one-click unsubscribe headers.

You need the campaigns:write permission, contacts on lists or segments, a postal address under Settings → Account, and a payment method.

Create, then send

POST/campaigns creates a draft from from (one of your sender addresses), subject, html and send_to (up to 15 list or segment ids; exclude takes up to 15 more). POST/campaigns/{id}/send sends it, now or at scheduled_at (up to 365 days ahead).

Create and send a campaign with curl
curl -X POST https://yousendit.io/api/v1/campaigns \
  -H "Authorization: Bearer $YOUSENDIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Spring sale",
    "from": "news@acme.com",
    "subject": "Spring sale, {{ first_name }}",
    "html": "<html><body><p>Hi {{ first_name }}, 20% off this week.</p></body></html>",
    "send_to": ["<list or segment id>"]
  }'
# → { "object": "campaign", "id": "c2a1…", "status": "draft", … }

curl -X POST https://yousendit.io/api/v1/campaigns/c2a1…/send \
  -H "Authorization: Bearer $YOUSENDIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "scheduled_at": "2026-03-02T09:00:00-05:00" }'
# → { "status": "scheduled", "recipients": 1840, … }

Personalization and checks

Merge tags such as {{ first_name }} are filled in for each recipient. The HTML is checked like an email made in the app: anything that cannot be sent safely (scripts, forms, event handlers) is refused with a 422 that lists what to change. Nothing is ever removed without telling you.

After sending

A campaign is sent once: sending it again is a 409. Cancel puts a scheduled campaign back to draft, or stops one that is sending (that is final). Follow its numbers with GET/campaigns/{id} and see the full report in the app. To reach more than 15 lists, make a segment that combines them.