Example request
Live request shape
POST /api/v1/emails
curl -X POST https://api.resendermail.com/api/v1/emails \
-H "X-API-Key: ep_live_..." \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": ["customer@example.com"],
"subject": "Hello from ResenderMail",
"html": "<p>Hello</p>"
}'const res = await fetch(
"https://api.resendermail.com/api/v1/emails",
{
method: "POST",
headers: {
"X-API-Key": "ep_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
from: "hello@yourdomain.com",
to: ["customer@example.com"],
subject: "Hello from ResenderMail",
html: "<p>Hello</p>",
}),
}
);
const { id, status } = await res.json();import requests
resp = requests.post(
"https://api.resendermail.com/api/v1/emails",
headers={
"X-API-Key": "ep_live_...",
"Content-Type": "application/json",
},
json={
"from": "hello@yourdomain.com",
"to": ["customer@example.com"],
"subject": "Hello from ResenderMail",
"html": "<p>Hello</p>",
},
)
data = resp.json()using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "ep_live_...");
using var content = new StringContent(
"""{"from":"hello@yourdomain.com","to":["customer@example.com"],"subject":"Hello from ResenderMail","html":"<p>Hello</p>"}""",
Encoding.UTF8,
"application/json"
);
var res = await client.PostAsync(
"https://api.resendermail.com/api/v1/emails",
content
);var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder()
.uri(URI.create("https://api.resendermail.com/api/v1/emails"))
.header("X-API-Key", "ep_live_...")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{"from":"hello@yourdomain.com","to":["customer@example.com"],"subject":"Hello from ResenderMail","html":"<p>Hello</p>"}
"""))
.build();
var res = client.send(req, HttpResponse.BodyHandlers.ofString());payload := strings.NewReader("{\"from\":\"hello@yourdomain.com\",\"to\":[\"customer@example.com\"],\"subject\":\"Hello from ResenderMail\",\"html\":\"<p>Hello</p>\"}")
req, err := http.NewRequest(http.MethodPost, "https://api.resendermail.com/api/v1/emails", payload)
if err != nil {
log.Fatal(err)
}
req.Header.Set("X-API-Key", "ep_live_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)