Email
Send email using Mailtrap
Sends an email using the Mailtrap email service. Supports both template-based and regular emails with HTML/text content. When using templates, the content is automatically formatted and template variables are processed.
post/api/email/mailtrap/send
Request
- Base URL: https://api.kolect.com
- URL: https://api.kolect.com/api/email/mailtrap/send
- Auth: HTTP bearer
Request body
Example request
{
"to": "recipient@example.com",
"from": "sender@kolect.ai",
"fromName": "Kolect Team",
"subject": "Welcome to Kolect!",
"text": "Thank you for joining Kolect. We're excited to have you!",
"html": "<p>Thank you for joining <strong>Kolect</strong>!</p>",
"replyTo": "reply@kolect.ai",
"category": "test",
"isSandbox": true,
"attachments": [
{
"url": "https://example.com/document.pdf",
"filename": "document.pdf",
"content_id": "logo.png",
"disposition": "inline"
}
],
"testType": "html",
"useTemplate": true,
"templateUuid": "123e4567-e89b-12d3-a456-426614174000",
"templateVariables": {
"content": "Welcome to our platform! We're excited to have you join our community.",
"subject": "Welcome to Kolect!",
"user_name": "John Doe"
}
}Response
Email sent successfully
Example response
{
"success": true,
"message": "Template email sent successfully",
"timestamp": "2025-01-27T10:30:00.000Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.