List queued, scheduled or failed emails
GET /email_sends
/email_sendsLists the emails the user has sent from the CRM that have not gone out yet or that need attention: queued, scheduled and failed or unconfirmed ones.
When to use: To answer what is scheduled or waiting to go out, which emails failed, or what is pending for one contact, company or opportunity.
When not to use: To list emails that already left, use list_sent_emails. To read one send, use get_email_send. To read emails received or the history of a record, use the email read operations (list_emails).
Filters: Send exactly one filter, otherwise 422 email_send_rejected with list_filter_required.
view=scheduled: the user's emails waiting for their time (scheduled ones, plus every email of a batch that still has one to leave so its progress shows). At most 500. An email still inside its 10 seconds to undo is not listed yet.view=failed: the user's failed or unconfirmed sends not yet discarded. At most 200.contact,company,opportunity: the user's sends written from that record that are still waiting or need attention (not the ones already sent). Only the user's own sends are listed, never other people's. The list is not paginated.
Permissions: Requires a CRM seat and the crm.contacts_companies.read capability.
Value for the X-Auth-Token header parameter.
In: header
Query Parameters
scheduled or failed. Do not combine with a record filter.
Value in
- "scheduled"
- "failed"
UUID of a contact: only sends written from it.
uuidUUID of a company: only sends written from it.
uuidUUID of an opportunity: only sends written from it.
uuidResponse Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://api.easymailing.com/email_sends?view=scheduled&contact=3a9e1f57-0000-4000-8000-6c474d08b1a8&company=3a9e1f58-0000-4000-8000-6c474d08b1a9&opportunity=3a9e1f59-0000-4000-8000-6c474d08b1aa" \ -H "X-Auth-Token: YOUR_API_KEY"[ { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "state": "queued", "failure_reason": "rejected", "release_at": "2019-08-24T14:15:22Z", "scheduled_at": "2019-08-24T14:15:22Z", "sender_uuid": "6fd60e87-ecde-4069-8fdb-aebbacafea6d", "sender_address": "user@example.com", "contact": "/entity/1", "record": "/entity/1", "record_type": "contact", "record_name": "string", "mode": "compose", "subject": "string", "to": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ], "recipients": [ {} ], "batch": "/entity/1", "created_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "failed_at": "2019-08-24T14:15:22Z", "canceled_at": "2019-08-24T14:15:22Z", "cancellable": true, "retryable": true, "copy_visible": true }]