Skip to main content

Chains API

Chains are individual scheduled emails within a trigger. Each chain specifies which template to send, when to send it, and optional coupon/cross-sell settings. All endpoints require authentication.

Chain object

FieldTypeDescription
idIntUnique identifier (read-only)
trigger_idIntParent trigger ID
template_idStringEmail template in emaildesigner:{id} format
dayIntDays after the trigger event to send this email
hourIntHour of day to send (0–23)
minuteIntMinute of hour to send (0–59)
send_fromIntEarliest time of day to send, in minutes past midnight (e.g. 480 = 8:00 AM); 0 = no restriction
send_toIntLatest time of day to send, in minutes past midnight (e.g. 1200 = 8:00 PM); 0 = no restriction
exclude_daysString[]Days of the week to skip: "Sunday", "Monday", etc. (may be absent if empty)
cross_sells_enabledBooleanWhether to include cross-sell products
cross_sells_type_idStringCross-sell product source: mage_cross = cross-sells, mage_related = related products, mage_upsells = upsells; "" when disabled
cross_sell_method_nameStringResolved PHP method name for the cross-sell type (read-only — do not send on POST/PUT)
coupon_enabledBooleanWhether to auto-generate a coupon code
coupon_sales_rule_idIntCart price rule ID for coupon generation
coupon_expires_daysIntDays until the generated coupon expires
created_atStringCreation timestamp (read-only)
updated_atStringLast update timestamp (read-only)

template_id uses the emaildesigner:{id} format — for example emaildesigner:3. Retrieve available template IDs from the Templates endpoint.

List chains

GET /rest/V1/mst-email/chains

Filter by trigger to get all chains for a specific trigger:

GET /rest/V1/mst-email/chains
?searchCriteria[filter_groups][0][filters][0][field]=trigger_id
&searchCriteria[filter_groups][0][filters][0][value]=5
&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Supports filtering and pagination.

Get chain

GET /rest/V1/mst-email/chains/:id

Response:

{
"id": 12,
"trigger_id": 5,
"template_id": "emaildesigner:3",
"day": 1,
"hour": 10,
"minute": 0,
"send_from": 480,
"send_to": 1200,
"exclude_days": ["Saturday", "Sunday"],
"cross_sells_enabled": false,
"cross_sells_type_id": "",
"cross_sell_method_name": null,
"coupon_enabled": true,
"coupon_sales_rule_id": 4,
"coupon_expires_days": 7,
"created_at": "2026-02-01 10:05:00",
"updated_at": "2026-04-10 09:00:00"
}

Errors: 404 chain not found.

Create chain

POST /rest/V1/mst-email/chains

Request body:

{
"chain": {
"trigger_id": 5,
"template_id": "emaildesigner:3",
"day": 1,
"hour": 10,
"minute": 0,
"send_from": 0,
"send_to": 0,
"exclude_days": [],
"cross_sells_enabled": false,
"cross_sells_type_id": "",
"coupon_enabled": false,
"coupon_sales_rule_id": 0,
"coupon_expires_days": 0
}
}

Response: the created chain object with id assigned.

Update chain

PUT /rest/V1/mst-email/chains/:id

PUT is a partial update — send only the fields you want to change; omitted fields retain their current values.

Request body: same structure as Create chain.

Response: the updated chain object.

Errors: 404 chain not found.

Delete chain

DELETE /rest/V1/mst-email/chains/:id

Response:

true

Errors: 404 chain not found.

Duplicate chain

POST /rest/V1/mst-email/chains/:id/duplicate

No request body required.

Response: the newly created chain object.

Errors: 404 source chain not found.