publ betaReference (MCP guide)
Open publ console

email_image_upload

# email_image_upload

Upload one image for the email editor in the Email app (pApp F00003). Returns its URL. Requires a DRAFT or SCHEDULE email, and file {filename, base64, contentType} (PNG/JPEG up to 1 MiB, as the console editor). The file is relayed once to the mailer in memory and not kept; links are not accepted. Write: does not change the body or send. A lost receipt stays pending and is never resent; task_resume only observes, and prepared work needs the identical apply. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once.

## Inputs

| Field | Required here | Contract |
| --- | --- | --- |
| `emailId` | Yes | string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `file` | Yes | object; Original PNG/JPEG up to 1 MiB, as the console editor allows (email-content-editor.keys IMAGE limits). Relayed once to the mailer and not kept. |
| `file.filename` | Yes | string; min length 1; max length 240; pattern `^[^/\\:\x00-\x1f\x7f]+$` |
| `file.base64` | Yes | string; min length 4; max length 1398104 |
| `file.contentType` | Yes | string; max length 120; pattern `^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$`; Original MIME type (image/png, image/jpeg, text/csv). |
| `confirmToken` | No | string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |