Skip to main content
POST
/
api
/
v1
/
external
/
companies
/
{companyId}
/
files
Upload File
curl --request POST \
  --url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/files \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'fileName=<string>' \
  --form 'mimeType=<string>' \
  --form 'category=<string>' \
  --form folderId=3c90c3cc-0d44-4b50-8888-8dd25736052a
{ "id": "550e8400-e29b-41d4-a716-446655440020", "name": "claim-report.pdf", "mimeType": "application/pdf", "category": "claims", "entityId": null, "entityName": null, "uploadedAt": "2026-01-20T09:15:00.000Z", "userDate": null }

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header.

Path Parameters

companyId
string<uuid>
required

Company identifier

Body

multipart/form-data
file
file
required

The file content to upload

fileName
string
required

File name (must be non-empty)

mimeType
string
required

MIME type of the file (e.g. application/pdf)

category
string

Optional category label

folderId
string<uuid>

Folder ID to place the file in (omit for root-level)

Response

File uploaded successfully

A file stored in the company file system

id
string<uuid>

File identifier

name
string

File name

mimeType
string | null

MIME type of the file

category
string | null

Optional category label

entityId
string | null

Related entity ID (if attached to an entity)

entityName
string | null

Related entity name (if attached to an entity)

uploadedAt
string<date-time> | null

When the file was uploaded (ISO 8601)

userDate
string<date-time> | null

User-specified date for the file (ISO 8601)