For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
DocumentationAPI ReferenceModel VersioningChangelog
DocumentationAPI ReferenceModel VersioningChangelog
    • Studio
    • Support
    • Benchmarks
    • Status
  • Getting Started
    • Overview
    • API Quickstart
    • Dashboard Quickstart
    • Agent Quickstart
  • Dev Tools
    • SDKs
    • CLI
  • Capabilities
      • Overview
      • Configuration
      • Response Format
      • Best Practices
      • Error Handling
      • Generate Edit Schema
LogoLogo
Book a demoLog in
On this page
  • Instructions
  • instructions
  • schemaGenerationInstructions
  • Schema
  • schema
  • Schema types
  • Field properties
  • Example schema
  • Signature image fills
  • Combed fields
  • Conditional form editing
  • Advanced options
  • advancedOptions.flattenPdf
  • advancedOptions.tableParsingEnabled
  • advancedOptions.radioEnumsEnabled
  • advancedOptions.nativeFieldsOnly
CapabilitiesEditing

Configuration

Was this page helpful?
Previous

Response Format

Next
Built with

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 make fields required based on other values, and advancedOptions controls flattening, table parsing, and field detection.

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.

1{
2 "config": {
3 "instructions": "Fill out all fields on the form. For the signature field, use 'John Doe'. Leave optional fields blank if no data is provided."
4 }
5}

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.

1{
2 "config": {
3 "schemaGenerationInstructions": "Detect signature fields, preserve table structure, and use customer-friendly field names."
4 }
5}

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, Generate Edit Schema detects the fields and returns one with positions annotated.

Schema types

The PDF field type allowed for a property depends on its JSON type:

TypePDF field types
["string", "null"]text, signature
["number", "null"]text
["integer", "null"]text
["boolean", "null"]checkbox, radio
"array"text, table
"object"signature
(no type, use enum)radio, optionList, dropdown

Field properties

Each field in the schema can include:

PropertyTypeDescription
typestring or arrayJSON type (see table above). Omit for enum fields.
descriptionstringDescription of the field.
extend_edit:field_typestringPDF field type: text, checkbox, radio, dropdown, optionList, signature, or table.
extend_edit:valueanyThe value to fill into this field. If omitted, Extend infers one from the instructions.
extend_edit:bboxobjectBounding box (left, top, right, bottom) for the field location in PDF pixel coordinates.
extend_edit:bboxesarrayArray of bounding boxes for radio enums; the enum at index i corresponds to the bbox at index i.
extend_edit:page_indexintegerZero-based page index where the field is placed.
extend_edit:imageobjectImage fill for signature fields: { "image_url": "https://..." } (PNG or JPEG only).
extend_edit:text_edit_optionsobjectText styling: combing, maxLength, fontSize, fontColor (RGB 0–255), font.
extend_edit:column_widthnumberColumn width as a percentage (table fields).
extend_edit:row_heightsarrayRow height percentages for array/table fields.
itemsobjectSchema for array items (when type is "array").
propertiesobjectNested field definitions (for object types).
enumarrayAllowed values for enum/dropdown/radio fields.
maxItemsintegerMaximum number of rows for array/table fields.

Field positions are in PDF pixel coordinates. You rarely write extend_edit:bbox by hand — Generate Edit Schema 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:

1{
2 "config": {
3 "schema": {
4 "type": "object",
5 "required": ["first_name"],
6 "properties": {
7 "first_name": {
8 "type": ["string", "null"],
9 "description": "The taxpayer's first name and middle initial.",
10 "extend_edit:field_type": "text",
11 "extend_edit:value": "Jordan"
12 },
13 "last_name": {
14 "type": ["string", "null"],
15 "description": "The taxpayer's last name.",
16 "extend_edit:field_type": "text",
17 "extend_edit:value": "Avery"
18 },
19 "filing_status_single": {
20 "type": ["boolean", "null"],
21 "description": "Check this box for the Single filing status.",
22 "extend_edit:field_type": "checkbox",
23 "extend_edit:value": true
24 }
25 },
26 "additionalProperties": false
27 }
28 }
29}

Signature image fills

For signature fields, provide an image instead of a text value:

1{
2 "type": "object",
3 "extend_edit:field_type": "signature",
4 "extend_edit:image": { "image_url": "https://example.com/signature.png" }
5}

Combed fields

For fields that require character-by-character input (SSN, phone numbers, policy numbers), use combing: true with a maxLength:

1{
2 "extend_edit:text_edit_options": { "combing": true, "maxLength": 9 }
3}

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.

1{
2 "config": {
3 "schema": {
4 "type": "object",
5 "properties": {
6 "employmentType": {
7 "enum": ["FULL_TIME", "CONTRACTOR"],
8 "extend_edit:field_type": "dropdown"
9 },
10 "contractEndDate": {
11 "type": ["string", "null"],
12 "extend_edit:field_type": "text"
13 }
14 },
15 "if": { "properties": { "employmentType": { "enum": ["CONTRACTOR"] } } },
16 "then": { "required": ["contractEndDate"] }
17 }
18 }
19}

This is useful for forms where follow-up fields only apply to a subset of users. A common workflow is to generate a base schema from the PDF, then add conditional requirements on top.


Advanced options

advancedOptions.flattenPdf

Type: boolean (default: true)

Flatten PDF forms after editing, making the form fields non-editable. Use when generating final documents.

1{ "config": { "advancedOptions": { "flattenPdf": true } } }

advancedOptions.tableParsingEnabled

Type: boolean (default: false)

Parse table regions as arrays of objects. Enable for forms with large table regions you want filled.

1{ "config": { "advancedOptions": { "tableParsingEnabled": true } } }

advancedOptions.radioEnumsEnabled

Type: boolean (default: false)

Model radio fields as enums, ensuring only one radio widget in a group is filled.

1{ "config": { "advancedOptions": { "radioEnumsEnabled": true } } }

advancedOptions.nativeFieldsOnly

Type: boolean (default: false)

Only import native AcroForm fields from the PDF and skip object detection.

1{ "config": { "advancedOptions": { "nativeFieldsOnly": true } } }

For the exact request and response schemas, see the Create Edit Run API reference.