Developers
API reference

Files

post/v1/files

Upload a file

files.createwrite tokenidempotent

Upload a file as multipart/form-data and get back its id, to send as file_id to an operation that needs a file: a document for alternatives.add_document, a bank's export for imports.create, a Rocket Money export for imports.create_rocket_money. The file is kept 24 hours (expires_at). Send an Idempotency-Key so a retry cannot upload it twice.

Parameters

Idempotency-Key
string | null · header
Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.
X-Organization-Id
string | null · header

Body · multipart/form-data

file
file · required
Any file, at most 15 MB.

Returns 201 · UploadedFile

content_type
string · required
As the upload declared it.
created_at
datetime · required
expires_at
datetime · required
When the file is deleted. Use it before then; upload it again after.
filename
string · required
id
integer · required
Send it as file_id to the operation that needs the file.
sha256
string · required
Hex SHA-256 of the bytes, to check what arrived.
size_bytes
integer · required
Example
curl -X POST "https://api.lumaledger.app/v1/files" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@path/to/file"

Try it isn't available for file uploads — use the curl example above.

delete/v1/files/{file_id}

Delete a file

files.deletewrite tokendestructiveidempotent

Delete a file before it expires. What an operation already made from it (an attached document, imported rows) stays.

Parameters

file_id
integer · path · required
X-Organization-Id
string | null · header

Returns 204 with no body.

Example
curl -X DELETE "https://api.lumaledger.app/v1/files/{file_id}" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"
get/v1/files/{file_id}

Get a file

files.getread tokenidempotent

A file's details, while it lasts. An expired file is not found.

Parameters

file_id
integer · path · required
X-Organization-Id
string | null · header

Returns 200 · UploadedFile

content_type
string · required
As the upload declared it.
created_at
datetime · required
expires_at
datetime · required
When the file is deleted. Use it before then; upload it again after.
filename
string · required
id
integer · required
Send it as file_id to the operation that needs the file.
sha256
string · required
Hex SHA-256 of the bytes, to check what arrived.
size_bytes
integer · required
Example
curl -X GET "https://api.lumaledger.app/v1/files/{file_id}" \
  -H "Authorization: Bearer $LUMALEDGER_TOKEN"

Objects

UploadedFile

A file uploaded for other operations to use by id (as file_id). It lasts until expires_at.

Fields

content_type
string · required
As the upload declared it.
created_at
datetime · required
expires_at
datetime · required
When the file is deleted. Use it before then; upload it again after.
filename
string · required
id
integer · required
Send it as file_id to the operation that needs the file.
sha256
string · required
Hex SHA-256 of the bytes, to check what arrived.
size_bytes
integer · required