Skip to main content
Several create endpoints accept an optional attachments field: a JSON array of objects (not raw strings or bare URLs). Each object describes one file for the AI pipeline. Endpoints that use this shape include (non-exhaustive): invoices, bills, expenses, income, journals, contacts, chart of accounts (POST /accounts), and POST /bank-transactions/upload.

Attachment object

type values for file

Examples

One PDF as Base64

File hosted at a URL

Usage notes

  • Base64: never omit type. Sending only a long string in file without "type": "base64" is invalid for Base64 content.
  • Multiple attachments: each object is processed; for async jobs, processing is often one job per attachment.
  • Omit or empty array: use [] or omit attachments when you only send prompt and optional text_attachment.
  • Bank statement files: for POST /bank-transactions/upload, supported types follow the filename extension: pdf, csv, xlsx, xls, and common images (jpg, jpeg, png, webp, gif, bmp). Other AI pipelines may accept different formats per their service rules.