Skip to main content
POST
/
jobs
Submit a job
curl --request POST \
  --url https://api.filecheck.io/jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sources": [
    "<unknown>"
  ],
  "ruleId": "<string>",
  "channel": "api",
  "customerId": "<string>",
  "orderId": "<string>",
  "policy": {
    "onFail": "reject"
  },
  "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

Canonical job submission. Each entry in sources[] is a single source file plus the ordered steps[] to run on it. Step types compatible with the source's auto-detected fileType are kept; incompatible steps are recorded as skipped in the audit log. Async (201) by default; set sync: true to wait up to ~27 s for completion (200) or 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 source files to process. Each becomes its own Task under a single Job.

Required array length: 1 - 50 elements
ruleId
string

Optional Rule id (rule_xxx) recorded on the Job for downstream routing/reporting. Not consumed by the pipeline itself.

channel
enum<string>
default:api
Available options:
api,
store,
admin
customerId
string | null
orderId
string | null
policy
object
sync
boolean
default:false

When true, wait up to ~27 s for the job to reach a terminal status. Returns 200 with { job } on completion or 202 with pending: true on timeout. Default false (async 201).

webhook
any
metaData
any

Response

Sync completion (sync: true)

job
object