apyhub
FILE CONVERSION · FILE MANIPULATION

Deskew PDF API

What it does

PDF Deskewer straightens tilted PDF pages so scanned documents are easier to read and process. Send one or more PDF files and get back queued deskew jobs with job IDs, filenames, status, and progress.

Use it when scans come in at a slight angle and you need cleaner pages for archiving, review, or downstream document workflows. The service is built around asynchronous processing: create a job, check its status with the job ID, and download the finished PDF when it is done.

You can also track multiple jobs together with the overall status endpoint. It returns an aggregate status, progress, and per-job details, which is useful when you are deskewing batches of reports, forms, or receipts and want a single progress view for the whole set.

The responses are straightforward: job status endpoints return job ID, status, progress, and an optional error field, while the download endpoint returns the completed file as binary output.

▣ ENDPOINT 01 / 04
POST
Deskew PDF pages to fix small angle tilts
http://localhost:8080/pankajretestflows/deskew-pdf

QUICKSTART

GUIDE

Quickstart

Upload one or more PDF files to deskew.

curl -X POST "http://localhost:8080/pankajretestflows/deskew-pdf" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/report.pdf"

What you'll get back

Returns a JSON object with a jobs array. Each item in jobs is an object with job_id, filename, status, and progress fields describing the queued deskew job.

{
  "jobs": [
    {
      "job_id": "a1b2c3d4",
      "filename": "report.pdf",
      "status": "queued",
      "progress": 0
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
files*
PDF files to deskew.

About this endpoint

What it does

Uploads one or more PDF files and starts deskew processing for each file to correct small angle tilts. The response returns a job list with the processing status and progress for each submitted file.

Request Body

ParameterTypeMandatoryDescription
filesObject ArrayYesPDF files to deskew. Each array item is a binary file.

Response

Returns a JSON object with a jobs array field. Each item in jobs is an object containing job_id, filename, status, and progress for a submitted file.

ParameterTypeMandatoryDescription
jobsObject ArrayYesArray of job objects created for the uploaded files.
jobs[].job_idStringYesJob identifier.
jobs[].filenameStringYesName of the submitted file.
jobs[].statusStringYesCurrent job status.
jobs[].progressIntegerYesCurrent progress value.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job identifier from jobs[].job_id.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 04
GET
Get the status of a deskew job
http://localhost:8080/pankajretestflows/deskew-pdf/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a deskew job by replacing :job_id in the URL path.

curl -X GET "http://localhost:8080/pankajretestflows/deskew-pdf/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with job_id as a string, status as a string (queued, processing, done, or failed), progress as an integer from 0 to 100, and error as a nullable string.

{
  "job_id": "job-12345",
  "status": "processing",
  "progress": 60,
  "error": null
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Checks the current status of a deskew PDF job and returns the job identifier, status, progress, and any error message reported by the job.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesIdentifies the deskew job to look up.

Response

Returns a JSON object with job_id, status, and progress fields, plus an optional error field. The status value is one of queued, processing, done, or failed; progress is an integer from 0 to 100.

AttributeTypeMandatoryDescription
errorStringNoError message for the job, if one is available. Nullable.
job_idStringYesThe identifier of the deskew job.
statusENUMYesCurrent job state: queued, processing, done, or failed.
progressIntegerYesProgress percentage from 0 to 100.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ ENDPOINT 03 / 04
GET
Download a finished deskew output
http://localhost:8080/pankajretestflows/deskew-pdf/download/:job_id

QUICKSTART

GUIDE

Quickstart

Download the deskewed PDF for a completed job by replacing job_id in the path.

curl -X GET "http://localhost:8080/pankajretestflows/deskew-pdf/download/:job_id"

What you'll get back

Returns a binary file response (string with format: binary), so the download is the response body itself.

(binary file content)
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Downloads the finished deskew output file for a previously created job. The job_id is provided in the path, and the response is the binary file content.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesThe job identifier.

Response

Returns a binary response body containing the finished deskew output file.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ ENDPOINT 04 / 04
GET
Aggregate progress across deskew jobs
http://localhost:8080/pankajretestflows/deskew-pdf/overall-status

QUICKSTART

GUIDE

Quickstart

Check the overall status for one or more deskew PDF jobs by passing the job_ids query parameter.

curl -X GET "http://localhost:8080/pankajretestflows/deskew-pdf/overall-status?job_ids=job-123" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with required status and progress fields, plus optional details, total_files, and completed_files.

  • status is a string enum: unknown, queued, processing, done, or failed.
  • progress is an integer from 0 to 100.
{
  "status": "processing",
  "progress": 60,
  "details": [
    {
      "job_id": "job-123",
      "status": "processing",
      "progress": 60
    }
  ],
  "total_files": 1,
  "completed_files": 0
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns aggregate progress information for one or more deskew jobs specified by job_ids in the query string. The response includes the overall status, aggregate progress, and optional summary fields for file counts and per-job details.

Query Parameter(s)

AttributeTypeMandatoryDescription
job_idsStringYesComma-separated job identifiers used to calculate the overall deskew progress.

Response

Returns a JSON object with required status and progress fields, plus optional details, total_files, and completed_files fields. status is an enum describing the aggregate job state, and progress is an integer from 0 to 100.

AttributeTypeMandatoryDescription
statusENUMYesAggregate status. Allowed values: unknown, queued, processing, done, failed.
detailsObject ArrayNoPer-job breakdown entries, each containing job_id, status, and progress.
total_filesIntegerNoTotal number of files included in the aggregate status calculation.
completed_filesIntegerNoNumber of files that have completed processing.
progressIntegerYesOverall progress percentage from 0 to 100.

Notes

The details array contains objects with job_id as a string, status as a string, and progress as an integer. progress is constrained to the inclusive range 0–100.

Query parameters

Name
Type
Description
job_idsREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.