Skip to content

Update a file

Request

Replace the content of a file that was created with a Create a file request. The file requirements are the same as for a new file. See the Files section overview.

If the file is attached to a document that is already used in a verification, our system does not change the original file. It creates a new file and returns a new file_id. Send the new file_id in an Update a document request to attach it to the document.

Security
API-Key
Path
file_idstring, = 36 characters^[a-f0-9-]{36}$required

The ID of the file to update.

Example:3c4d5e6f7a8b3c4d5e6f7a8b3c4d5e6f7a8b
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. Our system updated the file, or created a new file if the original file is used in a verification. Always use the file_id from the response.

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

The file is not used in a verification. Our system replaced the file content and returned the same file_id.

{ "file_id": "3c4d5e6f7a8b3c4d5e6f7a8b3c4d5e6f7a8b" }