Skip to content

Create document

POST
/v2/document

Creates a new document based on the provided data, then returns the created document.

X-API-Key
string

API Key

X-API-Secret
string

API Secret

object
refId

Provide a reference Id if you need to query this document by an external identifier linked to a consuming API or system. This property has been deprecated with the release of the Metadata service which can be used to store additional information about the document.

string
b7e6a1c2-3f4d-4e2a-9c1a-2b3c4d5e6f7a
docExt
required

The MIME type of the document (e.g., application/pdf, image/jpeg)

string
application/pdf
docName
required

The Document Name for display purposes

string
Invoice Q1 2024
docType
required

The Document Type to help with categorisation and search

string
Allowed values: account_statement airway_bill applications bill_of_lading business_general certificate_of_origin contract health_certificate identification insurance invoice purchase_order receipt report_proposal other
invoice
uploadBatchId

Unique identifier to identify the batch process for a group of documents. This property has been deprecated due to the change from bulk upload processing to asynchronous processing.

string
f52b1f9e-b9a6-4248-afc5-d3ae358e723a
isPublic

It sets the visibility of the document and its data so unauthenticated users can view it

boolean
source
required

Origin of the document upload, used to identify which system or service the document was uploaded from

string
PAYMENTS
templateId

The template id from your template library (see your templates in /document/template)

string
d2c3b4a1-4e2a-9c1a-2b3c-4d5e6f7a8b9c
groupId

The group id to add the document to (see your groups in /document/group)

string
e3f4d5c6-7a8b-4e2a-9c1a-2b3c4d5e6f7a
prompts

A prompt array of strings

Array<object>
object
id
required

A prompt Id

string
a1b2c3d4-5678-4e2a-9c1a-2b3c4d5e6f7a
name
required

A prompt name

string
Summary
fieldType
required

A field type

string
text
format
required

A format

string
string
description
required

A description

string
Whats the summary of the document?
itemType

An item type

string
string
children
Array<object> recursive
[
{
"id": "f52b1f9e-b9a6-4248-afc5-d3ae358e723a",
"name": "Total",
"fieldType": "number",
"format": "currency",
"description": "The total amount of the document"
}
]
bulkDocumentId

This property has been deprecated due to the change from bulk upload processing to asynchronous processing.

string
c1a2b3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
ocrProvider

The Ocr Provider used to extract data from the document

string
default: GOOGLE_DOCUMENT_AI
Allowed values: TEXTRACT REKOGNITION GOOGLE_DOCUMENT_AI
GOOGLE_DOCUMENT_AI
providerModelId

The LLM model used to extract data from the document

string
default: GPT_4O_MINI
Allowed values: GPT_4 GPT_4_TURBO GPT_4O GPT_4O_MINI O1 O1_MINI O3_MINI LLAMA_3 CLAUDE_OPUS CLAUDE_SONNET
GPT_4

The resource has been successfully created.

object
documentId

A document Id

string
f52b1f9e-b9a6-4248-afc5-d3ae358e723a
refId

A reference Id

string
b7e6a1c2-3f4d-4e2a-9c1a-2b3c4d5e6f7a
docExt

A document extension

string
application/pdf
docName

A document name

string
Invoice Q1 2024
docType

A document type

string
invoice
uploadBatchId

An upload batch Id

string
f52b1f9e-b9a6-4248-afc5-d3ae358e723a
isPublic

Set the visibility of the document and its data

boolean
source

The origin of the document upload

string
groupId

The group id to add the document to

string
e3f4d5c6-7a8b-4e2a-9c1a-2b3c4d5e6f7a
prompts

A prompt array

Array<object>
object
id
required

A prompt Id

string
a1b2c3d4-5678-4e2a-9c1a-2b3c4d5e6f7a
name
required

A prompt name

string
Summary
fieldType
required

A field type

string
text
format
required

A format

string
string
description
required

A description

string
Whats the summary of the document?
itemType

An item type

string
string
children
Array<object> recursive
[
{
"id": "1",
"name": "Total",
"fieldType": "number",
"format": "currency",
"description": "The total amount of the document"
}
]
webhookId

The webhook id to send the document to

string
f52b1f9e-b9a6-4248-afc5-d3ae358e723a
bulkDocumentId

The bulk document id to add the document to

string
f52b1f9e-b9a6-4248-afc5-d3ae358e723a