/decode

Create a decode job from an email. Supports two input modes via email.type:

EML mode (type: "eml"): Upload an .eml file as a Document via POST /documents (with an empty links array), then pass the document ID.

JSON mode (type: "json"): Pass the email body as a string (HTML or plain text, auto-detected). Optionally include metadata (from, to, cc, subject) and pre-uploaded attachment document IDs.

Provide either a shapeId or a magicInboxId to configure the decode pipeline. The response contains the created transport draft(s). Poll GET /drafts/{id} to track extraction progress.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request to create a decode job. Set email.type to "eml" for raw EML file input or "json" for structured email content.

email
required
string
length ≥ 1

Internal TransportShape id (UUID) that structures the extracted data and decides which objects a submit creates. Provide exactly one of shapeId or magicInboxId.

string
length ≥ 1

Internal MagicInbox id (UUID) whose custom instructions, presets, fallbacks, magic fields, and auto-actions are applied to the decode. Provide exactly one of shapeId or magicInboxId.

Responses

400

Bad request — invalid EML file, document not yet uploaded, attachment document not yet uploaded, invalid magicInboxId, or missing/conflicting shapeId and magicInboxId

401

unauthorized

404

Document, attachment document, or MagicInbox not found

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json