Skip to main content
POST
Start a detection

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-sample-run
boolean
default:false

Body

application/json

One document, named either by upload id or by a URL the API fetches.

doc_type
enum<string>
required

The type of document that you expect.

Available options:
passport,
id_card,
paystub,
benefit_statement,
bank_statement
region
enum<string>
required

The jurisdiction that issued the document.

Available options:
US,
CA,
BR
upload_id
string | null

The prefix uploads/<upload_id>/ that already holds exactly one file. Use this field only if you write to object storage yourself. Give either this field or source_url, but not both.

Pattern: ^[A-Za-z0-9-]+$
source_url
string | null

An http or https URL that the API downloads. A presigned URL is acceptable. The API does not keep the URL. The document must be 50 MB or less, and must be a PDF, PNG, JPEG, TIFF, or WebP file.

submitted_by
string | null

The owner of this detection. Give the identifier of your end user to keep the detections of your users separate. The API uses your OAuth client if you omit this field.

Response

The detection is queued.

The receipt for a new detection. The verdict is not ready yet.

id
string
required

The detection id. Use it to read the result.

status
enum<string>
required

Always QUEUED for a new detection.

Available options:
QUEUED,
RUNNING,
COMPLETED,
FAILED
billable
boolean
required

False if the request set X-Sample-Run.