Upload an attachment
Uploads a file into a mailbox, for an attachment of a message created with runEmailJmap: put the returned `blobId` in the message's body parts. Up to 25 MB; an upload no message uses is deleted after an hour. The caller must be able to read the mailbox: admins read every mailbox, other members the mailboxes assigned to them. An API token needs the `account` capability.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Request Body
application/octet-stream
TypeScript Definitions
Use the request body type in TypeScript.
binaryResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/workspaces/string/mail/jmap/upload/string" \ -H "Content-Type: application/octet-stream" \ -d 'string'{ "accountId": "string", "blobId": "string", "type": "string", "size": -9007199254740991}Read and send mail over JMAP POST
Runs a JMAP request (RFC 8620 and 8621) against the workspace's mailboxes and returns Cloady Mail's answer unchanged. Every call's `accountId`, and `fromAccountId` for Email/copy, must be written out (no `#accountId` references) and be the `accountId` of a mailbox from listMailboxes that the caller may read. Allowed methods: Mailbox/get, /changes, /query, /queryChanges and /set (without `shareWith`), Email/get, /changes, /query, /queryChanges, /set, /copy and /parse, Thread/get and /changes, SearchSnippet/get, Identity/get, EmailSubmission/get, /changes, /query and /set, and Quota/get. EmailSubmission/set sends only from a mailbox with `send` on, and counts toward the workspace's sending. Moving a message into or out of Spam trains the spam filter. A capability or method outside these answers 400; a mailbox the caller may not read 403. Message HTML comes as stored: sanitize it before showing it. The caller must be able to read the mailbox: admins read every mailbox, other members the mailboxes assigned to them. An API token needs the `account` capability.
Download an attachment or message GET
Downloads an attachment, or a whole message as .eml, by the `blobId` runEmailJmap returned, under the file name `name`. The blob must belong to that mailbox. `accept` sets the content type. The caller must be able to read the mailbox: admins read every mailbox, other members the mailboxes assigned to them. An API token needs the `account` capability.