The attachment schema
Each attachment is represented by anAttachmentSchemaOut object. The attachments field on a record’s create and read payloads is an array of these objects.
| Field | Type | Required | Notes |
|---|---|---|---|
id | integer | Yes | The attachment’s unique identifier. |
file_name | string | Yes | The display file name. |
file_size | integer | Yes | File size in bytes. |
download_url | string or null | No | URL to download the file. |
upload_url | string or null | No | URL to upload the file content. |
category | string | No | Defaults to default. |
Add attachments when you create a record
You can include attachments in theattachments array when you create a record. For example, a POST to /public/v2/invoices/ accepts an attachments array alongside the rest of the invoice payload, where each element follows the AttachmentSchemaOut shape above.
The following example creates an invoice with one attachment reference:
Add attachments to an existing record
To attach files to a record that already exists, send aPOST to that record’s attachments sub-resource. For an invoice, the endpoint is /public/v2/invoices/{record_number}/attachments/. Every record type listed above exposes the same {record_number}/attachments/ pattern, so the call shape is consistent across resources.
Replacing or deleting attachments
The V2 API does not provide a dedicated endpoint to delete or replace an attachment. The attachments sub-resource supports adding attachments only; there is no delete or replace operation on it.Because there is no delete-attachment endpoint, plan your integration to add attachments correctly the first time rather than relying on later removal. If your workflow requires removing an attachment from a posted record, raise it with your DualEntry contact so the supported path can be confirmed for your case.
