Create document
POST /v2/document
Create a new document
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”API Key
API Secret
Request Body required
Section titled “Request Body required ”object
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.
b7e6a1c2-3f4d-4e2a-9c1a-2b3c4d5e6f7a
The MIME type of the document (e.g., application/pdf, image/jpeg)
application/pdf
The Document Name for display purposes
Invoice Q1 2024
The Document Type to help with categorisation and search
invoice
Unique identifier to identify the batch process for a group of documents.
77a0049c-7683-45ff-956f-656f257048f7
It sets the visibility of the document and its data so unauthenticated users can view it
Origin of the document upload, used to identify which system or service the document was uploaded from
PAYMENTS
The template id from your template library (see your templates in /document/template)
d2c3b4a1-4e2a-9c1a-2b3c-4d5e6f7a8b9c
The group id to add the document to (see your groups in /document/group)
e3f4d5c6-7a8b-4e2a-9c1a-2b3c4d5e6f7a
A prompt array of strings
object
Unique identifier for the prompt. Used internally for tracking and referencing specific prompts.
a1b2c3d4-5678-4e2a-9c1a-2b3c4d5e6f7a
Human-readable name for the prompt. Used for display purposes and should be descriptive of what the prompt extracts.
Invoice Total
The data type for storing the extracted value. This determines how the value will be validated and stored in the database (e.g., string, number, float, date, boolean).
string
Optional formatting instructions for the extracted value. Can include transformation rules like “add # sign before all responses” or “convert to uppercase”. Leave empty if no formatting is needed.
Add # sign before all responses
Clear, specific instructions for the AI model on what information to extract from the document. Should be detailed enough to guide accurate extraction.
What is the total amount of the invoice?
The input/display type that determines how the field should be presented and extracted. This affects UI rendering, validation rules, and extraction behavior (e.g., single line text, email, phone, address, table).
singleLine
[ { "id": "77a0049c-7683-45ff-956f-656f257048f7", "name": "Total", "fieldType": "number", "format": "currency", "description": "The total amount of the document" }]
This is deprecated, due to the change from bulk upload processing to asynchronous processing.
c1a2b3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
The Ocr Provider used to extract data from the document
GOOGLE_DOCUMENT_AI
The LLM model used to extract data from the document, this will replace the default model from the template
77a0049c-7683-45ff-956f-656f257048f7
Responses
Section titled “ Responses ”Document created successfully.
object
A document Id
77a0049c-7683-45ff-956f-656f257048f7
A reference Id
b7e6a1c2-3f4d-4e2a-9c1a-2b3c4d5e6f7a
A document extension
application/pdf
A document name
Invoice.pdf
The Document Type to help with categorisation and search
invoice
The download url of the document
https://fsco.io/document/download/123
An upload batch Id, this is used for group conversation
77a0049c-7683-45ff-956f-656f257048f7
Set the visibility of the document and its data
The origin of the document upload
The group id to add the document to
e3f4d5c6-7a8b-4e2a-9c1a-2b3c4d5e6f7a
A prompt array
object
Unique identifier for the prompt. Used internally for tracking and referencing specific prompts.
a1b2c3d4-5678-4e2a-9c1a-2b3c4d5e6f7a
Human-readable name for the prompt. Used for display purposes and should be descriptive of what the prompt extracts.
Invoice Total
The data type for storing the extracted value. This determines how the value will be validated and stored in the database (e.g., string, number, float, date, boolean).
string
Optional formatting instructions for the extracted value. Can include transformation rules like “add # sign before all responses” or “convert to uppercase”. Leave empty if no formatting is needed.
Add # sign before all responses
Clear, specific instructions for the AI model on what information to extract from the document. Should be detailed enough to guide accurate extraction.
What is the total amount of the invoice?
The input/display type that determines how the field should be presented and extracted. This affects UI rendering, validation rules, and extraction behavior (e.g., single line text, email, phone, address, table).
singleLine
[ { "id": "1", "name": "Total", "fieldType": "string", "itemType": "currency", "format": "keep the currency symbol if present", "description": "The total amount of the document" }]
The provider model id
77a0049c-7683-45ff-956f-656f257048f7
This is deprecated, the webhook id to send the document to
77a0049c-7683-45ff-956f-656f257048f7
The Ocr Provider used to extract data from the document
GOOGLE_DOCUMENT_AI
The status of the document
created
This is deprecated, the bulk document id to add the document to
77a0049c-7683-45ff-956f-656f257048f7
OCR data extracted from the document
object
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error