Headless Imports

Headless CSV import, in one API call.

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.

  • No widget
  • No human in the loop
  • The importer you already set up
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 NameEmail AddressPlan
Ada Lovelaceada@example.comPro
Alan Turingalan@example.comStarter
Your destinationpostgres · customers✓ import.completed
nameemailplan
Ada Lovelaceada@example.comPro
Alan Turingalan@example.comStarter

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. 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. 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. 3

    Submit

    POST /1.1/imports/{id}/submit

    Pushes the rows to your destinations through the same pipeline as the CSVbox File API.

  4. 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

POST /1.1/imports
curl -X POST https://api.csvbox.io/1.1/imports \
  -H "x-csvbox-api-key: YOUR_API_KEY" \
  -H "Idempotency-Key: nightly-feed-2026-11-27" \
  -H "Content-Type: application/json" \
  -d '{
    "import": {
      "sheet_license_key": "YOUR_SHEET_LICENSE_KEY",
      "public_file_url": "https://files.example.com/exports/customers.csv",
      "callback_url": "https://app.example.com/hooks/csvbox",
      "user": { "user_id": "acme-corp" },
      "options": { "auto": true }
    }
  }'

Or send rows straight from your code (the first row is the header)

request body · JSON rows
{
  "import": {
    "sheet_license_key": "YOUR_SHEET_LICENSE_KEY",
    "rows": [
      ["Name", "Email", "Plan"],
      ["Ada Lovelace", "ada@example.com", "Pro"],
      ["Alan Turing", "alan@example.com", "Starter"]
    ]
  }
}

Check on it any time

GET /1.1/imports/{id}
{
  "id": "imp_01JDX8Q4ZK3M7N2P5R6S8T9V0W",
  "object": "import",
  "status": "mapped",
  "source": { "type": "url", "format": "csv", "file_name": "customers.csv" },
  "counts": { "total_rows": 1250, "pushed_rows": null },
  "detected_headers": ["Full Name", "Email Address", "Plan"],
  "suggested_mapping": {
    "name":  { "file_column": "Full Name",     "match": "keyword" },
    "email": { "file_column": "Email Address", "match": "keyword" },
    "plan":  { "file_column": "Plan",          "match": "exact" }
  },
  "unmapped_required_columns": [],
  "sample_rows": [
    { "Full Name": "Ada Lovelace", "Email Address": "ada@example.com", "Plan": "Pro" }
  ]
}

Get told when it’s done: your callback_url receives a signed event

callback · import.completed
{
  "event": "import.completed",
  "delivery_id": "6f1c2a4e-8b7d-4e21-9c3f-2d5a7b8e9f10",
  "created_at": "2026-11-27T02:14:09+00:00",
  "import": {
    "id": "imp_01JDX8Q4ZK3M7N2P5R6S8T9V0W",
    "status": "completed",
    "counts": { "total_rows": 1250, "pushed_rows": 1250 }
  }
}
Features

Everything an import needs, over the API

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.

Widget or API

One template. Two ways to import.

Headless Imports vs the embeddable CSVbox widget.

Embeddable Imports compared with Headless Imports
AspectEmbeddable ImportsHeadless Imports
Who uploadsA person, in your appYour code, from your backend
InterfaceCSVbox widgetREST API
Column mappingUser maps in the widgetAuto-suggested, or set over the API
ProgressShown in the widgetStatus endpoint and signed callbacks
Template and destinationsSameSame

Build the importer once. Use it in both places. See the embeddable importer →

Security

Security built in

  • 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.

How CSVbox handles your data →

Limits

Limits at a glance

Headless Imports limits
File formatsCSV, XLS, XLSX, and JSON rows
Ways to send dataMultipart upload, public file URL, inline JSON rows
Maximum file size50 MB
Maximum inline rows10,000 per request
API requests120 per minute per API key
New imports30 per minute per API key
Idempotency-Key window24 hours
Unfinished imports expire after7 days
Callback retriesUp to 24 hours, with backoff
Authenticationx-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.

Your importer, now callable from anywhere.