A list of shops in a spreadsheet becomes four entries in LyEve, one per row. A dry run names the row it would reject before anything is written. A rollback deletes what the import created, so a wrong mapping is undone from the import's history.
You can import CSV, Excel workbooks, JSON, NDJSON and YAML with no license key.
The sheet, and the content type it fills
- LyEve Console and a LyEve engine on PostgreSQL, MySQL or SQL Server, with the connection string for each. Every step here ran on PostgreSQL 16 on November 11, 2026, with the LyEve engine v0.62.0 and admin console v0.28.0.
- An account with the
adminorsuper_adminrole, and its token inTOKENfor the API steps. Signing in as in the quickstart returns one.
The import fills a content type that already exists. This one, shop, has a required title and two text fields:
curl -X POST http://localhost:3001/api/admin/schemas \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "shop", "display_name": "Shop", "fields": [{"name": "title", "field_type": "text", "required": true}, {"name": "city", "field_type": "text"}, {"name": "phone", "field_type": "text"}]}'1. Shape the sheet to the content type
Give the first row of the sheet one header per field, named like the field. Each row under it becomes an entry. Save it as shops.csv:
title,city,phone
Harbor Street,Portland,503-555-0101
Mill Lane,Salem,503-555-0102
,Eugene,541-555-0103
River Road,Bend,541-555-0104The third shop has no title, as a real sheet often has somewhere. The dry run in step 2 finds it.
An Excel workbook needs no export. Save it as .xlsx, and the import reads its first sheet with the same header row.
2. Run the dry run, and read its report
A dry run checks every row against the mapping and the content type's rules, and writes nothing.
Console v0.28.0
- Open Insight > Imports and choose New import.
- Under Source, keep Upload a file and add
shops.csvunder File. Pick shop in Content type, keep Format at Read it from the file, and choose Read the file. - The Map step opens with 4 rows of CSV from shops.csv and matches each column to the field of the same name. Keep Create only and No key: every row is a new entry, and choose Dry run.
The Check step reads Rows in the file 4, Would import 3 and Would be rejected 1. Row 3 is listed with the row has neither a title nor a slug; map a column to the entry title or slug.
Engine API v0.62.0
The API takes the file base64-encoded:
FD=$(base64 -w0 shops.csv)
curl -X POST http://localhost:3001/api/admin/imports/validate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"content_type\": \"shop\", \"source_name\": \"shops.csv\", \"file_data\": \"$FD\", \"field_mappings\": [{\"source_field\": \"title\", \"target_field\": \"title\", \"required\": true}, {\"source_field\": \"city\", \"target_field\": \"city\"}, {\"source_field\": \"phone\", \"target_field\": \"phone\"}]}"{"total_rows":4,"valid_rows":3,"error_rows":1,"errors":[{"row_index":2,"error_code":"mapping_error","message":"required field 'title' is missing or empty"}]}row_index counts the rows under the header from 0, so 2 is the third shop.
Fill in the title, here Market Square, save the file and run the dry run again. It reads 4 rows, 4 that would import and none rejected, and the console adds Every row passes.
3. Import the rows
Console v0.28.0
On the Check step, choose Import 4 rows. The import appears at the top of History. After Refresh its outcome reads Every row imported, with 4 created, 0 updated, 0 skipped and 0 rejected.
Engine API v0.62.0
Encode the fixed file again into FD, then send the same body to /api/admin/imports with two more keys, "source_format": "csv" and "mode": "create". The answer is 201 with the job and "status":"pending". Copy its id into JOB, then ask for it:
curl http://localhost:3001/api/admin/imports/$JOB \
-H "Authorization: Bearer $TOKEN"Within a second the job reads "status":"completed", with "inserted_rows":4 and "errored_rows":0. GET /api/admin/imports/$JOB/rows lists each row with "status":"inserted" and the entry_id it created.
The four shops are now entries. GET http://localhost:3002/api/v1/content/shop lists them.
4. Roll the import back
Do this once now, while nothing depends on the entries, to know the way back before you need it.
Console v0.28.0
On the import's line in History, choose Roll back the import of shops.csv. The dialog says that the 4 entries it created are deleted, and that the history of the import stays. Choose Roll back. The outcome turns to Rolled back.
Engine API v0.62.0
curl -X POST http://localhost:3001/api/admin/imports/$JOB/rollback \
-H "Authorization: Bearer $TOKEN"{"removed":4,"status":"rolled_back"}The shop list is empty again. A rollback deletes the entries an import created, edits made to them since included. Entries an import updated keep the imported values.
5. Import it again, from the workbook
Run steps 2 and 3 once more, with shops.xlsx in place of the CSV. The Map step reads 4 rows of XLSX from shops.xlsx, the dry run passes every row, and Import 4 rows creates the four shops.
On the API, a workbook's preview also lists its sheets:
FX=$(base64 -w0 shops.xlsx)
curl -X POST http://localhost:3001/api/admin/imports/preview \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"source_name\": \"shops.xlsx\", \"file_data\": \"$FX\"}"{"source_format":"xlsx","source_name":"shops.xlsx","columns":["title","city","phone"],"rows":[{"city":"Portland","phone":"503-555-0101","title":"Harbor Street"},{"city":"Salem","phone":"503-555-0102","title":"Mill Lane"},{"city":"Eugene","phone":"541-555-0103","title":"Market Square"},{"city":"Bend","phone":"541-555-0104","title":"River Road"}],"total_rows":4,"errors":[],"export":false,"schemas":{},"sheets":["Shops"]}To read another sheet, add "sheet": "<its name>" beside file_data. The import call then takes "source_format": "xlsx".
What one import holds, and what is free
- Up to 100,000 rows and 50 MiB per file. Split a larger sheet into several imports.
- New entries are drafts when the content type has drafts and publishing, unless a column maps to Entry status.
- With a key field, such as the slug, Create and update changes the entries a key finds instead of adding copies. That keeps a weekly re-import of the same sheet in step with it.
Every format, the dry run, the history and the rollback are free. Saved mapping templates and the date, split and lookup transforms come with Content Releases, $3 a month and in beta, which every plan from Pro includes.
Errors from the dry run, the import and the rollback
The dry run rejects every row
A mapping names a column the file does not have. On the API the report says so, with the columns it found:
{"total_rows":4,"valid_rows":0,"error_rows":4,"errors":[{"row_index":-1,"message":"source_field 'Title' not found in data. Available: title, city, phone"}]}source_field must match the header exactly, case included. In the console, pick the column under Column in the file for each field.
only completed jobs can be rolled back (current status: rolled_back)
The import was already rolled back, and the answer is 409. Its line in the history says so. Nothing more is deleted.
content_type is not a defined content type
The answer is 422. An import fills a content type that exists and creates none. Create shop first, or name the content type you have.
Moving a whole site instead
A spreadsheet is one content type at a time. Migrate from WordPress moves a site's posts and pages. What a headless CMS is shows how the imported shops reach a website.