Edit File (Sync)
Edit a file synchronously, waiting for the result before returning. This endpoint has a 5-minute timeout — if processing takes longer, the request will fail.
Note: This endpoint is intended for onboarding and testing only. For production workloads, use POST /edit_runs with polling or webhooks instead, as it provides better reliability for large files and avoids timeout issues.
The Edit endpoint allows you to detect and fill form fields in PDF documents.
Pass file to edit a document directly, or templateId to run against a saved edit template. Exactly one of file or templateId must be provided.
For more details, see the Edit File 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
The file to be edited. Mutually exclusive with templateId — provide one or the other.
Files can be provided as a URL or an Extend file ID.
The ID of a saved edit template to run against. Mutually exclusive with file — provide one or the other.
The template’s saved file is used as the input file, and its saved config (schema, instructions, engine version, and advanced options) is used to fill in any values not set on the request’s own config. Values set on the request’s config always take precedence over the template’s.
Example: "edt_xK9mLPqRtN3vS8wF5hB2cQ"
Response
The type of object. Will always be "edit_run".
A unique identifier for the edit run.
Example: "edr_xK9mLPqRtN3vS8wF5hB2cQ"
The status of the edit run:
"PROCESSING"- The file is still being processed"PROCESSED"- The file was successfully edited"FAILED"- The editing failed (seefailureReasonfor details)
The reason for failure.
Availability: Present when status is "FAILED".
Possible values include:
UNABLE_TO_DOWNLOAD_FILE- Failed to load the requested fileFILE_TYPE_NOT_SUPPORTED- File type not supported. Edit runs currently require a PDFFILE_SIZE_TOO_LARGE- The file exceeds the maximum allowed sizeCORRUPT_FILE- The file appears to be corrupted and cannot be editedFIELD_DETECTION_ERROR- An error occurred during field detectionPASSWORD_PROTECTED_FILE- The file is password protected and cannot be editedFAILED_TO_CONVERT_TO_PDF- The file could not be converted to PDF for processingINTERNAL_ERROR- An unexpected internal error occurredINVALID_OPTIONS- The provided configuration options are invalidEMPTY_SCHEMA- No schema was provided and no fields could be detectedOUT_OF_CREDITS- Insufficient credits to process the fileSCHEMA_VALIDATION_ERROR- The generated output value failed validation against the edit schema
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 output of the edit run.
Availability: Present when status is "PROCESSED".
Metrics about the editing process.
Availability: Present when status is "PROCESSED".
Usage credits consumed by this edit run.
Availability: Present when status is "PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.

