Skip to main content
POST
/
jobs
/
preflight
Preflight a file
curl --request POST \
  --url https://api.filecheck.io/jobs/preflight \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sources": [
    "<unknown>"
  ],
  "sync": false,
  "webhook": "<unknown>",
  "metaData": "<unknown>"
}
'
{
  "job": {
    "id": "<string>",
    "createdAt": "<string>",
    "modifiedAt": "<string>",
    "status": "<string>",
    "outcome": "<string>",
    "ruleId": "<string>",
    "workflowId": "<string>",
    "metaData": {},
    "tasks": [
      {
        "id": "<string>",
        "createdAt": "<string>",
        "updatedAt": "<string>",
        "status": "<string>",
        "outcome": "<string>",
        "fileType": "<string>",
        "mimeType": "<string>",
        "source": "<string>",
        "fileRef": "<string>",
        "clientRef": "<string>",
        "jobId": "<string>",
        "originalArtifact": {},
        "outputArtifacts": [
          {
            "kind": "<string>",
            "role": "<string>",
            "bucket": "<string>",
            "key": "<string>",
            "downloadUrl": "<string>",
            "expiresIn": 123
          }
        ],
        "steps": [
          {
            "id": "<string>",
            "type": "<string>",
            "status": "<string>",
            "reason": "<string>",
            "params": {},
            "runtimeParams": {},
            "started": "<string>",
            "ended": "<string>",
            "duration": 123,
            "outputs": [
              {}
            ]
          }
        ]
      }
    ],
    "orderId": "<string>",
    "customerId": "<string>",
    "customerEmail": "<string>",
    "summary": {},
    "results": {}
  }
}

Authorizations

Authorization
string
header
required

Your secret key as a bearer token, e.g. Authorization: Bearer sk_live_…. Secret keys are server-side only.

Body

application/json

Submit one or more files for preflight. By default the response is 201 Accepted and the job runs asynchronously. Set sync: true to wait up to ~27 s for the result (200 on completion, 202 + pending: true on timeout). An optional webhook is called when the job reaches a terminal status regardless of sync mode.

sources
any[]
required

List of files to preflight. Each becomes its own Task under a single Job. Even a single file must be wrapped in an array.

Required array length: 1 - 50 elements
sync
boolean
default:false

When true, the request waits for the job to complete (up to ~27 s). Returns 200 with { job } on success, or 202 with pending: true on timeout. The default is false (async 201).

webhook
any
metaData
any

Response

Sync completion (sync: true)

job
object