Goal
Use durable scheduling and batch APIs instead of rebuilding delayed delivery and fan-out inside application jobs.Prerequisites
- A StackShift API key
- A verified sender domain
- StackShift Assets uploaded when using asset-backed attachments
Workflow
1
Create scheduled messages with sendAt and either a direct message payload or template payload.
2
Create batch sends for multiple direct messages or batch-template sends for many recipients using one template.
3
Inspect batches and batch items from the dashboard or API.
4
Attach existing private Assets objects or completed upload sessions by ID.
Scheduled messages
Batch template sends
Attachments
- MailSendInput, MailSendTemplateInput, and scheduled/template workflows accept attachments.
- Attachment input supports assetId or uploadId, filename, and optional contentType.
- Use StackShift Assets for files you want to attach by assetId.
API endpoints
- Scheduled: POST /mail/scheduled, GET /mail/scheduled, GET /mail/scheduled/{scheduledId}, DELETE or POST /mail/scheduled/{scheduledId}/cancel.
- Batch: POST /mail/batch, POST /mail/batch-template, GET /mail/batches, GET /mail/batches/{batchId}, GET /mail/batches/{batchId}/items.
Expected result
Delayed and bulk Mail workflows are durable, inspectable, and protected by normal Mail idempotency, suppression, and attachment policy.
Common failures
Related guides
StackShift Assets
A grounded guide to Assets storage, uploads, delivery, imports, BYOB and S2, transformations, OCR, media processing, AI jobs, and DAM controls.
Templates and OTP
Create versioned templates, preview and test them, send from a template, and use the built-in one-time-code challenge flow.
Inbound mail
Receive mail on verified domains, inspect parsed messages, and securely download scanned raw messages and attachments.
Diagnostics, analytics, and exports
Diagnose rendered templates, measure Mail operations, and create encrypted recipient-level delivery exports.