# Upload a file that names several teams, one import per team

Step 1 of 3 for a file that holds several teams. Administrators only (`org.settings.manage`). multipart/form-data with the CSV in `file`, the `teamMap`, and optionally `column`, `source` and `namespace` as on `createImport`.

The file is cut by team and each team's rows become an ordinary import in that team, so what an import promises (one team, a preview before it runs, a ledger that makes a re-run harmless, an undo) is unchanged. The imports of one upload share a `batchId`, and each is then previewed and committed with the routes of a single import. A part is a file of its own, so its rows are numbered within it, and a part that is the same as one imported before is recognised by `previousImport`.

`teamMap` is a JSON object with one entry for every team the file names: the name as written in the file (case and spacing do not matter), and the id of the team its rows go to, or null to leave them out. A name the map does not mention is refused (`team_not_mapped`), because dropping rows by leaving them out of the map is how work is lost unnoticed. Several names may go to one team, and their rows are then one import, in file order. Teams are never created: a team the file names that the workspace does not have is left out until it exists in Accounts. A team the caller cannot reach is a 404.

Everything is stored or nothing is. At most 50 teams, and a team holds at most 10 unfinished imports (409 with the `teamId`). A file that cannot be cut without changing it is refused with `not_splittable`.

Canonical: https://easerix.com/docs/developers/api/tasks/imports/createImportBatch

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="tasks" operations={[{"path":"/v1/imports/batches","method":"post"}]} />
    </>
  );
}
