Skip to main content
Version: 2025-07-10

Forms v2

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.

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
Any of
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 true, send whole JSON response to webhook URL upon request completion. Set to false to only send request status.

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 inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
Example
{
  • "inputURL": "string",
  • "fileId": "file1.pdf",
  • "metadata": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "forceBase64": false,
  • "forceOCR": false,
  • "webhookHeaders": { },
  • "sftp": {
    },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "documentId": "string",
  • "id": "string",
  • "pages": 0,
  • "entitiesExtracted": [
    ],
  • "isUrgent": false,
  • "keyValuePairs": [
    ],
  • "modelType": "string",
  • "ocrResults": {
    },
  • "rawText": "string",
  • "requestDateTime": "string",
  • "status": "string",
  • "tablesExtracted": [
    ],
  • "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
Any of
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 true, send whole JSON response to webhook URL upon request completion. Set to false to only send request status.

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 inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
Example
{
  • "inputURL": "string",
  • "fileId": "file1.pdf",
  • "forceBase64": false,
  • "forceOCR": false,
  • "metadata": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "outputURL": "string",
  • "outputURLHeaders": { },
  • "statusId": "string",
  • "webhookHeaders": { },
  • "sftp": {
    },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "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 the returnJSON 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/json
required
Any of
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 true, send whole JSON response to webhook URL upon request completion. Set to false to only send request status.

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 inputURL or outputURL. Option to provide separate server authentication info for inputURL and outputURL.

staticIP
boolean
Default: false

Set to true for static IP for webhook and outputURL if they exist

Responses

Request samples

Content type
application/json
Example
{
  • "inputURL": "string",
  • "fileId": "file1.pdf",
  • "metadata": { },
  • "statusId": "string",
  • "outputURL": "string",
  • "outputURLHeaders": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "forceBase64": false,
  • "forceOCR": false,
  • "bigFile": false,
  • "sftp": {
    },
  • "staticIP": false
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "status": "string",
  • "model": "string",
  • "startTime": 0,
  • "endTime": 0,
  • "id": "string"
}