Sending Emails
The PouchMail API allows you to send transactional emails via a simple POST request. All requests are processed through our global edge network for maximum speed.
Example Request
javascript — fetch
fetch("https://api-lt3rz6m7zq-uc.a.run.app/apiSendMail", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "YOUR_KEY_1",
"X-Api-Key": "YOUR_KEY_2"
},
body: JSON.stringify({
to: "client@example.com",
subject: "Inquiry from Website",
from: "Contact Form",
text: "User message goes here..."
})
})
.then(res => res.json())
.then(data => console.log(data));
Request Parameters
| Property | Type | Description |
|---|---|---|
| to | string | Recipient email address. |
| subject | string | Subject line of the email. |
| from | string | Friendly name of the sender. |
| text | string | Plain text content of the message. |
Edge Delivery
Requests are typically processed in under 150ms. You will receive a 200 OK response with a unique mailId upon success.