1. Email
Messaging API
  • Root
    • OTT
      • Send OTT
    • SMS
      • Send SMS
        • SendSms
    • Voice
      • /deliver
    • Email
      • Register an email delivery request
        POST
  • Schemas
    • Schemas
      • MessageChannel
      • ApiSmsRequest
      • VoiceApiRequest
      • EmailRecipient
      • OTTMessagePayload
      • EmailRequest
      • OTTMessageRequest
      • EmailResponse
      • EmailResult
  1. Email

Register an email delivery request

POST
/email/v1/deliver
Last modified:2025-10-01 17:40:21
Rules: - Either 'templateId' or 'html' must be provided, not both.
Subject is always required.
Each recipient is processed individually.
-Response Codes:
202 Accepted → Always returned, with detailed per-recipient status.
Recipient errors: ValidationError, TemplateNotFound, InternalError.

Request

Authorization
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
Body Params application/json

Examples

Responses

🟢202Accepted
application/json
Accepted
Bodyapplication/json

🟢202Partial success
🟠400Failed response
🟠400Failed response (invalid request structure)
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.trucontact.co/email/v1/deliver' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "subject": "Welcome",
    "from": "no-reply@domain.com",
    "templateId": "welcome_v1",
    "recipients": [
        {
            "to": "john@example.com",
            "fields": {
                "name": "John",
                "code": "A123"
            }
        },
        {
            "to": "mary@example.com",
            "fields": {
                "name": "Mary",
                "code": "B456"
            }
        }
    ]
}'
Response Response Example
202 - Example 1 Correct request using a template
{
    "subject": "Welcome",
    "from": "no-reply@domain.com",
    "templateId": "welcome_v1",
    "recipients": [
        {
            "to": "john@example.com",
            "fields": {
                "name": "John",
                "code": "A123"
            }
        },
        {
            "to": "mary@example.com",
            "fields": {
                "name": "Mary",
                "code": "B456"
            }
        }
    ]
}
Modified at 2025-10-01 17:40:21
Previous
/deliver
Next
MessageChannel
Built with