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>"
}
'import requests
url = "https://api.filecheck.io/jobs/preflight"
payload = {
"sources": ["<unknown>"],
"sync": False,
"webhook": "<unknown>",
"metaData": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sources: ['<unknown>'],
sync: false,
webhook: '<unknown>',
metaData: '<unknown>'
})
};
fetch('https://api.filecheck.io/jobs/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filecheck.io/jobs/preflight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sources' => [
'<unknown>'
],
'sync' => false,
'webhook' => '<unknown>',
'metaData' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.filecheck.io/jobs/preflight"
payload := strings.NewReader("{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.filecheck.io/jobs/preflight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.filecheck.io/jobs/preflight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}
}{
"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": {}
}
}{
"pending": true,
"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": {}
}
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}Preflight a file
Sugar wrapper. Runs a preflight-only job. Async (201) by default; sync: true waits for the result.
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>"
}
'import requests
url = "https://api.filecheck.io/jobs/preflight"
payload = {
"sources": ["<unknown>"],
"sync": False,
"webhook": "<unknown>",
"metaData": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sources: ['<unknown>'],
sync: false,
webhook: '<unknown>',
metaData: '<unknown>'
})
};
fetch('https://api.filecheck.io/jobs/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filecheck.io/jobs/preflight",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sources' => [
'<unknown>'
],
'sync' => false,
'webhook' => '<unknown>',
'metaData' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.filecheck.io/jobs/preflight"
payload := strings.NewReader("{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.filecheck.io/jobs/preflight")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.filecheck.io/jobs/preflight")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sources\": [\n \"<unknown>\"\n ],\n \"sync\": false,\n \"webhook\": \"<unknown>\",\n \"metaData\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}
}{
"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": {}
}
}{
"pending": true,
"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": {}
}
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}{
"error": true,
"message": "<string>"
}Authorizations
Your secret key as a bearer token, e.g. Authorization: Bearer sk_live_…. Secret keys are server-side only.
Body
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.
List of files to preflight. Each becomes its own Task under a single Job. Even a single file must be wrapped in an array.
1 - 50 elementsWhen 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).
Response
Sync completion (sync: true)
Show child attributes
Show child attributes