Get the images embedded in an email
GET /emails/{uuid}/inline_images
/emails/{uuid}/inline_imagesReturns the images embedded in the body of an email (logos, signatures, pictures pasted in the text) as data: URIs, fetched from Google at that moment. The body marks each one with data-em-inline and the UUID of its attachment, so the images can be put back in place.
When to use: To render an email faithfully, after get_email, when body_html has data-em-inline markers or the attachments list has items with embedded: true.
When not to use: For files the sender attached (PDFs, documents), use get_email_attachment_content. This is not needed to read the text of the email: get_email already gives it.
Side effects: Calls the Google API inside the request, once per image, with the credentials of the mailbox, and stores nothing. It spends Gmail quota of the mailbox owner. Limits per call: 40 images, 5 MB each, 15 MB in total and 20 seconds; anything beyond them, anything that is not really a PNG, GIF, JPEG or WebP, and anything Google no longer has is returned in omitted. Also limited to 60 Google calls per minute per person and 150 per mailbox, and 2 at once per person and 4 per mailbox.
Permissions: Requires a CRM seat and the crm.contacts_companies.read capability. Reading the emails of an opportunity needs the crm.opportunities.read capability instead (it is always granted together with crm.contacts_companies.read) and read access to the pipeline of the opportunity. It also needs full_access to the email; with a lower level the answer is a 404. Only emails held by a mailbox the user owns, or one whose owner shared it with the user, can be seen at all, and each email shows only what the sharing level of that mailbox allows. Being the owner or assignee of a record gives no extra access to its emails.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the email. Get it from list_emails.
uuidQuery Parameters
UUID of the contact through which you reached the email (the one you listed it from). Send exactly one of contact, company and opportunity; an email that is not part of that record is a 404.
uuidUUID of the company through which you reached the email (the one you listed it from). Send exactly one of contact, company and opportunity; an email that is not part of that record is a 404.
uuidUUID of the opportunity through which you reached the email (the one you listed it from). Send exactly one of contact, company and opportunity; an email that is not part of that record is a 404.
uuidResponse Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://api.easymailing.com/emails/b3c1d8e4-52a7-4f19-8e06-7d9a2c4b1f35/inline_images?contact=3a9e1f52-6c47-4d08-b1a3-9e2d7c5f8a40&company=7f3c2a10-5b8e-4d1a-9c2e-3a6f0b9d4e21&opportunity=5d8a3c16-9e2b-4f70-a1c4-6b0e7d3f2a95" \ -H "X-Auth-Token: YOUR_API_KEY"{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "images": [ { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "data_uri": "string" } ], "omitted": [ "string" ]}