cloadyDocs
API ReferenceEndpointsWorkspaces

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.

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

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
accountId*string

Request Body

application/octet-stream

TypeScript Definitions

Use the request body type in TypeScript.

body?file
Formatbinary

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/upload/string" \  -H "Content-Type: application/octet-stream" \  -d 'string'
{  "accountId": "string",  "blobId": "string",  "type": "string",  "size": -9007199254740991}