Get Form Detection Run

Retrieve the status and results of a form detection run.

Use this endpoint to poll a run created with POST /form_detection_runs. When status is PROCESSED, output.schema contains the generated edit schema.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired

The unique identifier for the form detection run.

Example: "sgr_xK9mLPqRtN3vS8wF5hB2cQ"

Headers

x-extend-api-version"2026-02-09"OptionalDefaults to 2026-02-09
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](https://docs.extend.ai/2026-02-09/api-reference/api-versioning) for more details.
x-extend-workspace-idstringOptional
The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2026-02-09/api-reference/authentication) for details on API key scopes.

Response

Successfully retrieved form detection run
objectenum

The type of object. Will always be "form_detection_run".

idstring

A unique identifier for the form detection run.

Example: "sgr_xK9mLPqRtN3vS8wF5hB2cQ"

fileobject
The input PDF submitted for form detection.
statusenum

The status of the form detection run:

  • "PROCESSING" - The form is still being analyzed
  • "PROCESSED" - Form detection completed successfully
  • "FAILED" - Form detection failed (see failureReason for details)
failureReasonstring or null

The reason for failure.

Availability: Present when status is "FAILED".

Possible values include:

  • UNABLE_TO_DOWNLOAD_FILE
  • FILE_TYPE_NOT_SUPPORTED
  • FILE_SIZE_TOO_LARGE
  • CORRUPT_FILE
  • FIELD_DETECTION_ERROR
  • PASSWORD_PROTECTED_FILE
  • FAILED_TO_CONVERT_TO_PDF
  • EMPTY_SCHEMA
  • INTERNAL_ERROR
  • INVALID_OPTIONS
  • OUT_OF_CREDITS

Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.

failureMessagestring or null

A human-readable description of the failure.

Availability: Present when status is "FAILED".

configobject
The configuration used for this form detection run, including any default values that were applied.
outputobject or null

The detected schema and optional mapping metadata.

Availability: Present when status is "PROCESSED".

metricsobject or null

Metrics about the form detection process.

Availability: Present when status is "PROCESSED".

usageobject or null
Usage credits consumed by this form detection run.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error