Skip to main content

Transaction Email / Send email with attachment (transactional)

Send email with attachment (transactional)

Method: POST

https://api-prod.enotifiers.com/api/V1/service/email/sendAttachment

Request details

API Parameters
Parameter Description Example
emailName
string
Name of the email template used for
sending the email.
email_test
variables
Dictionary
Variables used in the email template. {"otp": "1234"}
to
string
Specifies the email address of the recipient. customer@example.com
files
array
List of files attached to the email. example.pdf

Curl code

Tabbed Interface
curl --location 'https://api-prod.enotifiers.com/api/V1/service/email/sendAttachment' \
            --header 'accept: application/json' \
            --header 'Authorization: Basic {{Authorization}}' \
            --form 'emailName="email_test"' \
            --form 'variables="{"otp": "1234"}"' \
            --form 'to="customer@example.com"' \
            --form 'files=@"jZjjeqRjG/example.pdf"'
           

Success response details

API Parameters
Parameter Description Example
status
String
Indicates the success status
of the API operation
success
code
String
Provides the status code indicating the success of the request. 200
message
String
A descriptive message confirming the success of the operation. Mail was sent successfully.
data.MessageId
String
Unique identifier for the sent email message. "0109018e7e71c973-bfa2ed23-0e0c-4ffc-9c97-c844b2b6115d-000000"
{
    "status": "success",
    "code": "200",
    "message": "Mail Sent Successfully",
    "data": {
        "MessageId": "0143568e7e71c973-bfa2ed23-0e0c-4ffc-9c97-c844b2b6115d-000000"
    }
}

Failure response details

API Parameters
Parameter Description Example
status
String
Indicates the overall status
of the API request.
failed
code
String
Provides the HTTP status code
corresponding to the failure.
400
message
String
Provides the reason for the error Email not found
data.error
String
Specific error message providing
more context about the issue.
No document found for the given email name.
{
    "status": "failed",
    "code": "400",
    "message": "Email not found.",
    "data": {
        "error": "No document found for the given email name."
    }
}

Document

Policy

Terms of Use

policy

© 2024 E-Notifiers. All rights reserved.