Skip to main content
Version: 2025-02-06

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

version
integer (version)
Default: 2

API version

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: "form1.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.

Responses

Request samples

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

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

version
integer (version)
Default: 2

API version

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: "form1.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.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "status": "FAILURE",
  • "message": "Request body is missing required field(s): question"
}

Queue an async zip request

Queue an asynchronous request to Forms model and receive response data in a ZIP file, sent to an outputURL.

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
  • [multipart/form-data] file upload local file from browser

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

version
integer (version)
Default: 2

API version

Request Body schema: application/json
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.

required
Array of strings or string

Base64 encoded string for the file to extract data from. If it is an array, the base64 strings will be appended into one PDF then ran through the model.

file
required
string <binary>

File to upload: Must be a PDF, JPEG, PNG, TIFF, or TXT.

outputURL
required
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.

fileId
string
Default: "UUID"
Examples: "form1.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.

outputURLHeaders
object

Request headers to include in the PUT request to the output URL.

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.

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.

Responses

Request samples

Content type
application/json
{
  • "inputURL": "string",
  • "base64": [
    ],
  • "file": "string",
  • "fileId": "form1.pdf",
  • "metadata": { },
  • "statusId": "string",
  • "outputURL": "string",
  • "outputURLHeaders": { },
  • "webhook": "string",
  • "webhookSendFull": false,
  • "forceBase64": false,
  • "forceOCR": false,
  • "bigFile": 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
document_id
required
string (document_id)

Document 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"
}

Custom

JSON response

Make a request to a custom Forms2 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
path Parameters
custom_model_id
required
string (custom_model_id)

Custom model 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

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: "form1.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.

Responses

Request samples

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

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 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.

path Parameters
custom_model_id
required
string (custom_model_id)

Custom model ID

query Parameters
boolean or null

Runs request asynchronously

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

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: "form1.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.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "status": "FAILURE",
  • "message": "Request body is missing required field(s): question"
}