API reference and examples

Base URL: https://api.hedvi.dev. Send JSON and authenticate with Authorization: Bearer YOUR_KEY. Keep keys on your server.

Authenticate an API request and use its identifier to inspect the result.
Use the route and permission listed for each operation. View full-size diagram
EndpointPurpose
POST /emailsSave and queue one message. See supported fields.
GET /emailsList messages using the supported cursor filters.
GET /emails/:idGet the message and current event.
GET /hedvi/v1/emails/:idRead recipient outcomes, events and attempts.
GET /hedvi/v1/usageRead organization quota use.
POST /domainsAdd a sending domain.
GET /domains, GET /domains/:idRead domains and required DNS records.
POST /domains/:id/verifyRequest a DNS verification check.
DELETE /domains/:idRemove a domain; live sending from it stops.
curl https://api.hedvi.dev/emails/EMAIL_ID \
  -H "Authorization: Bearer $HEDVI_API_KEY"

curl -X POST https://api.hedvi.dev/domains \
  -H "Authorization: Bearer $HEDVI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"mail.example.com","region":"eu-north-1"}'

Use a full-access key for reads and domain management. A sending-only key is intentionally refused for these operations. Dashboard session endpoints under /console/v1 are not the public integration API.

Retry rules

For a lost response or retryable network/5xx error, retry the same request with the same Idempotency-Key. Respect Retry-After for rate limits. Correct validation errors before retrying. A known email ID should be queried, not blindly sent again.