Editing Configuration
The Edit API accepts a config object that controls how a PDF is filled. You can drive a run two ways: with natural-language instructions, or with an explicit schema that pins each fieldβs type, value, and position using extend_edit:* keywords. Beyond those, schemaGenerationInstructions biases automatic field detection, the schema supports root-level conditional logic to validate fields based on other values, and advancedOptions controls flattening, table parsing, field detection, and conditional generation.
For default values and the full schema, see the Create Edit Run API reference.
Prefer a UI? Extend Studio lets you configure an editor visually and export the config JSON.
Instructions
instructions
Type: string
Natural-language guidance for the edit. Use it to describe the values to fill and any special handling. With instructions only, Extend detects the formβs fields and fills the ones you describe.
schemaGenerationInstructions
Type: string
Additional instructions used when Extend generates a schema from the document (when you donβt supply one). Useful to bias field detection or naming without writing a full schema yourself.
Schema
schema
Type: object
A JSON Schema defining the fields to edit. Each property uses extend_edit:* keywords to specify the PDF field type, position, value, and styling. If you donβt have a schema yet, Detect Form detects the fields and returns one with positions annotated.
Schema types
The PDF field type allowed for a property depends on its JSON type:
Field properties
Each field in the schema can include:
Field positions are in PDF pixel coordinates. You rarely write extend_edit:bbox by hand β Detect Form detects a formβs fields and returns a schema with positions already annotated.
Example schema
The simplest schema gives each field a type, an extend_edit:field_type, and an extend_edit:value; Extend places it on the detected form field:
Signature image fills
For signature fields, provide an image instead of a text value:
Combed fields
For fields that require character-by-character input (SSN, phone numbers, policy numbers), use combing: true with a maxLength:
For fields that should wrap across multiple lines, set multiLine: true:
Conditional form editing
Edit schemas support root-level JSON Schema conditionals, so you can make fields required or optional based on other values. Supported keywords include dependentRequired, if / then / else, allOf, oneOf, anyOf, and not. Conditional clauses do not accept extend_edit:* keys.
For an introduction to these keywords and additional examples, see Conditional schema validation in the JSON Schema documentation.
This is useful for forms where follow-up fields only apply to a subset of users. You can write these rules yourself, or detect a form and generate them from requirements in the form content.
Advanced options
advancedOptions.flattenPdf
Type: boolean (default: true)
Flatten PDF forms after editing, making the form fields non-editable. Use when generating final documents.
advancedOptions.tableParsingEnabled
Type: boolean (default: false)
Parse table regions as arrays of objects. Enable for forms with large table regions you want filled.
advancedOptions.radioEnumsEnabled
Type: boolean (default: false)
Model radio fields as enums, ensuring only one radio widget in a group is filled.
advancedOptions.nativeFieldsOnly
Type: boolean (default: false)
Only import native AcroForm fields from the PDF and skip object detection.
advancedOptions.conditionalGenerationEnabled
Type: boolean (default: false)
When Extend generates an edit schema, it reads requirements stated in the form and adds supported root-level JSON Schema conditionals that validate the generated field values. For example, a form instruction that requires an explanation after a βYesβ answer can become an if / then rule.
If an Edit run cannot generate values that satisfy the generated conditionals, the run fails with SCHEMA_VALIDATION_ERROR. A synchronous /edit request returns that value in the error bodyβs code; an asynchronous /edit_runs run returns it in failureReason. See Editing Error Handling.
This option applies only when the schema is generated. If you provide config.schema, Extend uses that schema as-is; include any conditional validation rules directly in it.
For the exact request and response schemas, see the Create Edit Run API reference.

