Sari la conținut

Email

Trimite email-uri tranzacționale către adrese pe care contul tău le-a verificat, folosind aceeași cheie de integrare care alimentează notificările tale push. Destinatarii confirmă printr-un link de dublă acceptare înainte de a putea primi email-uri.

Info

PushWard's email channel is a verified-recipient transactional email relay: you can only send mail to addresses your account has explicitly confirmed through a double opt-in link. There is no way to send unsolicited mail through it — which is what keeps deliverability high. Messages are handed to a third-party email delivery provider; bounces and spam complaints are processed automatically.

How it works

  1. Register a recipient. The account owner adds an address to the verified list. PushWard sends that address a one-time confirmation link (valid for 48 hours).
  2. The recipient confirms. Clicking the link verifies the address. Only confirmed, non-unsubscribed addresses become sendable — and only for the account that verified them (verification is per-account, never shared).
  3. Your integrations send. Call POST /emails to deliver transactional mail to a verified recipient, using the same integration key that powers your push notifications. Recipients can one-click unsubscribe at any time, and hard bounces or spam complaints suppress an address automatically.

Authentication

Info

Sending email needs the dedicated emails capability. Your auto-created default integration key already has it enabled — so you can call POST /emails right away without making a new key. To use a scoped key instead, enable its emails flag per-key in the iOS app's integration-keys screen. The flag is independent of notifications, so a key can send email without being able to send push (and vice versa). See Authentication.

Info

Managing recipients — registering, confirming, listing, and removing addresses — happens in the PushWard app, not through the API. Integration keys deliberately cannot touch the recipient list: you decide in the app which addresses your integrations are allowed to email, and your keys can only send to those confirmed addresses.

Info

Email is metered: 500 messages/month on the free tier and 2,500 messages/month on paid. The quota resets on the 1st (UTC). See Limits for how email compares to the other quotas.

Send an Email

POST /emails

Send a transactional email to a verified, non-unsubscribed recipient of the calling account.

Request Body

FieldTypeRequiredDescription
tostringYesRecipient address (3–254 chars). Must be a verified, non-unsubscribed recipient of your account, or the request is rejected with 403. Bare addresses only — Name <[email protected]> display forms are rejected.
subjectstringYesSubject line (1–256 chars).
html_bodystringNo*HTML body (up to 256 KB).
text_bodystringNo*Plain-text body (up to 64 KB).
Info

* Provide html_body, text_body, or both — at least one is required. Sending both lets the recipient's client pick the best representation.

Send a deploy summary
curl -X POST https://api.pushward.app/emails \
  -H "Authorization: Bearer hlk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "[email protected]",
    "subject": "Nightly backup complete",
    "text_body": "All 4 repositories backed up in 12m 30s.",
    "html_body": "<p>All <strong>4</strong> repositories backed up in 12m 30s.</p>"
  }'

Response (201):

{
  "id": 42,
  "to": "[email protected]",
  "subject": "Nightly backup complete",
  "status": "sent",
  "provider_message_id": "0100018f3a2b...",
  "created_at": "2026-06-09T02:00:00Z",
  "delivery": "all"
}

The send response carries two read-only fields describing the send-time outcome (present only on the send response, not on the stored history rows shown in the app):

FieldValuesMeaning
deliveryall, noneWhether the message was handed off for delivery.
reasonsuppressed, send_failedWhy delivery is none. suppressed = the address previously hard-bounced or was marked as spam (recorded in history, no message sent); send_failed = the delivery provider rejected the hand-off. Empty on success.
Info

A send to a globally-suppressed address returns 201 with delivery: "none" and reason: "suppressed" rather than an error: the attempt is logged for your history, but no mail goes out and no quota is consumed.

Recipients & History

Recipient management — registering an address, sending its double-opt-in confirmation, listing recipients, resending a confirmation, and removing one — is handled in the PushWard app, not through the public API. You curate the verified list in the app; your integration keys can only send to addresses already confirmed there.

Your send history — every email this account has sent or attempted — is likewise viewable in the app's Email tab, including each message's delivery status: sent, bounced, complained, failed, or suppressed (updated asynchronously as the delivery provider reports bounces and complaints).

Verification & Deliverability

  • Double opt-in. Confirmation links are single-use and expire after 48 hours; the app can resend a fresh one to a still-pending address.
  • One-click unsubscribe. Every email automatically carries the RFC 8058 one-click unsubscribe headers and a link — you don't add anything. An unsubscribe is per-account: it stops mail from your account to that address, and you can re-register the address (with a new confirmation) later.
  • Automatic suppression. A hard bounce or spam complaint suppresses the address globally and immediately — subsequent sends are silently skipped and logged as suppressed. This protects sender reputation for everyone on the relay.
  • Recipient cap. Each account can keep up to 50 verified recipients. See Limits.

Errors

Email errors use the same RFC 9457 Problem Details body shape and stable code values as the rest of the API.

StatusCodeMeaning
400email.invalidto/address is not a valid address, or no body was provided.
403email.recipient_not_verifiedto is not a verified, non-unsubscribed recipient of your account.
429quota.exceededMonthly email quota reached (or IP rate limit). Pairs with Retry-After and a reset_at timestamp.
503email.not_enabledEmail sending is not enabled on this server instance.