Start a folder import
/folder-importsReads a CSV and starts a job that makes its folders under users' Other folders, reusing existing ones. Returns 201 with the import (status pending; counts fill in when its job completes) and meta.parse_errors. Needs view-all-documents or super admin on the token's user; service tokens get 403. 422 csv lists every parse error. A dry run writes nothing and returns the counts the import would reach (1,000 rows at most). Emits folder_import.created on start, not on a dry run; no email. POST /folder-imports/{id}/actions/revert undoes it.
Query parameters
Validate and run the call without committing it, returning what the real call would return with
meta.dry_runset.
Headers
Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.
Request body
multipart/form-data, required · FolderImportCreate
The CSV file: csv or txt, up to 10 MB, with a name of at most 255 characters (422
max_nameabove that). Download the layout fromGET /folder-imports/template.
Responses
{
"data": {
"id": "9a9d1c5e-4f2b-4c8e-9a7d-2f1e6b3c4d5a",
"file_name": "string",
"job_id": "9a9d1c5e-4f2b-4c8e-9a7d-2f1e6b3c4d5a",
"status": "pending",
"rows_total": 1,
"users_total": 1,
"folders_created": 1,
"folders_existing": 1,
"skipped_total": 1,
"failures_total": 1,
"revert_job_id": "9a9d1c5e-4f2b-4c8e-9a7d-2f1e6b3c4d5a",
"revert_status": "pending",
"revert_requested_at": "2026-06-12T10:00:00+00:00",
"created_at": "2026-06-12T10:00:00+00:00",
"updated_at": "2026-06-12T10:00:00+00:00"
},
"meta": {
"parse_errors": [
"string"
],
"parse_errors_total": 1,
"dry_run": true
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X POST https://your-org-domain/kong/core/api/v2/folder-imports\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"