For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI ReferenceWebhooks Reference
DocumentationAPI ReferenceWebhooks Reference
  • Ingest Reference
      • POSTUpload files
      • POSTUpload files by URL
      • GETGet file information by ID
      • POSTUpload single document file
      • POSTUpload single file by URL
  • Main Reference
LogoLogo
Ingest ReferenceFiles

Upload single document file

Deprecated
POST
https://api.invofox.com/v1/ingest/single
POST
/v1/ingest/single
1const url = 'https://api.invofox.com/v1/ingest/single';
2const form = new FormData();
3form.append('file', 'string');
4form.append('info', '');
5
6const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};
7
8options.body = form;
9
10try {
11 const response = await fetch(url, options);
12 const data = await response.json();
13 console.log(data);
14} catch (error) {
15 console.error(error);
16}
1{
2 "accountId": "66d5dc3afed4f8062c998439",
3 "environmentId": "66d5dc3afed4f8062c998440",
4 "importId": "66d5dc3afed4f8062c998441",
5 "fileId": "66d5dc3afed4f8062c998443",
6 "filename": "document.pdf",
7 "documentId": "66d5dc3afed4f8062c998442"
8}
Upload a single document file with metadata for processing. Allowed formats are: - Images: .jpeg, .jpg, .png, .tiff (.tif) - PDFs: .pdf The API accepts a single file with optional JSON metadata. A DocumentId is pre-assigned and returned immediately. Note: This endpoint does not use splitter functionality. **DEPRECATED:** This endpoint will be removed. Use the batch upload endpoint (`/upload-direct`) instead, which supports single or multiple files.
Was this page helpful?
Previous

Upload single file by URL

Next
Built with

Upload a single document file with metadata for processing.

Allowed formats are:

  • Images: .jpeg, .jpg, .png, .tiff (.tif)
  • PDFs: .pdf

The API accepts a single file with optional JSON metadata. A DocumentId is pre-assigned and returned immediately.

Note: This endpoint does not use splitter functionality.

DEPRECATED: This endpoint will be removed. Use the batch upload endpoint (/upload-direct) instead, which supports single or multiple files.

Authentication

x-api-keystring

API key authentication for programmatic access. Used by server-to-server integrations and API clients.

OR
x-access-tokenstring

Access token authentication for web users. Used by browser-based applications and authenticated user sessions.

Request

Upload single document with optional metadata
filefileRequired
Single binary document file to upload via multipart/form-data. **Supported formats:** - **Images:** .jpeg, .jpg, .png, .tiff (.tif) - **PDFs:** .pdf **Note:** Upload actual binary file data, not file path or string. Use standard HTML file input or equivalent HTTP multipart upload. **Filename Encoding Limitation:** Due to RFC 2388 multipart/form-data specification, filenames are limited to Latin-1 (ISO-8859-1) character encoding. Non-ASCII characters (e.g., UTF-8 Unicode) in filenames will appear corrupted. For best compatibility, use ASCII-safe characters in filenames or implement client-side filename encoding.
infoobjectOptional
JSON object containing file metadata

Response

Document uploaded successfully with pre-assigned DocumentId

accountIdstring
Account ID
environmentIdstring
Environment ID
importIdstring
Import ID for tracking the upload process
fileIdstring
File ID for the uploaded file
filenamestring
Original filename
documentIdstringDeprecated

Pre-assigned Document ID. DEPRECATED: This field will be removed. Instead, use webhooks to receive processing notifications, then retrieve documentIds from the file details endpoint.

Errors

400
Bad Request Error
413
Content Too Large Error

Single binary document file to upload via multipart/form-data.

Supported formats:

  • Images: .jpeg, .jpg, .png, .tiff (.tif)
  • PDFs: .pdf

Note: Upload actual binary file data, not file path or string. Use standard HTML file input or equivalent HTTP multipart upload.

Filename Encoding Limitation: Due to RFC 2388 multipart/form-data specification, filenames are limited to Latin-1 (ISO-8859-1) character encoding. Non-ASCII characters (e.g., UTF-8 Unicode) in filenames will appear corrupted. For best compatibility, use ASCII-safe characters in filenames or implement client-side filename encoding.