Surepass
Files

Upload asset

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
headerAuthorizationBearer <token>

Bearer token authentication. Paste your access token below.

Request Body

multipart/form-data
  1. body
file*file

JPEG or PNG image to upload.

Formatbinary

Response Body

Asset uploaded successfully.

application/json
  1. response

Standard response envelope.

status_code?integer

HTTP status code echoed in the response body.

message?string

Human-readable result message.

success?boolean

true when the request succeeded.

data?
Example Request
curl -X POST 'https://prod-esign-api-v2.surepass.app/api/v1/files/upload-asset' \
  -F 'file=string'
Example Response
{
  "data": {
    "user_id": "user_xxx",
    "client_id": "file_faceReferenceImage",
    "name": "reference.png",
    "mime": "image/png"
  },
  "status_code": 200,
  "message": "Success",
  "success": true
}