Detect Form (Sync)
Detect fields in a PDF form and wait for the generated edit schema before returning. This endpoint has a 5-minute timeout — if processing takes longer, the request will fail.
Note: For production workloads, use POST /form_detection_runs and receive the result by webhook or poll GET /form_detection_runs/{id} instead. The asynchronous API is more reliable for large files and avoids request timeout issues.
The response is a completed form_detection_run. Its output.schema can be passed directly to POST /edit or POST /edit_runs.
For more details, see the Detect Form guide. See Editing Error Handling for HTTP errors and run failure reasons.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Headers
API version to use for the request. If you’re using an SDK, you can ignore this parameter. If you are not using an SDK and do not specify a version, you will either receive a 400 Bad Request or be set to a previous legacy version. See API Versioning for more details.
Request
Response
The type of object. Will always be "form_detection_run".
A unique identifier for the form detection run.
Example: "sgr_xK9mLPqRtN3vS8wF5hB2cQ"
The status of the form detection run:
"PROCESSING"- The form is still being analyzed"PROCESSED"- Form detection completed successfully"FAILED"- Form detection failed (seefailureReasonfor details)
The reason for failure.
Availability: Present when status is "FAILED".
Possible values include:
UNABLE_TO_DOWNLOAD_FILEFILE_TYPE_NOT_SUPPORTEDFILE_SIZE_TOO_LARGECORRUPT_FILEFIELD_DETECTION_ERRORPASSWORD_PROTECTED_FILEFAILED_TO_CONVERT_TO_PDFEMPTY_SCHEMAINTERNAL_ERRORINVALID_OPTIONSOUT_OF_CREDITS
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
A human-readable description of the failure.
Availability: Present when status is "FAILED".
The detected schema and optional mapping metadata.
Availability: Present when status is "PROCESSED".
Metrics about the form detection process.
Availability: Present when status is "PROCESSED".

