Email & PEC

Stage a file for a draft

Uploads a file as base64 and stores it content-addressed, WITHOUT attaching it to anything yet. Returns a sha256 (plus filename, content_type, size_bytes and — for inline: true — a content_id): pass those in the attachments array of email_update_draft to actually name it on a draft (email_draft itself does not accept attachments). Accepts up to 8 MB decoded; anything larger belongs in the web app.

post/api/v1/rest/email/attachments

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/email/attachments
  • Auth: HTTP bearer

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Request body

filenamestring required
content_base64string required

The file’s bytes, base64-encoded.

content_typestring
inlineboolean

true to embed as <img src="cid:…"> rather than attach as a file.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

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