Skip to main content
Creating a review is fire-and-forget: you get a review_id back immediately, the review processes asynchronously, and Flightline notifies you the moment it reaches a terminal state. The flow is create, get notified, read the report.

1. Create a review

Attach the full case package when you create the review. A single archive is the recommended shape; individual PDFs/images are also accepted for smaller submissions.
Upload a full case archive directly with multipart/form-data:
curl -X POST https://api.flightlinehq.com/v1/reviews \
  -H "Authorization: Bearer fl_live_..." \
  -F "reference_id=LN-2026-0042" \
  -F "review_type=mortgage_v1" \
  -F "documents=@full-case.zip;type=application/zip"
The response returns the created review immediately, with status: "processing":
{
  "review_id": "9b1f....",
  "status": "processing",
  "reference_id": "LN-2026-0042",
  "review_type": "mortgage_v1",
  "document_count": 18,
  "report_available": false,
  "created_at": "2026-05-30T18:00:00Z",
  "updated_at": "2026-05-30T18:00:00Z"
}
Accepted case packages: .zip, .tar, .tar.gz, and .tgz. Inside the package, include PDFs and common image files (.png, .jpg/.jpeg, .tif/.tiff, .webp, .gif, .bmp). RAR/7z archives, nested archives, executables, scripts, Office files, spreadsheets, email containers, and password-protected or corrupt archives are not accepted.

2. Get notified when it completes

Recommended: webhooks. Register a webhook endpoint once, then handle the review.completed event (and review.failed). When review.completed arrives, verify the signature and fetch the report. No polling required. See Webhooks for registration and signature verification.
{
  "event": "review.completed",
  "review_id": "9b1f....",
  "reference_id": "LN-2026-0042",
  "status": "completed",
  "occurred_at": "2026-05-30T18:09:12Z"
}
Fallback: polling. If your environment cannot receive webhooks, poll GET /reviews/{review_id} and read status, which moves through queued, processing, then completed or failed. Use exponential backoff (for example 2s, 4s, 8s, capped around 30s) rather than a tight loop. The review is ready when report_available is true.

3. Read the report

curl https://api.flightlinehq.com/v1/reviews/9b1f.../report \
  -H "Authorization: Bearer fl_live_..."
{
  "review_id": "9b1f....",
  "status": "completed",
  "outcome": "issues_found",
  "summary": { "total": 2, "critical": 0, "high": 1, "medium": 1, "low": 0, "info": 0 },
  "issues": [
    {
      "code": "APR-003",
      "severity": "high",
      "category": "compliance",
      "title": "APR tolerance exceeded",
      "summary": "The disclosed APR differs from the recalculated APR beyond tolerance."
    }
  ],
  "generated_at": "2026-05-30T18:09:12Z"
}
The report endpoint returns 404 while the review is still processing and 422 if it failed, so results never leak before the review is finished.

In your language

Create the review, then let the review.completed webhook tell you it is ready (see Webhooks for the handler and signature check):
curl -X POST https://api.flightlinehq.com/v1/reviews \
  -H "Authorization: Bearer $FLIGHTLINE_API_KEY" -H "Content-Type: application/json" \
  -d '{"reference_id":"LN-2026-0042","review_type":"mortgage_v1",
       "documents":[{"filename":"full-case.zip","content_type":"application/zip",
                     "url":"https://files.example.com/signed/full-case.zip"}]}'
# Flightline POSTs a review.completed webhook when done; then GET /reviews/{id}/report
Prefer webhooks over polling in production: you skip the poll loop entirely and find out the moment a review finishes.