Create Email/SMS Record

Ingest email, SMS, and direct mail marketing data into Triple Whale. This endpoint accepts campaign, flow, and message attributes along with performance metrics.

📘

How to Update a Custom Email/SMS Record

To update a custom email/SMS record, resend the record with all of the following fields exactly matching the original:

shop, account_id (if used), campaign_type, event_date, campaign.id, flow_action.id, message.id, message.variation

All other fields will be overwritten with the newly sent values.

Body Params
string
required

The exact Shop URL (e.g., 'example.myshopify.com'). Must match the Shop URL value shown in Settings → Store. Must not contain /. The credential owner must also have access to the shop, otherwise the request will return 403.

string
required

The currency used for reporting (e.g., 'USD').

date
required

The date the activity occurred, in the merchant's local timezone. Must be a valid date string (e.g., YYYY-MM-DD or an ISO datetime).

string
Defaults to directmail

The marketing medium for the message. Maps to channel_type in the Email/SMS table. The sending provider itself is derived from your credential, not from this field.

string

Your platform's account identifier for this merchant. Defaults to a provider-level value if not provided.

string
enum
Defaults to campaign

Indicates whether the record describes a one-time campaign or an automated flow. campaign = one-time send; flow = automated/triggered series. Maps to report_type in the Email/SMS table. Defaults to campaign if not provided.

Allowed:
campaign
object

Attributes of the campaign. At least one of campaign, flow_action, message, or metrics is required.

flow_action
object

Attributes of a step within an automated flow, used when campaign_type is flow. At least one of campaign, flow_action, message, or metrics is required.

message
object

Attributes of an individual message or creative variant. At least one of campaign, flow_action, message, or metrics is required.

metrics
object

Performance metrics for the record. All fields are optional; send only the values you have. Triple Whale derives ratios such as ROAS, AOV, and cost-per-conversion from these raw counts and amounts.

date-time

The time at which the record was last updated on your side. Must be provided in ISO 8601 format, with explicit timezone information (Z or +/-HH:mm offset). Defaults to the current time.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json