Import / Export API · imports

Upload a CSV

POST /imports

The body is the raw file, streamed and parsed into a staging table as it arrives — never buffered whole, so file size is bounded by disk rather than memory. Appends import.job-created and returns the staged job (202) with its detected headers and row count. Without target, the job takes the target whose fields the headers fit best; PUT /imports/:jobId/target changes it before the import runs. Nothing is applied to any domain service yet. 400 UnreadableUpload if the body is not usable as CSV. No idempotency key: a retried upload is a second staged job by design — staging is cheap, nothing is applied until commit, and an unwanted job is deletable.

Access

Requires imports:write.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

No idempotency key: a retried upload is a second staged job by design — staging is cheap, nothing is applied until commit, and an unwanted job is deletable.

Why every write carries a key: Idempotency and retries.

Facts appended

  • import.job-created

What a fact is: Facts and the journal.

AI agent tool

No agent tool. The CSV's raw bytes are the request body, which a JSON tool call cannot carry; an agent submits the rows as JSON with imports_submit_rows.

Connecting an agent: AI agents.

Example

curl
curl -X POST 'https://import.getmanifold.io/imports?target=inventory.item&filename=opening-stock.csv' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: text/csv' \
  --data-binary 'SKU,Product name,Qty
MUG-SPECKLE,Speckled stoneware mug,120
BOWL-SALT-L,"Salt-glaze serving bowl, large",40
PLATE-SIDE,Side plate,12.5
'
JavaScript (fetch)
const response = await fetch("https://import.getmanifold.io/imports?target=inventory.item&filename=opening-stock.csv", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "text/csv" },
  body: "SKU,Product name,Qty\nMUG-SPECKLE,Speckled stoneware mug,120\nBOWL-SALT-L,\"Salt-glaze serving bowl, large\",40\nPLATE-SIDE,Side plate,12.5\n",
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · text/csv
SKU,Product name,Qty
MUG-SPECKLE,Speckled stoneware mug,120
BOWL-SALT-L,"Salt-glaze serving bowl, large",40
PLATE-SIDE,Side plate,12.5
Response · 202 · application/json
{
  "id": "imp_01a15890-2c00-7a11-8b22-3c4d5e6f7a80",
  "target": "inventory.item",
  "filename": "opening-stock.csv",
  "status": "staged",
  "headers": [
    "SKU",
    "Product name",
    "Qty"
  ],
  "progress": {
    "rows": 4,
    "applied": 0,
    "failed": 0,
    "skipped": 0
  },
  "createdAt": "2026-10-20T06:00:00.000Z",
  "updatedAt": "2026-10-20T06:00:00.000Z"
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: import-export.openapi.json. Base URL https://import.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

400

RefusalWhat it meansWhat to do
UnreadableUpload reason The body is not a CSV file Manifold can read.Send the file as text/csv, comma-separated, with a header row.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

409

RefusalWhat it meansWhat to do
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again shortly.

How refusals work everywhere: Errors.

Used in