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 EditRootJSONSchema 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.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Headers
x-extend-api-version
API version to use for the request. If you 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/2025-04-21/developers/api-versioning) for more details.
Request
This endpoint expects an object.
file
A file object containing either a URL or a fileId.
config
Configuration options for edit schema generation.
Response
Successfully generated edit schema
schema
The final generated schema after mapping. If no input schema was provided this will be the same as the annotatedSchema.
annotatedSchema
The original schema that was detected and annotated from the file.
mappingResult
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
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error

