Skip to main content
POST
Upload Document

Authorizations

Authorization
string
header
required

Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.

Body

multipart/form-data
file
file
required

The file to upload.

organizationId
string

Required for session auth. API keys already belong to one organization.

documentType
enum<string>
default:other

What the document is. bank_statement is never shown to AI.

Available options:
datasheet,
invoice,
packing_list,
compliance_certificate,
test_report,
sds,
manual,
warranty,
authorization_letter,
shipping_doc,
regulation,
policy,
bank_statement,
other
productId
string<uuid>

Attach the document to one product instead of the whole organization.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
fileName
string

File name to store. Defaults to the uploaded file's name.

Required string length: 1 - 1024

Response

The document was stored; indexing is queued.

ok
boolean
required
apiVersion
string
required
Allowed value: "developer_v1"
operationId
string
required
status
enum<string>
required
Available options:
accepted,
completed,
failed
warnings
string[]
required
recommendations
string[]
required
data
object
required
jobId
string
productId
string