Skip to main content
You are viewing the documentation of release 26.1, which is no longer the current one. Go to the documentation of the current release 26.2.

Requirements

  • Authentication token

How to

1. Create a file

  • Creates new file from BLOB.
  • This request uses Content-Type: multipart/form-data.

Example

Request
Response
  • Response object contains the file hash of newly created file: dvab6ojbu0d4soh71ewo8kpxxeqlsa8odzbns5jwhwvd4c3nt44oudnnyyskek1d

Additional information regarding files

  • file can also be a signature image, profile image etc.
  • file is not a document → document is created from the file
  • in general first you create a file and then use it in some way (create a document, save it as a signature image etc….)
  • file hash is not created through hashing
  • file id vs file hash - when the file edited the hash changes, file id remains the same
  • some values work only for PDFs like pages

Example web form

This code sets up an event listener for the form’s submit event, and in the handler, it prevents the default submit behavior. It creates a new instance of FormData, appends the selected file to it, creates a new XMLHttpRequest object, opens a POST request to the API endpoint with the token added to the URL, sets the onload property to a callback function that logs the response or any errors, and finally sends the FormData object in the request body.

Download binary data