Test email
Api call to subrite to test email
- Method:
POST
- Route:
{baseUrl}/api/v1/communications/email/test
- Authorization: Bearer token (use the m2m token collected in ## configuration)
- Body: See example below
Example of body :
{
"communicationType": "marketing", // Possible values: "marketing" or "information"
"name": "coming from external",
"senderId": 2, // Use sender ID from Step 2 response
"consentId": null,
"segmentId": 1, // Use segment ID from Step 3 response
"subject": "email subject",
"emailPreviewText": "sample",
"templateId": 1, // Optional
"emailContent": "<div>hello world</div>",
"recipients": ["[email protected]", "[email protected]"] // Always use an array for recipients, even when sending to a single address. Maximum 5 recipients allowed per test email.
}
Success API Response :
{
success: true,
message: 'Test emails sent successfully',
}