Email reference
Transactional sends, templates, suppressions, sending domains.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| POST | /v1/email/send | email:send | Send a transactional email. |
| GET | /v1/email/messages | email:read | List messages (cursor-paginated). |
| GET | /v1/email/messages/{id} | email:read | Fetch one message with full headers + body. |
| POST | /v1/email/templates | email:templates:write | Create a Mustache template. |
Quickstart
curl -X POST https://api.valienz.io/v1/email/send \
-H "Authorization: Bearer $VALIENZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "noreply@acme.com",
"to": ["dev@acme.com"],
"subject": "Hello",
"html": "<p>Hi!</p>"
}'Notes
Sending domains
Add a domain at /email/domains and publish the DKIM + SPF + return-path DNS records. Until all three flip to VERIFIED, sends from that domain return 403 E_DOMAIN_UNVERIFIED.
Suppression list
Bounces and complaints land here automatically. Manual entries persist until removed. Sends to a suppressed address short-circuit with 409 E_EMAIL_SUPPRESSED.
Errors
| Code | HTTP | Description | Resolution |
|---|---|---|---|
| E_EMAIL_SUPPRESSED | 409 | Recipient is on the tenant suppression list. | Remove from /email/suppressions or pick a different recipient. |
| E_DOMAIN_UNVERIFIED | 403 | Sending domain has not finished DNS verification. | Publish the DKIM/SPF/return-path records and run "Verify now". |
| E_TEMPLATE_NOT_FOUND | 404 | Referenced templateId does not exist. | Check the id in /email/templates or omit and pass html/text inline. |