Puzzle / Developers
API referenceAttachments

Create Attachment for Entity

POST /company/{id}/documents/{entityId}

POST/company/{id}/documents/{entityId}

Path Parameters

id*string

The company ID

Length1 <= length
entityId*string

The entity ID (e.g., bil_xxx for bills, txn_xxx for transactions, inv_xxx for invoices, je_xxx for journal entries, mje_xxx for manual journal entries)

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/company/string/documents/string" \  -H "Content-Type: application/json" \  -d '{    "documentType": "Receipt",    "fileName": "string",    "contentType": "string",    "base64File": "string",    "nativeDocumentId": "string"  }'
{  "transactionId": "string",  "manualJournalEntryId": "string",  "journalEntryId": "string",  "billId": "string",  "invoiceId": "string",  "document": {    "id": "string",    "documentType": "Receipt",    "contentType": "string",    "downloadInfo": {      "signedUrl": "string",      "urlExpiresAt": "string"    }  }}

Schema refreshed 2026-11-11T18:57:48.657Z