Everything you need to call POST /emails (see API reference for https://api.piisend.com/api/v1/emails), poll status, and handle scheduling, tracking, and attachments.
POST /emails
Requires API key scope emails:send. Send either raw content (subject + html/text) or a template_id with template_vars—not both.
Optional header Idempotency-Key deduplicates retries for 24 hours. See the Idempotency keys guide.
Disposable recipients
By default, POST /emails rejects any to, cc, or bcc address on Piisend’s disposable domain blocklist (same list used for Piisend account signup). The API returns HTTP 400 with a message like Disposable email addresses are not allowed: user@example.com.
- Call
GET /check/email/{email}at signup to block disposable, spam-domain and no-MX addresses (and catch typos) before you build a template payload. - For integration tests, send to real inboxes you control (Gmail, Outlook, etc.), not throwaway domains.
- Platform operators can disable send-time checks with
DISPOSABLE_EMAIL_BLOCK_SEND=falseor allow specific suffixes viaDISPOSABLE_EMAIL_ALLOWED_DOMAINS(server env).
Message lifecycle
| status | Meaning |
|---|---|
queued | Accepted; waiting for the worker |
scheduled | Will send at scheduled_at |
sent | Handed to the delivery stack |
delivering | In flight at the provider |
delivered | Confirmed delivery event |
failed | Send or provider error |
bounced | Hard/soft bounce recorded |
cancelled | Scheduled send cancelled before dispatch |
Cancel a scheduled message with POST /emails/{id}/cancel while status is scheduled. Resend with POST /emails/{id}/resend.
Topic guides
Each feature has a dedicated guide with step-by-step instructions:
- Batch sending
- Attachments
- Embed images
- Schedule email
- Send test emails
- Custom headers
- Idempotency keys
- Email bounces
- Email suppressions
- Deliverability insights
- Unsubscribe link
Related
- Templates — merge variables
- Webhooks — delivery, bounce, complaint, open, click
- Domains — branded
from_addresses - API reference — curl, JavaScript, and Python examples