Use POST /edit_schemas/generate to detect fields in a PDF form and return an EditRootJSON schema you can use with /edit or /edit_runs.
This endpoint is synchronous. It returns the generated schema directly, so there are no schema generation run objects, polling endpoints, or delete endpoints.
In the SDKs, this endpoint is exposed as client.editSchemas.generate() in TypeScript, client.edit_schemas.generate() in Python, and client.editSchemas().generate() in Java.
This is useful when you:
The endpoint path is the same in both versions, but the raw request body differs:
2026-02-09 uses file.url / file.id2025-04-21 uses file.fileUrl / file.fileId2026-02-092025-04-21The response body contains:
schema: the final generated schema after mapping; if no inputSchema was provided, this will be the same as annotatedSchemaannotatedSchema: the original schema detected from the file, annotated with field locationsmappingResult: matches and unmatched fields if you provided inputSchema*Provide one file locator for your API version: url or id in 2026-02-09, or fileUrl or fileId in 2025-04-21.
The generated schema uses the same EditRootJSON format as edit runs, including support for root-level JSON Schema conditionals like if / then / else, dependentRequired, allOf, oneOf, anyOf, and not.
That means a common workflow is:
/edit or /edit_runs.Generate an edit schema and return the schema payload directly.
This endpoint is available in both API versions 2026-02-09 and 2025-04-21, but the request body field names differ between those versions.
For exact request and response schemas, see the API Reference endpoint for POST /edit_schemas/generate.