curl --request POST \
--url https://api.open.cx/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_email": "[email protected]",
"recipients": [
{
"to_email": "[email protected]",
"email_body": "<string>",
"email_subject": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": true
}
],
"delay_in_minutes": 1,
"fallback_email_subject": "<string>",
"fallback_email_sender_name": "<string>",
"fallback_email_body": "<string>"
}
'{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Send emails to multiple contacts, possibly with a time delay.
To send emails using the API, you must first verify the domain you want to send emails from. You can add and verify custom domains in the settings.
curl --request POST \
--url https://api.open.cx/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_email": "[email protected]",
"recipients": [
{
"to_email": "[email protected]",
"email_body": "<string>",
"email_subject": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": true
}
],
"delay_in_minutes": 1,
"fallback_email_subject": "<string>",
"fallback_email_sender_name": "<string>",
"fallback_email_body": "<string>"
}
'{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The email to send from. This email's domain name must be added and verified. Otherwise, the request will fail with a 400 status code.
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).
Show child attributes
How much time (in minutes) to wait before sending the emails.
x > 0Fallback body of the email in HTML format.
Was this page helpful?