---
title: "Creates a new data table from an imported file."
method: POST
path: "/api/v2/DataTables/Import"
tags: ["DataTables"]
---

# Creates a new data table from an imported file.

`POST /api/v2/DataTables/Import`

## Request

- Base URL: `https://api.slopesoftware.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.slopesoftware.com/api/v2/DataTables/Import`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/slopesoftware/apis/akur8-life-api/docs/api/v2/DataTables/Import/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new data table using an existing file. This endpoint cannot be used to update existing data tables. The excel sheet name field is required for excel files and the delimiter field, which defaults to a comma if not set, is required for non-excel files. The limit for the number of rows is 25,000 for data tables that aren't file only.

## Request body

- ImportDataTableRequestV2
  - `fileId` integer, nullable: File ID
  - `filePath` string, nullable: File Path
  - `fileVersion` integer, nullable: File Version
  - `delimiter` string, nullable: Delimiter
  - `excelSheetName` string, nullable: Excel Sheet Name
  - `tableStructureId` integer, required: Table Structure ID (required)
  - `name` string, required: Name (required)
  - `isFileOnly` boolean: Is File Only?
  - `indexes` DataTableIndexV2[], nullable: Optional list of indexes
    - `columnName` string, nullable, required
    - `indexReadMethod` 'ExactMatch' | 'RangeLowerBound'

## Response `200`

Data table created successfully

- ImportDataTableResponseV2
  - `id` integer
  - `name` string, nullable
  - `tableStructureId` integer
  - `tableStructureName` string, nullable
  - `isFileOnly` boolean
  - `version` integer
  - `isLatestVersion` boolean

## Other responses

- `201`: Created
- `400`: Invalid request parameters
- `401`: Unauthorized
- `403`: Forbidden - insufficient permissions
- `404`: Not Found
- `409`: Data table with the same name already exists for this table structure
- `429`: Too Many Requests

---

[API](https://skmtc.dev/slopesoftware/apis/akur8-life-api.md) - [All operations](https://skmtc.dev/slopesoftware/apis/akur8-life-api/llms.txt) - [OpenAPI document](https://skmtc.dev/slopesoftware/apis/akur8-life-api/revisions/9771b2c79880?raw)
