Forms v2
Forms
Download OpenAPI specification:Download
JSON response
Make a request to the Forms model and receive JSON response data.
File upload options
We support requests with Content-Type application/json
or multipart/form-data
. Note that application/json
requests are preferred as multipart/form-data
requests do not support all flags and fields.
[application/json]
inputURL link to file[application/json]
base64 base64 encoded file data[multipart/form-data]
file upload local file from browser
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion | string (apiVersion) non-empty YYYY-MM-DD Default: 2025-07-10 API Version |
version | integer (version) Default: 2 Forms model version (1 or 2) |
Request Body schema: required
inputURL required | string https?://(?:www\\.)?[a-zA-Z0-9./]+ URL for the file to extract data from: Must be a PDF, JPEG, PNG, TIFF, or TXT. |
fileId | string Default: "UUID" Examples: "file1.pdf" Custom ID for document. If not present, will default to a random UUID. |
metadata | object Custom JSON to be included in the returned response. |
webhook | string https?://(?:www\\.)?[a-zA-Z0-9./]+ Webhook URL to send status updates and JSON response to. |
webhookSendFull | boolean Default: false When set to |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Set this parameter to true if the input file is a fillable pdf. |
webhookHeaders | object Request headers to include in the POST request to the webhook. |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "inputURL": "string",
- "fileId": "file1.pdf",
- "metadata": { },
- "webhook": "string",
- "webhookSendFull": false,
- "forceBase64": false,
- "forceOCR": false,
- "webhookHeaders": { },
- "sftp": {
- "user": "string",
- "password": "string",
- "privateKey": "string",
- "privateKeyPassphrase": "string"
}, - "staticIP": false
}
Response samples
- 200
- 400
- 403
- 404
- 500
- 522
{- "documentId": "string",
- "id": "string",
- "pages": 0,
- "entitiesExtracted": [
- {
- "boundingRegions": [
- {
- "pageNumber": 0,
- "polygon": { }
}
], - "category": "string",
- "confidence": 0,
- "spans": [
- {
- "offset": 0,
- "length": 0
}
], - "subCategory": "string"
}
], - "isUrgent": false,
- "keyValuePairs": [
- {
- "confidence": 0,
- "key": {
- "boundingRegions": { },
- "content": "",
- "spans": { }
}, - "value": {
- "boundingRegions": { },
- "content": "",
- "spans": { }
}
}
], - "modelType": "string",
- "ocrResults": {
- "modelVersion": "string",
- "readResults": [
- {
- "pageNumber": 0,
- "angle": 0,
- "height": 0,
- "width": 0,
- "unit": "string",
- "words": [
- {
- "content": "string",
- "polygon": [
- 0
], - "confidence": 0,
- "span": {
- "offset": 0,
- "length": 0
}
}
], - "selectionMarks": [
- {
- "polygon": [
- 0
], - "confidence": 0,
- "span": {
- "offset": 0,
- "length": 0
}, - "state": "unselected"
}
], - "lines": [
- {
- "polygon": [
- 0
], - "content": "string",
- "spans": [
- {
- "offset": 0,
- "length": 0
}
]
}
], - "spans": [
- {
- "offset": 0,
- "length": 0
}
]
}
], - "readStyles": [
- {
- "confidence": 0,
- "isHandwritten": true,
- "spans": [
- {
- "offset": 0,
- "length": 0
}
]
}
], - "version": "string"
}, - "rawText": "string",
- "requestDateTime": "string",
- "status": "string",
- "tablesExtracted": [
- {
- "boundingRegions": [
- {
- "pageNumber": 0,
- "polygon": { }
}
], - "cells": [
- {
- "kind": "string",
- "rowIndex": 0,
- "columnIndex": 0,
- "columnSpan": 0,
- "content": "string",
- "boundingRegions": [
- {
- "pageNumber": 0,
- "polygon": { }
}
], - "spans": [
- {
- "offset": 0,
- "length": 0
}
]
}
], - "columnCount": 0,
- "rowCount": 0,
- "spans": [
- {
- "offset": 0,
- "length": 0
}
]
}
], - "metadata": { },
- "startTime": 0,
- "endTime": 0
}
Zip file response
Make a request to the Forms model and receive response data in a ZIP file.
File upload options
We only support requests with Content-Type application/json
at this endpoint.
[application/json]
inputURL link to file[application/json]
base64 base64 encoded file data
The default name for the file is an epoch timestamp if fileId
field is not included in the request.
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion | string (apiVersion) non-empty YYYY-MM-DD Default: 2025-07-10 API Version |
version | integer (version) Default: 2 Forms model version (1 or 2) |
Request Body schema: required
inputURL required | string https?://(?:www\\.)?[a-zA-Z0-9./]+ URL for the file to extract data from: Must be a PDF, JPEG, PNG, TIFF, or TXT. |
fileId | string Default: "UUID" Examples: "file1.pdf" Custom ID for document. If not present, will default to a random UUID. |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Set this parameter to true if the input file is a fillable pdf. |
metadata | object Custom JSON to be included in the returned response. |
webhook | string https?://(?:www\\.)?[a-zA-Z0-9./]+ Webhook URL to send status updates and JSON response to. |
webhookSendFull | boolean Default: false When set to |
outputURL | string https?://(?:www\\.)?[a-zA-Z0-9./]+ URL where resulting zip file should be sent. Must be open to PUT requests. Required if submitting an async request. |
outputURLHeaders | object Request headers to include in the PUT request to the output URL. |
statusId | string WARNING: Deprecating in favor of 'fileId'. Custom ID for document. If not present, will default to a random UUID. |
webhookHeaders | object Request headers to include in the POST request to the webhook. |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "inputURL": "string",
- "fileId": "file1.pdf",
- "forceBase64": false,
- "forceOCR": false,
- "metadata": { },
- "webhook": "string",
- "webhookSendFull": false,
- "outputURL": "string",
- "outputURLHeaders": { },
- "statusId": "string",
- "webhookHeaders": { },
- "sftp": {
- "user": "string",
- "password": "string",
- "privateKey": "string",
- "privateKeyPassphrase": "string"
}, - "staticIP": false
}
Response samples
- 400
- 403
- 404
- 500
- 522
{- "status": "FAILURE",
- "message": "Request body is missing required field(s): question"
}
Queue async request
Queue an asynchronous request to Forms model. To receive the model output, use either a webhook
or an outputURL
.
webhook
(Recommended): Receives a JSON response by default.outputURL
: Receives a ZIP file. If thereturnJSON
parameter is set to true, a JSON file will be provided instead.
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
apiVersion | string (apiVersion) non-empty YYYY-MM-DD Default: 2025-07-10 API Version |
version | integer (version) Default: 2 Forms model version (1 or 2) |
Request Body schema: application/jsonrequired
inputURL required | string https?://(?:www\\.)?[a-zA-Z0-9./]+ URL for the file to extract data from: Must be a PDF, JPEG, PNG, TIFF, or TXT. |
webhook required | string https?://(?:www\\.)?[a-zA-Z0-9./]+ Webhook URL to send status updates and JSON response to. |
fileId | string Default: "UUID" Examples: "file1.pdf" Custom ID for document. If not present, will default to a random UUID. |
metadata | object Custom JSON to be included in the returned response. |
statusId | string WARNING: Deprecating in favor of 'fileId'. Custom ID for document. If not present, will default to a random UUID. |
outputURL | string https?://(?:www\\.)?[a-zA-Z0-9./]+ URL where resulting zip file should be sent. Must be open to PUT requests. Required if submitting an async request. |
outputURLHeaders | object Request headers to include in the PUT request to the output URL. |
webhookSendFull | boolean Default: false When set to |
forceBase64 | boolean Default: false Setting this parameter to true converts files to Base64 format before sending them on to the model. |
forceOCR | boolean Default: false Set this parameter to true if the input file is a fillable pdf. |
bigFile | boolean Default: false Set this parameter to true if resubmitting a Base64 or inputURL string that previously resulted in an error due to file size. |
SFTP (object) or InputOutputSFTP (object) SFTP authentication details. Required for SFTP URLs in | |
staticIP | boolean Default: false Set to |
Responses
Request samples
- Payload
{- "inputURL": "string",
- "fileId": "file1.pdf",
- "metadata": { },
- "statusId": "string",
- "outputURL": "string",
- "outputURLHeaders": { },
- "webhook": "string",
- "webhookSendFull": false,
- "forceBase64": false,
- "forceOCR": false,
- "bigFile": false,
- "sftp": {
- "user": "string",
- "password": "string",
- "privateKey": "string",
- "privateKeyPassphrase": "string"
}, - "staticIP": false
}
Response samples
- 200
- 207
- 400
- 403
- 404
- 500
- 522
{- "status": "string",
- "statusId": "string",
- "id": "string"
}
Get status of an async request
Get the status of an async zip request.
path Parameters
status_id required | string (status_id) Status ID |
header Parameters
orgId required | string (orgId) non-empty ^[a-zA-Z0-9\-_]+$ Organization ID |
authKey required | string (authKey) non-empty ^[a-zA-Z0-9\-_]+$ Authentication key |
Responses
Response samples
- 200
- 400
- 403
- 404
{- "status": "string",
- "model": "string",
- "startTime": 0,
- "endTime": 0,
- "id": "string"
}