contents
1{
2 "from": {
3 "email": "sender@example.com",
4 "name": "Sender Name"
5 },
6 "personalizations": [
7 {
8 "to": [
9 {
10 "email": "recipient1@example.com",
11 "name": "Recipient 1"
12 },
13 {
14 "email": "recipient2@example.com",
15 "name": "Recipient 2"
16 }
17 ],
18 "subject": "Subject of the email",
19 "substitutions": {
20 "-name-": "Recipient",
21 "-message-": "This is a sample message"
22 },
23 "custom_args": {
24 "campaign_id": "12345"
25 }
26 }
27 ],
28 "content": {
29 "template_id": "template-id-12345",
30 "use_dynamic_template": true
31 },
32 "mail_settings": {
33 "sandbox_mode": {
34 "enable": true
35 }
36 }
37}
38
This JSON payload includes the following properties:
from
: The email address and name of the sender.
personalizations
: An array of personalization objects, each containing the email address and name of the recipient, the email subject, and any substitutions or custom arguments.
content
: The content of the email, either as a template ID or as raw HTML.
mail_settings
: Configuration options for the email, such as whether to enable sandbox mode.
Note that this is just a sample payload and the actual payload may differ depending on the specific API being used.