Expenses

Prepare an expense attachment upload reference

Prepare a metadata-only attachment reference for an expense receipt. This endpoint does not accept raw bytes, local file paths, signed URLs, or secrets. It returns an opaque fileReferenceId plus limits that a full MCP/API client can use before linking the uploaded file to an expense.

post/v1/expenses/attachments/uploads

Request

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

Request body

fileNamestring required

Filename only; local paths are rejected.

contentType'application/pdf' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/webp' | 'image/heic' | 'image/heif' | 'image/tiff' required
sizeBytesinteger required
expenseIdstring

Optional expense ID to scope the upload reference to.

checksumSha256string

Example request

{
  "fileName": "receipt.pdf"
}

Response

Attachment upload reference prepared

Example response

{
  "data": {
    "status": "prepared"
  }
}

Changes

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