Create file upload
Starts a direct upload of a PDF: returns a URL to PUT the PDF to, straight to Finta’s file
storage, and the file_id the PDF becomes. Use it where a multipart request isn’t
practical, such as an AI agent connected through the MCP that runs curl from its terminal.
Requires API access: Manage and Taxes: Manage.
Send the file’s filename, its size in bytes, and its MD5 checksum in base64. Then PUT
the file’s bytes to url with every header in headers, before expires_at (10 minutes):
Storage accepts only bytes that match size and checksum, so a URL can’t be used to store a
different file, and each call returns a new URL and file. The PDF check happens when a tax
upload attaches the file: a file with no content yet, or one that is not a PDF, is refused
then with invalid_file. Like a file from Create file, it attaches once and is deleted if
nothing attaches it within 24 hours of this call.
Authorizations
API key prefixed with finta_
Body
The PDF's file name, kept and shown on the Taxes page.
1The file's length in bytes, such as from wc -c < return.pdf.
1 <= x <= 5368709120The file's MD5 digest in base64, such as from openssl md5 -binary return.pdf | base64.
^[A-Za-z0-9+/]{22}==$Response
The upload URL and the file it becomes.
file_upload The file the PDF becomes once it is PUT to url. Pass it to a tax upload.
^file_[A-Za-z0-9]+$Signed storage URL to PUT the PDF's bytes to. Treat it as a secret.
PUT Headers to send with the PUT, exactly as given (Content-Type, Content-MD5 and Content-Disposition).
Unix seconds after which url stops working, 10 minutes after the call. The file itself can be attached for 24 hours.