Send a CSV, Excel file or JSON rows from your backend. CSVbox reads the file, maps the columns to your importer template, and delivers the data to your database, warehouse, spreadsheet or webhook. Your code tracks every step through the API.
A customers.csv file with the headers Full Name, Email Address and Plan is sent to POST /1.1/imports. CSVbox maps them to the template columns name, email and plan, and the rows land in the customers table of the destination, ending with an import.completed event.
Your backendcustomers.csv
Full Name
Email Address
Plan
Ada Lovelace
ada@example.com
Pro
Alan Turing
alan@example.com
Starter
POST /1.1/importsread · map · submit
Your destinationpostgres · customers✓ import.completed
name
email
plan
Ada Lovelace
ada@example.com
Pro
Alan Turing
alan@example.com
Starter
What is headless CSV import?
Headless CSV import means importing a CSV, Excel or JSON file into your database or app through an API, with no upload widget and no person in the loop. With CSVbox Headless Imports, your backend sends the file to POST /1.1/imports. CSVbox reads it, maps the columns to your importer template, and pushes the rows to the destinations you already set up.
Input
CSV, XLS, XLSX, JSON rows
Output
25+ destinations
Interface
REST API, no UI
Max file
50 MB
Who it’s for
Built for imports nobody clicks through
The CSVbox widget is great when a person uploads a file. Many imports don’t have a person.
Scheduled feeds
A partner sends a file every night.
Backend-to-backend syncs
Your system exports data, and another needs to receive it.
Files from email, SFTP or a storage bucket
A script picks them up and needs to import them.
Your own upload UI
You want CSVbox to process the file behind it.
AI agents and automations
They need an import endpoint they can call and check on.
Headless Imports gives all of these the same pipeline your widget users get: same template, same column names, same destinations.
How it works
How headless CSV import works
Create, map, submit, done. Four steps, each one an API call your code controls.
1
Create an import
POST /1.1/imports
Send a file upload (CSV, XLS, XLSX), a public file URL CSVbox downloads for you, or JSON rows inline. You get an import ID back right away. CSVbox reads the file in the background.
2
Map the columns
PUT /1.1/imports/{id}/mapping
CSVbox matches file headers to your template’s column names, then to each column’s matching keywords, then by position. Every suggestion says how it was matched. If a required column is missing, send the mapping you want.
3
Submit
POST /1.1/imports/{id}/submit
Pushes the rows to your destinations through the same pipeline as the CSVbox File API.
4
Know how it ended
GET /1.1/imports/{id}
Poll the import, or add a callback_url and let CSVbox tell you. Every import ends as completed, partial, failed or expired.
Need it in one call? Set options.auto: true. CSVbox reads, maps and submits in one go. It stops and waits for you only when it can’t map a required column.
See it in code
CSV import API examples
One request in, a tracked import out.
Create an import from a file URL, with mapping and submit in one call
Mapping, status, callbacks and retries for every CSV and Excel import.
Three ways in
Multipart file, public URL or inline JSON rows. Up to 50 MB per file and 10,000 rows per inline request. Choose the worksheet in an Excel file with file_sheet_name.
Smart column mapping
Exact header matches first, then your template’s matching keywords, then column position. Every match comes with its source (exact, keyword, position, manual). Override any column with one API call.
Inspect before you submit
List the parsed rows with GET /1.1/imports/{id}/rows and check the result before anything reaches your destination.
A status you can trust
Each import moves through a defined set of states (parsing → awaiting mapping → mapped → submitting → completed). Two requests can’t move the same import at once: the second gets a clear 409, so nothing runs twice.
Signed callbacks
Get import.completed, import.partial, import.failed and import.expired events at your callback_url, each signed with HMAC-SHA256. Failed deliveries are retried with backoff for up to 24 hours.
Safe retries with Idempotency-Key
Send an Idempotency-Key header when you create an import. If your job retries within 24 hours, you get the original import back instead of a duplicate.
Track every import
List and filter imports with GET /1.1/imports, cancel one that’s still running, and tag imports with your own user and environment data. Headless imports appear in your dashboard with a Headless source label.
25+ destinations, no extra setup
Imports go to the destinations already set on the importer: MySQL, Postgres, SQL Server, MongoDB, BigQuery, Supabase, Google Sheets, Airtable, Notion, Salesforce, S3, Azure, FTP, webhooks and more. You don’t get raw JSON back to load yourself. All destinations →
Use cases
What teams build with it
Common headless import use cases, from scheduled feeds to backend syncs.
Nightly partner feed→Postgres
A partner drops orders.csv in an S3 bucket every night. Your scheduler sends CSVbox the file’s URL with options.auto: true and an Idempotency-Key for the date. The rows land in your Postgres orders table, and an import.completed event tells your job it’s done. If the scheduler retries, you don’t get a second import.
Your own upload screen→BigQuery
Your app has its own drag-and-drop screen. Your backend sends the file to CSVbox, shows the user the detected headers and suggested mapping, lets them fix a column, then submits. The data goes to BigQuery. No CSV parsing or mapping code to maintain.
Client spreadsheets→Google Sheets
Your account managers get Excel files from clients by email. An inbox automation sends each attachment to CSVbox, picks the right worksheet with file_sheet_name, and tags the import with the client’s ID in user. Each client’s rows land in the shared Google Sheet, and you can find every import later by filtering on that ID.
Backend sync→Webhook
Your system already holds the rows. Send them as JSON, up to 10,000 per request, and CSVbox maps them and posts them to your webhook, n8n or Zapier flow in the shape your template defines.
Authenticated with your API key. Limited to the importers your account owns.
Outbound URL protection. File URLs and callback URLs that point to private, loopback or cloud-metadata addresses are refused, including after redirects.
Signed callbacks. A separate secret for each importer.
Automatic clean-up. Unfinished imports expire. Staged files and rows are deleted after the import finishes.
Rate limits per API key. One runaway script can’t affect the rest of your account.
Multipart upload, public file URL, inline JSON rows
Maximum file size
50 MB
Maximum inline rows
10,000 per request
API requests
120 per minute per API key
New imports
30 per minute per API key
Idempotency-Key window
24 hours
Unfinished imports expire after
7 days
Callback retries
Up to 24 hours, with backoff
Authentication
x-csvbox-api-key header
Fair billing
You pay for imports you submit
An import counts toward your monthly import quota only when it is submitted. Imports you create, inspect and cancel don’t count. Retries with the same Idempotency-Key aren’t billed twice. See pricing →
Roadmap
Coming next
Not available yet. These are on the way for Headless Imports.
Coming next
Server-side validation
The same data type checks, required fields, lists and uniqueness rules your widget runs, applied to every headless import.
Coming next
Row-level errors over the API
Per-row and per-cell errors as JSON or an error CSV, plus fixing rows with an API call.
Coming next
Choose what happens to invalid rows
Reject the import, skip invalid rows, or submit everything.
Coming next
Custom functions
Your validation functions, data transforms and virtual columns, run server-side in a sandbox.
FAQ
Headless CSV import FAQ
Headless CSV import means importing a CSV, Excel or JSON file into your database or app through an API, with no upload widget and no person in the loop. With CSVbox Headless Imports, your backend sends the file to POST /1.1/imports. CSVbox reads it, maps the columns to your importer template, and pushes the rows to the destinations you already set up.
No. Headless Imports uses the importer templates and destinations you already have.
Yes. One importer can take imports from both.
CSV, XLS and XLSX files, plus JSON rows sent in the request.
To the destinations already set on your importer, from 25+ options: MySQL, Postgres, SQL Server, MongoDB, BigQuery, Supabase, Google Sheets, Airtable, Notion, Salesforce, S3, Azure, FTP, webhooks and more.
Yes. Set options.auto to true when you create the import, and CSVbox reads, maps and submits it in one go. It stops and waits only if it can’t map a required column.
The import waits in awaiting_mapping. Send the mapping with one API call, then submit.
Poll the status endpoint or set a callback_url to receive a signed event.
No, if you send an Idempotency-Key header. A retry with the same key within 24 hours returns the original import instead of creating a new one.
Files up to 50 MB and up to 10,000 inline JSON rows per request. Each API key can make 120 API requests and create 30 new imports per minute.
No. An import counts toward your monthly import quota only when it is submitted. Imports you create, inspect and cancel don’t count.
Yes. It is a REST API, so an AI agent, scheduler or automation can create an import, check its status and get a callback when it finishes.
The File API sends a file and pushes it straight to your destination. Headless Imports adds an import you can track: column mapping you can see and change, row inspection, a status endpoint, signed callbacks, idempotent retries and billing on submit only.
We use cookies to analyze traffic and provide support chat. You can accept all,
reject non-essential cookies, or customize your choices. You can change your
preferences anytime from the footer.
Privacy policy.
Required for the site to function. Cannot be disabled.
Google Analytics and PostHog — helps us understand product usage.
HubSpot chat — lets you talk to our team from the chat widget.