Send emails using created email templates, supporting batch sending to multiple recipients. Each recipient can use different template variable parameters.
Request Information
- Request Method:
POST - Request Path:
/api/v1/email/SendEmailTemplate - Content-Type:
application/json
Notes
- Variable format in
TemplateVariableParams:variableName{##}variableValue, multiple variables are separated by array elements.
SendEmailstringrequired
Sender email address
?
TemplateIdstringrequired
Email template ID Manage templates in console
?
Subjectstringrequired
Email subject
?
Abstractstring
Email abstract
?
FromNamestring
Sender nickname
?
EmailContentobject[]required
Email content object array (each item: EmailAddress, TemplateVariableParams)
?
LANGUAGE
CREDENTIALS
👁️
🔒
🔑Log in to get ACCESSKEY_ID and ACCESSKEY_SECRET
URL
POST
CURL Request▼
curl -X POST "https://api.uspeedo.com/api/v1/email/SendEmailTemplate" \-H "Content-Type: application/json" \-H "Accept: application/json" \-H "Authorization: Basic $(echo -n 'ACCESSKEY_ID:ACCESSKEY_SECRET' | base64)" \-d '{"SendEmail": "sender@example.com","TemplateId": "template_123","Subject": "Welcome Email Subject","Abstract": "New user welcome email","FromName": "uSpeedo","EmailContent": [{"EmailAddress": "recipient@example.com","TemplateVariableParams": ["{1}{##}John","{2}{##}123456"]}]}'
RESPONSE
Click Try It! to start a request and see the response here.
Response Format
| Field Name | Type | Description |
|---|---|---|
| RetCode | int | Return code, 0 indicates success |
| Message | string | Return message |
| SessionNo | string | Session number, used to query sending status |
| FailedTargetEmails | array | List of failed recipients |