Add and update words from an .xlsx or .csv file of up to 5 MB and 10,000 rows. A word already in the list (same written form and language, ignoring case) is updated; nothing is ever deleted. Send dry_run to check a file without writing. Needs edit rights on the list. A file that would take the list past its limit writes nothing.
list_id string required
The list to import into.
Send multipart/form-data.
file file required
The .xlsx or .csv file. The first row names the columns: written (required), sounds_like (several separated by ;), language, kind, weight and enabled. A column left out keeps the stored value. A .csv may use , or ; and may start with a byte-order mark.
dry_run boolean optional ยท Defaults to false
Check the file without writing.
dry_run boolean
True when nothing was written.
created integer
Words added to the list.
updated integer
Words of the list that were changed.
unchanged integer
Words already in the list as given.
errors integer
Rows skipped because of an error.
rows array
The first 500 rows that are not unchanged: row (counting the header as row 1), status (created, updated or error), written, and error โ one of written_missing, written_too_long, language_invalid, kind_invalid, weight_invalid, replace_needs_sounds_like, too_many_sounds_like, sounds_like_too_long or duplicate_in_file.
- Bash
- Python
- JavaScript
curl -X POST "https://api.aitronos.com/v1/vocabulary/lists/voclist_8f2a61c4e0b94d7a/import" \
-H "X-API-Key: $FREDDY_API_KEY" \
-F "file=@words.csv" \
-F "dry_run=true"Response:
{
"dry_run": true,
"created": 41,
"updated": 3,
"unchanged": 112,
"errors": 1,
"rows": [
{
"row": 7,
"status": "updated",
"written": "Kubernetes",
"error": null
},
{
"row": 12,
"status": "error",
"written": null,
"error": "written_missing"
}
]
}- Export a vocabulary list โ Download a list in the same format.
- Vocabulary API โ Overview of lists, entries and settings.