Upload files to a client
Needs a token with the write:clients scope. Authentication
Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.
Attaches 1 to 10 files (up to 20 MB each; PDF, PNG, JPEG, WebP, Excel, Word, CSV or text, checked from the bytes) sent as multipart/form-data in files[]. The SHA-256 of the bytes is compared workspace-wide: a file already in Documents is linked to the client instead of stored again (the original name, uploader and id are returned, so retrying is safe); a file that is already an expense receipt, or two identical files in one batch, are refused with 409 duplicate_file (details existing_id, existing_name, resource when you may see it). Nothing is stored when any file is refused. Other errors: 413 payload_too_large, 422 validation_failed on files (none, too many, too large, unsupported type), 404 unknown client. 201 returns the files in upload order.
bearerAuthAuthorizationBearer <token>A personal API token, hvt_…, with scopes such as read:* or write:invoices
id*stringThe client's id.
multipart/form-data- body
files[]*array<>1 to 10 files of up to 20 MB each: PDF, PNG, JPEG, WebP, Excel, Word, CSV or text. The type is checked from the bytes, not the name.
Created
application/json- response
data*array<>curl -X POST 'https://app.helvetly.com/api/v1/clients/string/files' \ -F 'files[]=[ "string"]'{ "data": [ { "id": "string", "name": "string", "size": 0, "content_type": "string", "created_at": "2019-08-24T14:15:22Z", "uploaded_by": { "id": "string", "name": "string" } } ]}