Expenses

Attach a file reference to an expense

Appends an existing safe file reference to an expense. The request accepts metadata only: no raw bytes, local paths, signed URLs, or secrets. MIME type and size are validated server-side.

post/v1/expenses/{expenseId}/attachments

Request

  • Base URL: https://api.frihet.io
  • URL: https://api.frihet.io/v1/expenses/{expenseId}/attachments
  • Auth: API key in header X-API-Key

Path parameters

expenseIdstring required

Expense unique identifier

Request body

fileIdstring

Opaque uploaded file reference. Not a path or URL.

fileReferenceIdstring

Opaque uploaded file reference. Not a path or URL.

originalNamestring

Filename only; local paths are rejected.

fileNamestring

Filename only; local paths are rejected.

contentType'application/pdf' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/tiff'
sizeinteger
sizeBytesinteger
checksumSha256string

Response

Attachment reference appended

Changes

No recorded changes to this operation across all 1 revision of this API.