Upload a file into a draft.

post/v1/mailboxes/{mailboxId}/drafts/{draftId}/files

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL /authorize, token URL /oauth/token, scopes: email.write)
    • HTTP bearer

Path parameters

mailboxIdstring required
draftIdstring required

Query parameters

filenamestring required

Bounds mirroring domain/email/message-part.ts — every one of these arrives in a stranger's MIME headers, so the cap is the contract, not tidiness.

The file's name, as it will be sent. ⚠️ A query parameter only because the emitter hands an Http.File upload over without the filename its Content-Disposition carries (typespec-emitters FEEDBACK-from-foundermail item 10, UPSTREAM row 43); once it does, this goes.

Request body */*

unknown required

Response

The request has succeeded and a new resource has been created as a result.

fileIdstring required

Name it to a send as { fileId }, or to removeDraftFile.

filenamestring required

Bounds mirroring domain/email/message-part.ts — every one of these arrives in a stranger's MIME headers, so the cap is the contract, not tidiness.

contentTypestring required
sizeinteger required

Octets.

Changes

No recorded changes to this operation across all 1 revision of this API.