Deskew reads .eml (RFC 822) and Outlook .msg files with the email engine. The message itself is page 1; supported attachments are extracted and appended as further pages.
curl https://api.deskew.dev/v1/extract \ -H "Authorization: Bearer $DESKEW_API_KEY" \ -F "file=@invoice-2026-0193.eml" \ -F "output=json"Page 1: the message
Section titled “Page 1: the message”- Headers
From,To,Cc,DateandSubjectbecomekey_valueblocks and a bold key-value list at the top of the Markdown. - Body: the plain-text part is preferred; if only HTML exists it is converted to blocks and tables.
- Attachments are listed as
list_itemblocks with the file name and size, and under an Attachments heading in the Markdown.
Page 1 costs 1 credit.
Attachments
Section titled “Attachments”Attachments are recursed one level: a PDF, image, DOCX, XLSX, CSV, PPTX, HTML or TXT attachment is processed as if you had uploaded it, and its pages are appended after the message page with consecutive page numbers. Blocks and tables from an attachment carry meta.attachment: "<file name>" so you can tell which file they came from.
| Limit | Value |
|---|---|
| Attachments considered | First 10 |
| Attachment size | Up to 50 MB each; larger ones are listed but not processed |
| PDF attachment | First 50 pages |
| Image attachment | First 20 frames |
Nested emails (.eml inside .eml) |
Listed, not processed; a warning is added |
| Unsupported types (ZIP, legacy Office, executables) | Listed, not processed; a warning is added |
Attachment pages are billed at their own rates (1 per PDF page or image, sheet and slide rules for Office files). Scanned attachment pages count 4 work units for the sync/async decision, so an email with a scanned PDF attached is usually a background job.
An attachment that fails to parse does not fail the job: the email page gets a warning such as attachment failed: scan.pdf: The PDF is encrypted… and the rest continues. Attachment PDFs are opened without a password.
Detection
Section titled “Detection”A file is treated as email when it is text and at least two of the standard header lines (From:, To:, Subject:, Received:, Date:, Message-ID:, …) appear in the first 30 lines, or when its name ends in .eml. .msg files are recognised by their OLE2 structure.