Uploads a new document template definition with fields and processing instructions. Returns the created template metadata.
| Parameter | Type | Required | Location | Description |
|---|---|---|---|---|
| file | File | Yes | Body | Document file (sample PDF/image) used to define the template |
| name | String | Yes | Body | Template name (e.g., "General") |
| description | String | Yes | Body | Short description of the template (e.g., "Invoice") |
| extractFields | String[] | Yes | Body | List of fields to extract (e.g., company name, invoice total, due date, …) |
| instructions | String | No | Body | Additional processing instructions (custom rules or extraction logic) |
| api_key | String | Yes | Header | API key |