All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| sendEmail | POST /send/email | Send transactional email |
| sendEmailWithTemplate | POST /send/template | Send email using template |
List<XEmailResponse> sendEmail(xemailMessage)
Send transactional email
Sends transactional emails to specified recipients with support for personalization, attachments, and tracking.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.EmailSendingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
EmailSendingApi apiInstance = new EmailSendingApi(defaultClient);
XEmailMessage xemailMessage = new XEmailMessage(); // XEmailMessage |
try {
List<XEmailResponse> result = apiInstance.sendEmail(xemailMessage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EmailSendingApi#sendEmail");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| xemailMessage | XEmailMessage |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Email sent successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 429 | ❌ Too Many Requests - Rate limit exceeded | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
List<XEmailResponse> sendEmailWithTemplate(xemailMessage)
Send email using template
Sends emails using a pre-defined template with variable substitution.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.EmailSendingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
EmailSendingApi apiInstance = new EmailSendingApi(defaultClient);
XEmailMessage xemailMessage = new XEmailMessage(); // XEmailMessage |
try {
List<XEmailResponse> result = apiInstance.sendEmailWithTemplate(xemailMessage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EmailSendingApi#sendEmailWithTemplate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| xemailMessage | XEmailMessage |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Email sent successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | Template not found | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 429 | ❌ Too Many Requests - Rate limit exceeded | - |
| 500 | ❌ Internal Server Error - System error occurred | - |