Skip to main content
POST
/
extract
/
documents
/
upload
Upload Document
curl --request POST \
  --url https://api.contextual.ai/v1/extract/documents/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file=@example-file
{
  "document_id": "<string>",
  "file_name": "<string>",
  "file_size": 123,
  "page_count": 123,
  "uploaded_at": "<string>",
  "status": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

Response

Successful Response

Response model for document upload.

document_id
string
required

Unique ID of the uploaded document

file_name
string
required

Original filename of the uploaded document

file_size
integer
required

File size in bytes

page_count
integer
required

Number of pages in the document

uploaded_at
string
required

Timestamp when the document was uploaded

status
string
required

Upload status