POST
/
webhook
/
mail
/
send
cURL
curl --request POST \
  --url https://webhook.sit.onedigilta.in/webhook/mail/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transactional_id": "<string>",
  "to": [
    {
      "email": "jsmith@example.com",
      "name": "<string>",
      "first_name": "<string>",
      "middle_name": "<string>",
      "last_name": "<string>",
      "attributes": {},
      "lists": [
        "<string>"
      ],
      "tags": [
        "<string>"
      ],
      "gender": "<string>",
      "age": 123,
      "Address1": "<string>",
      "Address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "<string>",
      "postal_code": "<string>",
      "designation": "<string>",
      "company": "<string>",
      "industry": "<string>",
      "description": "<string>",
      "anniversary_date": "<string>"
    }
  ],
  "reply_to": "<string>",
  "custom_parameter": {},
  "attachments": [
    {
      "filename": "document.pdf",
      "contentType": "application/pdf",
      "data": "U29tZSBiYXNlNjQtZW5jb2RlZCBkYXRh"
    }
  ],
  "attachments_remote": [
    {
      "remote_link": "https://cdn.something.com/filename"
    }
  ],
  "add_email_address_to_contact": true,
  "scheduled_at": "2023-12-31T23:59:59Z",
  "allow_click_tracking": true,
  "allow_open_tracking": true,
  "ignore_contact_bounce": true,
  "ignore_contact_unsubscribe": true,
  "enable_view_in_browser": true,
  "include_unsubscribe": false,
  "cc": "<array>"
}
'
{
    "success": true,
    "failed_emails": [],
    "report": [
        {
            "to": "email_address",
            "message_id": "unique_id"
        },
        {
            "to": "email_address",
            "message_id": "unique_id"
        },
    ],
    "quotas": {
        "MAX_SEND_MAIL_PER_DAY": {
            "limit": "usage",
            "usage": "usage"
        },
        "MAX_SEND_MAIL_PER_MONTH_TRANSACTIONAL": {
            "limit": "usage",
            "usage": "usage"
        }
    },
    "message": "Transactional mails sent successfully"
}

Send transactional mail

Use this endpoint to send transactional email.

Request Requirements

You must use one of the following options to send email. Each option has its own required fields:
  • Option 1: Use a predefined transactional template.
    • Required fields:
      • transactional_id: The ID of the transactional template to use.
      • to: The recipient’s email address.
  • Option 2: Use a custom template.
    • Required fields:
      • template_uuid: The UUID of the custom template.
      • sender: Email address of the sender.
      • subject: Subject line of the email.
      • to: The recipient’s email address.
  • Option 3: Send raw email content.
    • Required fields:
      • email_content: The rich HTML or text content of the email.
      • sender: Email address of the sender.
      • subject: Subject line of the email.
      • to: The recipient’s email address.

Response fields

PropertyDescription
201Transactional mails sent successfully
400Bad request
401Request authentication
403Too many bad requests. Temparory block
406Missing accept header. For example : Accept: application/json
429Too many requests/ Rate limit exceeded
500Internal server error
{
    "success": true,
    "failed_emails": [],
    "report": [
        {
            "to": "email_address",
            "message_id": "unique_id"
        },
        {
            "to": "email_address",
            "message_id": "unique_id"
        },
    ],
    "quotas": {
        "MAX_SEND_MAIL_PER_DAY": {
            "limit": "usage",
            "usage": "usage"
        },
        "MAX_SEND_MAIL_PER_MONTH_TRANSACTIONAL": {
            "limit": "usage",
            "usage": "usage"
        }
    },
    "message": "Transactional mails sent successfully"
}

Authorizations

Authorization
string
header
required

Use your API key with the 'Bearer ' prefix

Body

application/json

API payload when transactional email configuration is managed on the platform

transactional_id
string
required

Transactional id for email.

to
object[]
required

Email address of the recipient.

reply_to
string

Valid email address.

custom_parameter
object

Object containing key-value pairs to replace merge tags in the email template

attachments
object[]

Attachment

attachments_remote
object[]

Remote attachments

add_email_address_to_contact
boolean

Add email address to contact

scheduled_at
string<date-time>

Date and time when the email should be sent (ISO 8601 format)

Example:

"2023-12-31T23:59:59Z"

allow_click_tracking
boolean
default:true

Enable tracking of link clicks within the email.

allow_open_tracking
boolean
default:true

Enable tracking of email opens using tracking pixels.

ignore_contact_bounce
boolean
default:true

Send emails even to addresses that previously bounced.

ignore_contact_unsubscribe
boolean
default:true

Send emails to recipients even if they have unsubscribed.

enable_view_in_browser
boolean
default:true

Enable view in browser

include_unsubscribe
boolean
default:false

Include unsubscribe link in the email footer

cc
array

Email address of the CC recipient.

Response

Email sent successfully.