Schedule separate emails for later
POST /email_batches/actions/schedule
/email_batches/actions/scheduleSchedules one individual email for each of 2 to 50 recipients, starting at scheduled_at and then five minutes apart within the mailbox limits.
When to use: When the user wants to write to several people one by one starting at a given date and time, and has confirmed text, list and time. Confirm with the user before calling it.
When not to use: To send now, use send_email_batch. For one email to everyone, use schedule_email. To change the time: cancel with cancel_email_batch and schedule again.
Side effects: One email per recipient of to, each with their own unsubscribe link (if you include the unsubscribe block), spaced at least five minutes apart within the mailbox limits (12 per hour, 200 per day), so a batch of 50 takes hours to finish. A scheduled batch has no undo window. Each recipient counts against the user's limit of 100 scheduled emails. Released asynchronously by background jobs.
Filters: Opt-out protection as in send_email.
Permissions: Requires a CRM seat and the crm.contacts_companies.write capability. The sender must be a mailbox the user can send from: one of their own or one shared with them (see list_email_senders). Writing from an opportunity also requires crm.opportunities.read and the Work level on its pipeline.
Value for the X-Auth-Token header parameter.
In: header
The new EmailBatch resource
TypeScript Definitions
Use the request body type in TypeScript.
Email batches of the public API (fase 5): the same message as a separate email to each of 2 to 50 people. Generated
from the proposal by fase-5/tools/gen_email_sending_api.py; the texts are the proposal's. sends are the sends of the
batch with the fields of get_email_send and their @id. A batch belongs to its author: for anyone else it answers
404 email_send_not_found.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.easymailing.com/email_batches/actions/schedule" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "idempotency_key": "0cd90e5a-2c03-4ab6-81a8-d48818026e58", "sender_uuid": "6fd60e87-ecde-4069-8fdb-aebbacafea6d", "record": "/entity/1", "mode": "compose", "source_email": "/entity/1", "to": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ], "subject": "string", "body_html": "string", "attachment_ids": [ "string" ], "forwarded_attachment_ids": [ "string" ], "acknowledged_opt_outs": [ "string" ], "draft": "/entity/1", "replaces_send": "/entity/1", "scheduled_at": "2019-08-24T14:15:22Z" }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "release_at": "2019-08-24T14:15:22Z", "cancellable": true, "sends": [ {} ]}