For Node.js applications, it is recommended to use the official
@antryk/sdk. The SDK simplifies
email sending by handling authentication, validation, and error handling
internally.Authentication is handled via headers (
x-access-key, x-secret-key). The
request body should only contain email-related fields such as sender,
recipient, subject, and content.New Email Sending Approach (Recommended)
This is the recommended and modern approach for sending emails:- Authentication is passed via headers instead of request body.
- Request body contains only email-related fields.
- Cleaner, more secure, and easier to maintain.
⚠️ The older approach (sending
accessKey and secretKey in the body) may
still work for backward compatibility, but it is strongly recommended to
migrate to header-based authentication.Request Parameters
string
required
Your Antryk access key used for authentication.
string
required
Your Antryk secret key used for authentication.
string
required
The sender’s email address.
string | array
required
The recipient’s email address. Can be a single email or an array for multiple
recipients.
string
required
The subject line of the email.
string
The HTML content of the email body.
string
Plain text version of the email body (fallback if HTML is not supported).
string
Optional reply-to email address. Useful for directing responses to a support
or no-reply inbox.
array
Optional list of attachments. Each item must include: -
filename: Name of
the file - content: Base64-encoded file contentExamples
string
required
Example:
YOUR_ACCESS_KEY string
required
Example:
YOUR_SECRET_KEY string
required
Example:
admin@example.com string | array
required
Example:
ds1@gmail.com or ["ds1@gmail.com", "ds2@gmail.com"] string
required
Example:
Otp For Antryk Sign up string
Example:
<h1>Welcome to Antryk</h1><p>This is your OTP code: 123456</p> string
Example:
Welcome to Antryk. This is your OTP code: 123456 string
Example:
support@example.com array
Example:
[{"filename": "invoice.pdf", "content": "<base64>"}] 
