Skip to main content
POST
Upload an attachment

Authorizations

Authorization
string
header
required

Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx (production) or Bearer sk_test_xxx (sandbox)

Headers

X-End-User-Id
string
required

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.

Example:

"user-001"

Query Parameters

provider
string
required

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.

Example:

"hubspot"

Body

multipart/form-data

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.

file
file
required

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.

file_name
string

Optional override for the on-disk filename. Falls back to the uploaded file's own name if omitted.

Example:

"team-lunch-receipt.pdf"

mime_type
string

Optional MIME type override. Falls back to the multipart part's Content-Type if omitted.

Example:

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

Available options:
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.

Example:

"019d04a5-invoice-uuid"

integration_params
object

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.

success
boolean
required

Always true for successful (2xx) responses.

Example:

true

statusCode
integer
required

HTTP status code mirrored inside the envelope. 201 on successful upload.

Example:

201

message
string
required
Example:

"Created"

data
Attachment · object
required

The uploaded attachment record.