Read and send mail over JMAP
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.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/workspaces/string/mail/jmap" \ -H "Content-Type: application/json" \ -d '{ "using": [ "string" ], "methodCalls": [ [ "string", { "property1": null, "property2": null }, "string" ] ] }'{ "methodResponses": [ [ "string", { "property1": null, "property2": null }, "string" ] ], "sessionState": "string", "createdIds": { "property1": "string", "property2": "string" }}Retry queued mail now POST
Attempts delivery now, for one queued message or for every queued message of the workspace, instead of waiting for its next retry. Needs the admin role.
Upload an attachment POST
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.