Upload an attachment
Upload a file as a canonical Attachment. Multipart only (Content-Type: multipart/form-data). Per-file size cap: 25 MB. Optionally attach to a parent record by supplying related_object_type + related_object_id. The response includes a signed RouteMCP proxy URL (file_url) you can use to fetch the file content.
Authorizations
Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx (production) or Bearer sk_test_xxx (sandbox)
Headers
Identifier of the end user whose connected provider should be queried. This is the same endUserId you supplied when creating the connect token. Required on every CRM and accounting call.
"user-001"
Query Parameters
Provider slug identifying which connected provider to target (e.g. hubspot, pipedrive, zoho-crm, quickbooks-online, xero, zoho-books). Required — single-record operations always target a specific provider.
"hubspot"
Body
Multipart form body. The file part carries the binary file content and is required; all other parts are optional metadata that lets you name the file, set its MIME type, or link it to a parent record.
Multipart write body for POST /accounting/attachment. Send the binary file content in the file part. Per-file size cap: 25 MB. Content replacement is not supported on Update/Patch — DELETE and POST a new file to replace an existing one.
Binary file content. Use a file form field in the multipart body — every modern OpenAPI tool (Mintlify, Scalar, Postman, Swagger) renders a native file-picker for this.
Optional override for the on-disk filename. Falls back to the uploaded file's own name if omitted.
"team-lunch-receipt.pdf"
Optional MIME type override. Falls back to the multipart part's Content-Type if omitted.
"application/pdf"
Optional canonical type of a parent record to attach to. Provider support varies — Xero's Files API uploads to the library by default; QBO attaches to the referenced record.
INVOICE, BILL, EXPENSE, PURCHASE_ORDER, JOURNAL_ENTRY, CONTACT, ITEM Optional id of the parent record (in URN or raw form). Required when related_object_type is set.
"019d04a5-invoice-uuid"
Provider-specific passthrough fields. Encoded as a JSON-stringified value when sent over multipart.
Response
Attachment uploaded.
Envelope returned by POST /accounting/attachment. data is the canonical Attachment record, including a RouteMCP-proxied file_url for downloading the file content.