Skip to main content
POST
/
api
/
v1
/
upload
/
preview
Preview CSV or Excel file before upload
curl --request POST \
  --url https://api.example.com/api/v1/upload/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "filename": "<string>",
  "file_type": "csv",
  "message": "<string>",
  "csv_info": {
    "row_count": 123,
    "column_count": 123,
    "columns": [
      "<string>"
    ],
    "sample_data": [
      {}
    ]
  },
  "sheets": {},
  "total_sheets": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.bavlio.com/llms.txt

Use this file to discover all available pages before exploring further.

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

CSV or Excel file to preview

Response

Successful Response

Unified preview response for CSV and Excel files.

This model supports both CSV and Excel file previews through a single endpoint. The file_type field determines which optional fields are populated.

filename
string
required

Name of the uploaded file

file_type
enum<string>
required

Type of file uploaded

Available options:
csv,
excel
message
string
required

Success or informational message

csv_info
CSVInfo · object

CSV file information (only populated for CSV files)

sheets
Sheets · object

Information about each sheet in the Excel file (only populated for Excel files)

total_sheets
integer | null

Total number of sheets in the Excel file (only populated for Excel files)