cloadyDocs
API ReferenceEndpointsWorkspaces

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.

POST
/api/workspaces/{workspaceSlug}/mail/jmap
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string

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"  }}