Generate Edit Schema

Detect fields in a PDF form and synchronously return an edit schema payload. Use this endpoint when you want Extend to bootstrap an `EditRootJSON` schema from an existing form, optionally mapping an existing schema onto the detected fields. This endpoint returns the generated schema directly. There are no schema generation run resources to poll or delete. For more details, see the [Generate Edit Schema guide](https://docs.extend.ai/2026-02-09/product/editing/generate-edit-schema) and the [Edit File guide](https://docs.extend.ai/2026-02-09/product/editing/edit).

Authentication

AuthorizationBearer

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

Headers

x-extend-api-version"2026-02-09"Optional

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

This endpoint expects an object.
fileobjectRequired
The file to analyze. Files can be provided as a URL or an Extend file ID.
configobjectOptional
Configuration options for edit schema generation.

Response

Successfully generated edit schema
schemaobject
The final generated schema after mapping. If no input schema was provided this will be the same as the annotatedSchema.
annotatedSchemaobject or null
The original schema that was detected and annotated from the file.
mappingResultobject or null

Mapping information between inputSchema paths and detected form fields when an input schema was provided.

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