Upload a document
| Time | Status | User Agent | |
|---|---|---|---|
| Make a request to see history. |
URL Expired
The URL for this request expired after 30 days.
file
file
required
Any file type to upload.
folder_id
string
Optional folder ID to place the document in. If not provided, the document will be placed in the 'Uncategorized' folder.
pipeline_name
string
Defaults to V1-Pipeline
Optional pipeline name to use for processing the document.
``201
object
name
string
required
length ≤ 100
The name of the file
reference_id
string | null
The reference ID of the file
uploaded_by
string
required
Get the name of who uploaded the file.
Logic: If a phone-number uploaded the file and has person info, use person name.
Otherwise, use the created-by field (uploaded_by user).
uploaded_by_phone_number
string
required
Get the clean phone number from the associated PhoneNumber record.
status
string
required
folder_id
string
required
extraction_schemas
string
required
file_syncs
array of objects
required
file_syncs*
object
Serializer for file record synchronization data.
id
string
required
status
string
enum
pending- Pendingin_progress- In Progresscompleted- Completedfailed- Failedretried- Retried
pending``in_progress``completed``failed``retried
connection_service_name
string
required
started_at
date-time | null
required
When the sync process started
ended_at
date-time | null
required
When the sync process ended (successfully or not)
failed_at
date-time | null
required
When the sync process failed, if applicable
retried_at
date-time | null
required
When the sync process was last retried, if applicable
metadata
string
Additional metadata about the sync process
document_summary
string | null
Summary of the document
document_short_description
string | null
Short description of the document
clean_document_name
string | null
Clean name of the document
duplicate_file_record_id
string
required
Get the hashid of the duplicate file record if it exists.
curl --request POST \
--url https://api.flextract.dev/api/uploads/ \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data'
{
"name": "string",
"reference_id": "string",
"uploaded_by": "string",
"uploaded_by_phone_number": "string",
"status": "string",
"folder_id": "string",
"extraction_schemas": "string",
"file_syncs": [
{
"id": "string",
"status": "pending",
"connection_service_name": "string",
"started_at": "2026-07-18T07:09:11.049Z",
"ended_at": "2026-07-18T07:09:11.049Z",
"failed_at": "2026-07-18T07:09:11.049Z",
"retried_at": "2026-07-18T07:09:11.049Z"
}
],
"document_summary": "string",
"document_short_description": "string",
"clean_document_name": "string",
"duplicate_file_record_id": "string"
}