Send email
Recipients, content, attachments, tags, scheduling and batches.
curl -X POST 'https://api.iresendly.com/emails' \
-H 'Authorization: Bearer irs_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"from": "Acme <hello@acme.com>",
"to": ["jane@example.com"],
"subject": "Hello from iResendly",
"html": "<strong>It works!</strong>"
}'Recipients#
to,ccandbcctake up to 50 addresses each. Duplicates are removed.- Each recipient counts as one email towards your quota.
- Addresses on your suppression list (an earlier hard bounce or complaint) are skipped and reported with an
email.suppressedevent. Unsubscribes from broadcasts don't block transactional email.
Content#
Send html (up to 2 MB), text, or a published template with variables. from and subject can come from the template.
Attachments#
- Up to 50 files and 40 MB in total.
- Pass
contentas base64, orpathas a public URL we download. - Add
content_idand reference it ascid:in your HTML to show an image inline. - Executable files are refused. Attachments can't be used with
scheduled_ator in a batch.
Tags and headers#
Add up to 10 tags ({ name, value }, 1–256 characters each) to find emails later; they come back in webhooks. Custom headers are allowed, except the ones that identify the email (From, To, Cc, Bcc, Subject, Reply-To, Message-ID, Date, MIME, DKIM). Every email carries an X-Entity-Ref-ID header with its id.
Scheduling#
Set scheduled_at to an ISO 8601 time or to in 30 min, in 2 hours or in 1 day, up to 30 days ahead. Reschedule with PATCH /emails/{id} or cancel with POST /emails/{id}/cancel; a cancelled email goes back to your quota.
Batches#
POST /emails/batch sends up to 100 emails in one request. By default the whole batch fails if one email is invalid. Send x-batch-validation: permissive to send the valid ones and get the rest back as errors with their position.
After you send#
Accepted emails are delivered in seconds. If our email provider has a temporary problem we retry after 30 seconds, 2, 10 and 30 minutes and 2 hours before marking the email failed. Watch progress under Emails in the console or with webhooks.