upload_attachment
Upload a file as a note attachment linked to a party, opportunity, or project. Provide the file as base64 with filename and MIME type.
Instructions
Upload a file as a new note attachment, linked to a party, opportunity, or project. Provide the file as base64-encoded dataBase64 along with filename and contentType (MIME). Also provide exactly one of partyId / opportunityId / projectId to anchor the note. Optionally pass content to set the note body (defaults to '[attachment]'). Two-step orchestration server-side: bytes upload → token → note creation. Adding to an existing entry is not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Filename Capsule should record (e.g. 'contract.pdf'). Capsule does NOT validate consistency between filename, contentType, and the actual bytes — a typo in either is accepted and the file is stored as labelled. | |
| contentType | Yes | MIME type of the file (e.g. 'application/pdf', 'image/png', 'text/plain'). Trusted by Capsule verbatim; not cross-checked against `filename` or the actual bytes. | |
| dataBase64 | Yes | File contents, base64-encoded. Decoded server-side and uploaded as the request body. Maximum 25 MB per attachment (Capsule's documented limit); the connector rejects oversized base64 before uploading. The inbound HTTP body limit is ~35 MB which leaves room for the base64 expansion of a 25 MB binary. | |
| content | No | Body text for the note that will hold the attachment. Defaults to '[attachment]' if omitted. | |
| partyId | No | Link the new note to a party (mutually exclusive with opportunityId / projectId). | |
| opportunityId | No | ||
| projectId | No |