Send email from your app
Send an email, check on it, and connect your own SMTP. Every request uses an API key from your dashboard, and API sends follow the same limits as the dashboard.
Base URL and authentication
https://europeanunion.primeglobalhub.online
Send your key in the Authorization header asBearer YOUR_API_KEY. Create keys on the API keys page. Keep them secret and never put them in browser code.
/v1/emails
Sends an email. Returns 201 with { id, status }.
| Field | Type | Notes |
|---|---|---|
| to | string or string[] | Required. One address, or up to 50. |
| subject | string | Required. Up to 200 characters. |
| html | string | The email body as HTML. Send html, text, or both. |
| text | string | A plain-text version of the body. |
| sender | string | Optional. "site" for site mail (the default), "smtp:<id>" to send through one of your own SMTP accounts, or "domain:<id>" to send from one of your verified domains. |
| from_email | string | Required with a "domain:<id>" sender. Must be an address at that domain, like [email protected]. |
| from_name | string | Optional. The name shown next to the From address. |
| reply_to | string | Optional. Where replies should go. |
curl -X POST https://europeanunion.primeglobalhub.online/v1/emails \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["[email protected]"],
"subject": "Your order has shipped",
"html": "<p>It is on the way!</p>"
}'/v1/emails/:id
Checks on an email you sent. Status is queued, sent or failed.
{
"id": 1042,
"status": "sent",
"to": ["[email protected]"],
"subject": "Your order has shipped",
"created_at": "2026-11-07T10:15:00Z",
"sent_at": "2026-11-07T10:15:02Z",
"error": null
}/v1/smtp-accounts
Connects one of your own SMTP accounts, so you can send through it with "sender": "smtp:<id>". We log in to the SMTP server before saving (nothing is sent). Returns 201.
| Field | Type | Notes |
|---|---|---|
| label | string | Required. A name only you see, up to 60 characters. |
| host | string | Required. The SMTP host, like mail.yourdomain.com. |
| port | number | Required. Usually 465 (SSL/TLS) or 587 (STARTTLS). |
| secure | boolean | Required. true for SSL/TLS (465), false for STARTTLS (587). |
| username | string | The SMTP username. |
| password | string | The SMTP password. |
| from_email | string | Required. The address mail is sent from. |
| from_name | string | Optional. The name shown next to the From address. |
| mode | string | Optional. "send_receive" or "send_only". See below. |
| imap | object | Optional. Receiving details to use instead of our guess: { "enabled": true, "host", "port", "secure", "username", "password" }. Leave the password out to reuse the SMTP one. |
mode
send_receive: we also open the mailbox (same login, port 993) so its new mail shows in your Inbox. If that fails, nothing is saved and you get422 receiving_failedwith the reason and our best guess.send_only: sending only. The mailbox is never read.- Left out: we try receiving, and if it fails the account is still saved as send only.
receivingin the response says which, with the reason.
Sending-only services (SendGrid, Mailgun, Amazon SES, Brevo, Postmark and the like) have no inbox: use send_only, or pass imap with your From address’s own mailbox.
curl -X POST https://europeanunion.primeglobalhub.online/v1/smtp-accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Work email",
"host": "mail.yourdomain.com",
"port": 465,
"secure": true,
"username": "[email protected]",
"password": "YOUR_SMTP_PASSWORD",
"from_email": "[email protected]",
"mode": "send_receive"
}'{
"ok": true,
"account": { "id": 12, "label": "Work email", "mode": "send_receive", "from_email": "[email protected]", … },
"receiving": { "enabled": true, "host": "mail.yourdomain.com" }
}GET /v1/smtp-accounts lists your SMTP accounts, with each one’s id and mode.
Errors
Errors come back as { "error": "code", "message": "…" }.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_input | A field is missing or wrong. The message says which. |
| 401 | invalid_api_key | The key is missing, wrong, or revoked. |
| 403 | demo_limit | This is a demo site: each account can send 1 email in total. |
| 409 | sending_not_configured | Site mail isn’t set up yet. Send through your own SMTP instead. |
| 409 | domain_not_verified | That domain isn’t verified yet. Finish its DNS setup under Senders. |
| 400 | smtp_limit | You already have the most SMTP accounts you can add (10). |
| 422 | smtp_login_failed | Adding an SMTP account: we couldn’t log in to send. The message says why. |
| 422 | receiving_failed | Adding with mode "send_receive": sending works but the mailbox couldn’t be read. Nothing was saved; receiving.guess has our best guess. |
| 429 | limit_reached | You’ve used your monthly emails or hit your hourly cap. |
| 429 | too_many_requests | More than 60 requests a minute on one key. Wait and retry. |
Limits
- Up to 50 recipients per request.
- 60 requests a minute per key.
- Site mail and your own domains count each recipient toward your monthly emails. Your own SMTP is unlimited.
Other apps
Want to send from other apps (WordPress, Outlook…)? Connect your own SMTP under Senders — it’s unlimited.