-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,34 +22,75 @@ description: "Send emails to your contacts, possibly after a specified time dela | |
Otherwise, the request will fail with a 400 status code. | ||
</ParamField> | ||
|
||
<ParamField body="recipients" type="array" required> | ||
|
||
Array of contacts to receive emails. The only required field is `to_email`, with the rest of the fields having fallback values that can be specified on the top level. | ||
|
||
It's possible to repeat the same contact email in the array with different `delay_in_minutes` values to create a sequence of scheduled emails for that contact (e.g. for onboarding). | ||
|
||
<Expandable title="recipients"> | ||
<ParamField body="to_email" type="string" required> | ||
The email to send to. | ||
</ParamField> | ||
|
||
<ParamField body="email_subject" type="string" required> | ||
{" "} | ||
|
||
<ParamField body="email_subject" type="string"> | ||
Subject of the email. | ||
</ParamField> | ||
|
||
<ParamField body="email_body" type="string" required> | ||
{" "} | ||
|
||
<ParamField body="email_body" type="string"> | ||
Body of the email in HTML format. | ||
</ParamField> | ||
|
||
{" "} | ||
|
||
<ParamField body="email_sender_name" type="string"> | ||
Display name of the email sender. | ||
</ParamField> | ||
|
||
<ParamField body="delay_in_minutes" type="string"> | ||
How much time (in minutes) to wait before sending the email. | ||
<ParamField body="delay_in_minutes" type="string"> | ||
How much time (in minutes) to wait before sending the email. | ||
</ParamField> | ||
</Expandable> | ||
</ParamField> | ||
|
||
<ParamField body="fallback_email_subject" type="string"> | ||
Subject of the email in case none is provided for the contact within the | ||
`recipients` array. | ||
</ParamField> | ||
|
||
<ParamField body="fallback_email_body" type="string"> | ||
Body of the email in HTML format in case none is provided for the contact | ||
within the `recipients` array. | ||
</ParamField> | ||
|
||
<ParamField body="fallback_email_sender_name" type="string"> | ||
Display name of the email sender in case none is provided for the contact | ||
within the `recipients` array. | ||
</ParamField> | ||
|
||
### Body Example | ||
|
||
```json | ||
{ | ||
"from_email": "[email protected]", | ||
"to_email": "[email protected]", | ||
"email_subject": "Hello!", | ||
"email_body": "<h1>Thanks for signing up!</h1>", | ||
"delay_in_minutes": 30 | ||
"from_email": "[email protected]", | ||
"recipients": [ | ||
{ | ||
"to_email": "[email protected]", | ||
"email_body": "BODY", | ||
"email_subject": "SUBJECT", | ||
"email_sender_name": "SENDER NAME", | ||
"delay_in_minutes": 2 | ||
}, | ||
{ | ||
"to_email": "[email protected]" | ||
} | ||
], | ||
"fallback_email_subject": "FALLBACK SUBJECT", | ||
"fallback_email_sender_name": "FALLBACK SENDER NAME", | ||
"fallback_email_body": "FALLBACK BODY" | ||
} | ||
``` |