Import CSV
Imports data from a CSV file into a specified internal table in a given project.
This endpoint accepts a multipart/form-data request with two parts:
- file: The CSV file to be imported.
- request: A JSON string describing how the CSV columns map to the table’s columns.
CSV file format can be get from /projects/{projectId}/table/{tableName}/sample.
Request JSON syntax
The request part must contain:
mappings: A list of objects, each with:name: The name of the target column in the internal table.- Either
csvColumnNameorcsvColumnIndexto define the corresponding column in the CSV.
containsHeader: A boolean indicating whether the CSV includes a header row.
Examples
With column names:
{
"mappings": [
{ "name": "numcol", "csvColumnName": "numcol" },
{ "name": "text", "csvColumnName": "text" },
{ "name": "decimalcol", "csvColumnName": "decimalcol" }
],
"containsHeader": true
}
With column indexes:
{
"mappings": [
{ "name": "numcol", "csvColumnIndex": 0 },
{ "name": "text", "csvColumnIndex": 1 },
{ "name": "decimalcol", "csvColumnIndex": 2 }
],
"containsHeader": false
}
- When the CSV contains a header row (
containsHeader: true), you can use eithercsvColumnNameorcsvColumnIndex. - When the CSV does not contain a header row (
containsHeader: false), you must usecsvColumnIndex.
Response
The endpoint currently runs synchronously and returns an ImportJob object with the job status and number of processed rows.
In future versions, this endpoint will return only the jobId, and the progress/result will be tracked via a separate job status endpoint:
GET /jobs/{id}
Documentation Index
Fetch the complete documentation index at: https://docs.peaka.com/llms.txt
Use this file to discover all available pages before exploring further.


Authorizations
Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
Path Parameters
ID of the Project
Name of the table to import into