Emails
Send and track transactional emails
6 endpoints
Endpoints
| Method | Path | Description |
| GET | /v1/emails | GET /v1/emails - List emails with pagination and filters |
| POST | /v1/emails | POST /v1/emails - Send a single email |
| POST | /v1/emails/batch | POST /v1/emails/batch - Send multiple emails (up to max_batch_size) |
| GET | /v1/emails/{id} | GET /v1/emails/:id - Get email details with events |
| POST | /v1/emails/{id}/cancel | |
| GET | /v1/emails/{id}/links | GET /v1/emails/{id}/links - Per-link click statistics for an email |
GET /v1/emails
GET /v1/emails - List emails with pagination and filters
Parameters
| Name | In | Type | Required | Description |
page | query | integer | No | Page number (default: 1) |
per_page | query | integer | No | Items per page (default: 25) |
status | query | string | No | Filter by status (queued, sent, bounced, failed) |
from_date | query | string | No | Filter from date (ISO 8601) |
to_date | query | string | No | Filter to date (ISO 8601) |
Responses
| Status | Description |
| 200 | Paginated list of emails |
| 401 | Unauthorized |
Example
curl -X GET https://api.euromail.dev/v1/emails \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.listEmails();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.list_emails()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.list_emails().await?;
client := euromail.NewClient("em_live_...")
result, err := client.ListEmails(ctx)
POST /v1/emails
POST /v1/emails - Send a single email
Request Body
| Field | Type | Required | Description |
attachments | AttachmentRequest[] | No | |
bcc | string[] | No | |
cc | string[] | No | |
from | string | Yes | |
headers | any | No | |
html_body | `string | null` | No |
idempotency_key | `string | null` | No |
| key (per account) returns the original email instead of creating a new one. | | | |
metadata | any | No | |
reply_to | `string | null` | No |
send_at | `string | null` | No |
subject | `string | null` | No |
suppress_list_management_header | boolean | No | When true, omits the List-Unsubscribe and List-Unsubscribe-Post headers. |
| Use for transactional emails (password resets, receipts) where an unsubscribe | | | |
| link is inappropriate. | | | |
tags | string[] | No | |
template_alias | `string | null` | No |
template_data | any | No | |
text_body | `string | null` | No |
to | OneOrMany | Yes | #/components/schemas/OneOrMany |
tracking | `boolean | null` | No |
for this email even if the account has tracking enabled. When true, | | | |
| enables tracking even if the account default is off. Omit to use account default. | | | |
Responses
| Status | Description |
| 202 | Email accepted for delivery |
| 401 | Unauthorized |
| 422 | Validation error |
| 429 | Rate limit or quota exceeded |
Example
curl -X POST https://api.euromail.dev/v1/emails \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "from": "[email protected]", "to": "[email protected]" }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.sendEmail({
from: "[email protected]",
to: "[email protected]",
});
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.send_email(&SendEmailParams {
from: "[email protected]".into(),
to: "[email protected]",
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.SendEmail(ctx, euromail.SendEmailParams{
From: "[email protected]",
To: euromail.Recipients("[email protected]"),
})
POST /v1/emails/batch
POST /v1/emails/batch - Send multiple emails (up to max_batch_size)
Request Body
| Field | Type | Required | Description |
emails | SendEmailRequest[] | Yes | |
Responses
| Status | Description |
| 202 | Batch accepted for delivery |
| 401 | Unauthorized |
| 422 | Validation error |
| 429 | Rate limit or quota exceeded |
Example
curl -X POST https://api.euromail.dev/v1/emails/batch \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "emails": "[email protected]" }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.sendBatch({
emails: "[email protected]",
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.send_batch(
emails="[email protected]",
)
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.send_batch(&SendBatchParams {
emails: "[email protected]",
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.SendBatch(ctx, euromail.SendBatchParams{
Emails: "[email protected]",
})
GET /v1/emails/{id}
GET /v1/emails/:id - Get email details with events
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Email ID |
Responses
| Status | Description |
| 200 | Email details with events |
| 401 | Unauthorized |
| 404 | Email not found |
Example
curl -X GET https://api.euromail.dev/v1/emails/{id} \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getEmail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_email("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_email("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetEmail(ctx, "id_...")
POST /v1/emails/{id}/cancel
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Email ID |
Responses
| Status | Description |
| 200 | Scheduled email cancelled |
| 401 | Unauthorized |
| 404 | Email not found or not in scheduled status |
Example
curl -X POST https://api.euromail.dev/v1/emails/{id}/cancel \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.cancelEmail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.cancel_email("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.cancel_email("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.CancelEmail(ctx, "id_...")
GET /v1/emails/{id}/links
GET /v1/emails/{id}/links - Per-link click statistics for an email
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Email ID |
Responses
| Status | Description |
| 200 | Per-link click statistics |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Email not found |
Example
curl -X GET https://api.euromail.dev/v1/emails/{id}/links \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getEmailDetail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_email_detail("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_email_detail("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetEmailDetail(ctx, "id_...")