Skip to content

Create a file

Request

Upload a file of a document side (page), a selfie, or a video. The response returns a file_id. Use it in the front_side_id, back_side_id, or other_side_1_id–other_side_3_id parameter of a Create document or Update a document request.

Send the file in the file field of a multipart/form-data body. See the file requirements in the Files section overview.

Image processing

Our system converts uploaded images to JPEG. If the longer side of an image is larger than 4096 px, our system reduces it to 4096 px. PDF and video files are not converted on upload.

Security
API-Key
Bodymultipart/form-datarequired
filestring, (binary)required

The file to upload, as binary data. Send one file per request.

{
  "file": "string"
}

Responses

OK

The request was successful, and our system created the file.

Bodyapplication/json
file_idstring, = 36 characters^[a-f0-9-]{36}$

The file unique identifier. Our system returns it in the response to the Create a file request. Use it in the front_side_id, back_side_id, or other_side_1_id–other_side_3_id parameter of a document.

Example:"3c4d5e6f7a8b3c4d5e6f7a8b3c4d5e6f7a8b"
Response
{ "file_id": "3c4d5e6f7a8b3c4d5e6f7a8b3c4d5e6f7a8b" }