v1
latestOpenAPI 3.1.02026-08-04170116.0 KBData In
Create Email/SMS Record
Ingest email, SMS, and direct mail marketing data into Triple Whale. This endpoint accepts campaign, flow, and message attributes together with performance metrics. The data populates the Email/SMS and Email/SMS Settings tables alongside the merchant's other email/SMS providers. Send attributes when your structure changes and metrics on your reporting cadence; both can be sent in the same call or separately.
post/data-in/email-sms
Request body
Example request
{
"shop": "acme.myshopify.com",
"currency": "USD",
"event_date": "2026-06-25",
"channel": "directmail",
"account_id": "acme-postpilot-123",
"campaign_type": "campaign",
"campaign": {
"id": "pp_camp_98765",
"name": "June Winback Postcard",
"status": "sent",
"created_at": "2026-06-20T09:00:00Z",
"updated_at": "2026-06-24T18:30:00Z",
"send_time": "2026-06-25T14:00:00Z",
"scheduled_at": "2026-06-25T13:00:00Z",
"trigger_type": "manual"
},
"flow_action": {
"id": "fa_55012",
"name": "SEND_EMAIL",
"status": "live",
"created_at": "2026-05-01T09:00:00Z",
"updated_at": "2026-06-01T09:00:00Z"
},
"message": {
"id": "pp_msg_55",
"name": "Winback Postcard 5x7",
"variation": "A",
"subject": "We miss you — 20% off inside",
"preview_text": "Your favorites are waiting",
"content": "Come back and save 20% on your next order.",
"template_html_url": "https://postpilot.com/creatives/55.png",
"created_at": "2026-06-22T09:00:00Z",
"updated_at": "2026-06-24T09:00:00Z"
},
"metrics": {
"sent": 5000,
"delivered": 4910,
"opened": 1820,
"clicks": 540,
"received": 4880,
"purchases": 92,
"conversion_value": 8400.5,
"spend": 1250,
"unsubscribed": 12,
"marked_as_spam": 3
},
"updated_at": "2026-06-25T15:30:00Z"
}Response
Email/SMS event successfully received.
Example response
{
"success": true,
"message": "Email/SMS event received"
}