Surepass
Files

Upload asset

View as Markdown
POST
/api/v1/files/upload-asset

Upload an image asset (JPEG or PNG). Use the returned client_id as:

  • face_ref_file_id on a signer to enable face verification, or
  • the value of an image element placed on the document.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication — paste your access token below.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

file*file

JPEG or PNG image to upload.

Formatbinary

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/files/upload-asset" \  -F file="string"
{  "data": {    "user_id": "user_xxx",    "client_id": "file_faceReferenceImage",    "name": "reference.png",    "mime": "image/png"  },  "status_code": 200,  "message": "Success",  "success": true}