Skip to main content
POST
/
api
/
v1
/
collections
/
{id}
/
files
/
upload
Upload a file to a collection
curl --request POST \
  --url https://app.aigmented.com/api/v1/collections/{id}/files/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "file_id": 42,
  "filename": "contract-2024.pdf",
  "status": "processing",
  "content_type": "application/pdf",
  "size_bytes": 1048576
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token. Example: Authorization: Bearer sk-xxxxxxxxxxxx

Path Parameters

id
integer
required

Collection ID

Body

multipart/form-data
file
file
required

The file to upload. Field name must be file. Supported types: PDF, DOCX, DOC, TXT, MD, CSV, XLSX. Max 50 MB.

Response

File accepted and queued for processing

file_id
integer

Database ID of the created file

filename
string
status
enum<string>

File is queued for parsing/ingestion

Available options:
processing
content_type
string

Detected MIME type

size_bytes
integer