Skip to main content
POST
/
api
/
v1
/
send-email
/
initiate
curl -X POST "https://server.smartlead.ai/api/v1/send-email/initiate?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "recipient@example.com",
    "subject": "Welcome to SmartLead",
    "body": "<h1>Hello!</h1><p>This is your welcome email.</p>",
    "fromEmail": "sender@example.com",
    "fromName": "SmartLead Team",
    "replyTo": "support@example.com",
    "attachments": []
  }'
{
  "success": true,
  "data": {
    "message": "Email sent successfully",
    "message_id": "msg_67890abcde"
  }
}

Path Parameters

No path parameters

Query Parameters

api_key
string
required
Your SmartLead API key

Request Body

to
string
required
Recipient email address
subject
string
required
Email subject line
body
string
required
Email body content (HTML or plain text)
fromEmail
string
Sender email address. Either fromEmail or fromEmailId is required
fromEmailId
number
ID of the sender email account. Either fromEmail or fromEmailId is required
fromName
string
Display name for the sender (optional)
replyTo
string
Reply-to email address (optional)
attachments
array
Array of attachment objects (optional). Each attachment requires:
  • filename (string): Name of the file
  • content (string): Base64-encoded file content
  • mimeType (string): MIME type of the file (e.g., “application/pdf”)
curl -X POST "https://server.smartlead.ai/api/v1/send-email/initiate?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "recipient@example.com",
    "subject": "Welcome to SmartLead",
    "body": "<h1>Hello!</h1><p>This is your welcome email.</p>",
    "fromEmail": "sender@example.com",
    "fromName": "SmartLead Team",
    "replyTo": "support@example.com",
    "attachments": []
  }'

Response Codes

200
Success
Request successful
400
Bad Request
Invalid request parameters or malformed request body
401
Unauthorized
Invalid or missing API key. Check your authentication.
404
Not Found
The requested resource (campaign, lead, email account, etc.) does not exist or you don’t have access to it
422
Validation Error
Request validation failed. Check parameter types, required fields, and value constraints.
429
Rate Limit Exceeded
Too many requests. Please slow down and retry after the rate limit resets.
500
Internal Server Error
Server error occurred. Please try again or contact support if the issue persists.
503
Service Unavailable
API is temporarily unavailable or under maintenance. Please try again later.
{
  "success": true,
  "data": {
    "message": "Email sent successfully",
    "message_id": "msg_67890abcde"
  }
}