> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/connect/n8n-api/data-table.md).

# Data Table

Operations about data tables and their rows

## List all data tables

> Retrieve a list of all data tables with optional filtering, sorting, and pagination. Each table includes \`sizeBytes\`, the value the \`size\` sort option orders by.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"}}},"paths":{"/data-tables":{"get":{"operationId":"listDataTables","tags":["DataTable"],"summary":"List all data tables","description":"Retrieve a list of all data tables with optional filtering, sorting, and pagination. Each table includes `sizeBytes`, the value the `size` sort option orders by.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string","format":"jsonString"},"required":false,"description":"JSON string of filter conditions","name":"filter","in":"query"},{"schema":{"type":"string","enum":["name:asc","name:desc","createdAt:asc","createdAt:desc","updatedAt:asc","updatedAt:desc","size:asc","size:desc"]},"required":false,"description":"Sort format: field:asc or field:desc","name":"sortBy","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the data table"},"name":{"type":"string","description":"Name of the data table"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"}},"required":["id","name","type","index","createdAt","updatedAt"]},"description":"Column definitions"},"projectId":{"type":"string","description":"ID of the project this table belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the table was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the table was last updated"},"sizeBytes":{"type":"integer","description":"Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale."}},"required":["id","name","columns","projectId","createdAt","updatedAt","sizeBytes"]}},"nextCursor":{"type":"string","nullable":true,"description":"Paginate through data tables by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first \"page\" of the collection."}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"}}}}}}
```

## Create a new data table

> Create a new data table in your personal project or a team project you have access to.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"dataTablePublicDto.generated":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the data table"},"name":{"type":"string","description":"Name of the data table"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"}},"required":["id","name","type","index","createdAt","updatedAt"]},"description":"Column definitions"},"projectId":{"type":"string","description":"ID of the project this table belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the table was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the table was last updated"},"sizeBytes":{"type":"integer","description":"Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale."}},"required":["id","name","columns","projectId","createdAt","updatedAt","sizeBytes"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables":{"post":{"operationId":"createDataTable","tags":["DataTable"],"summary":"Create a new data table","description":"Create a new data table in your personal project or a team project you have access to.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"Name of the data table"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$","description":"Column name"},"type":{"type":"string","enum":["string","number","boolean","date"],"description":"Column data type"},"csvColumnName":{"type":"string","description":"Name of the CSV column to read the values from. If you do not set it, n8n maps the CSV columns by position."}},"required":["name","type"]},"description":"Column definitions for the table"},"projectId":{"type":"string","description":"ID of the project to create the table in. When omitted, the table is created in the user's personal project."},"fileId":{"type":"string","description":"ID of a CSV file that you uploaded in the n8n editor. If you set it, n8n fills the new table with the rows from that file. Only a session-authenticated caller can upload a file, so an API-key caller cannot use this field."},"hasHeaders":{"type":"boolean","description":"Set to true if the first row of the CSV file holds the column names. Applies only when you set `fileId`. The default is true."}},"required":["name","columns"]}}}},"responses":{"201":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataTablePublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Get a data table

> Retrieve a specific data table by ID.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"dataTablePublicDto.generated":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the data table"},"name":{"type":"string","description":"Name of the data table"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"}},"required":["id","name","type","index","createdAt","updatedAt"]},"description":"Column definitions"},"projectId":{"type":"string","description":"ID of the project this table belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the table was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the table was last updated"},"sizeBytes":{"type":"integer","description":"Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale."}},"required":["id","name","columns","projectId","createdAt","updatedAt","sizeBytes"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}":{"get":{"operationId":"getDataTable","tags":["DataTable"],"summary":"Get a data table","description":"Retrieve a specific data table by ID.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataTablePublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Delete a data table

> Delete a data table. This will also delete all rows in the table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}":{"delete":{"operationId":"deleteDataTable","tags":["DataTable"],"summary":"Delete a data table","description":"Delete a data table. This will also delete all rows in the table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"responses":{"204":{"description":"Operation successful."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Update a data table

> Update a data table's name.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"dataTablePublicDto.generated":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the data table"},"name":{"type":"string","description":"Name of the data table"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"}},"required":["id","name","type","index","createdAt","updatedAt"]},"description":"Column definitions"},"projectId":{"type":"string","description":"ID of the project this table belongs to"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the table was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the table was last updated"},"sizeBytes":{"type":"integer","description":"Physical storage in bytes, including indexes and internal overhead. Not reduced immediately by row deletion, and may be a few seconds stale."}},"required":["id","name","columns","projectId","createdAt","updatedAt","sizeBytes"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}":{"patch":{"operationId":"updateDataTable","tags":["DataTable"],"summary":"Update a data table","description":"Update a data table's name.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"New name for the data table"}},"required":["name"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataTablePublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## List columns of a data table

> Retrieve all columns for a specific data table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}/columns":{"get":{"operationId":"listDataTableColumns","tags":["DataTable"],"summary":"List columns of a data table","description":"Retrieve all columns for a specific data table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"},"dataTableId":{"type":"string","description":"ID of the data table this column belongs to"}},"required":["id","name","type","index","createdAt","updatedAt","dataTableId"]}}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Add a column to a data table

> Add a new column to an existing data table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"dataTableColumnPublicDto.generated":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"},"dataTableId":{"type":"string","description":"ID of the data table this column belongs to"}},"required":["id","name","type","index","createdAt","updatedAt","dataTableId"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}/columns":{"post":{"operationId":"createDataTableColumn","tags":["DataTable"],"summary":"Add a column to a data table","description":"Add a new column to an existing data table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$","description":"Column name. Must start with a letter; only letters, digits, and underscores after that; maximum 63 characters."},"type":{"type":"string","enum":["string","number","boolean","date"],"description":"Column data type"},"index":{"type":"integer","minimum":0,"description":"Column position (optional, appended to end if omitted)"}},"required":["name","type"]}}}},"responses":{"201":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataTableColumnPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Delete a column

> Remove a column from a data table. This will also delete all data in the column.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}/columns/{columnId}":{"delete":{"operationId":"deleteDataTableColumn","tags":["DataTable"],"summary":"Delete a column","description":"Remove a column from a data table. This will also delete all data in the column.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"},{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the column","name":"columnId","in":"path"}],"responses":{"204":{"description":"Operation successful."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Update a column

> Rename and/or reorder a column in a data table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"dataTableColumnPublicDto.generated":{"type":"object","properties":{"id":{"type":"string","description":"Column ID"},"name":{"type":"string","description":"Column name"},"type":{"type":"string","description":"Column data type","enum":["string","number","boolean","date"]},"index":{"type":"integer","description":"Column position"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the column was created"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when the column was last updated"},"dataTableId":{"type":"string","description":"ID of the data table this column belongs to"}},"required":["id","name","type","index","createdAt","updatedAt","dataTableId"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}/columns/{columnId}":{"patch":{"operationId":"updateDataTableColumn","tags":["DataTable"],"summary":"Update a column","description":"Rename and/or reorder a column in a data table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"},{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the column","name":"columnId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$","description":"Column name. Must start with a letter; only letters, digits, and underscores after that; maximum 63 characters."},"index":{"type":"integer","minimum":0,"description":"New zero-based position for the column"}},"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dataTableColumnPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## List rows of a data table

> Retrieve rows from a data table with optional filtering, sorting, and pagination.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}/rows":{"get":{"operationId":"listDataTableRows","tags":["DataTable"],"summary":"List rows of a data table","description":"Retrieve rows from a data table with optional filtering, sorting, and pagination.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"},{"schema":{"type":"string","format":"jsonString"},"required":false,"description":"JSON string of filter conditions","name":"filter","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Sort format: columnName:asc or columnName:desc","name":"sortBy","in":"query"},{"schema":{"type":"string"},"required":false,"description":"Search text across all string columns","name":"search","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The row ID (auto-generated)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the row was last updated"}},"required":["id","createdAt","updatedAt"],"description":"A data table row with system columns (id, createdAt, updatedAt) and user-defined columns"}},"nextCursor":{"type":"string","nullable":true,"description":"Paginate through rows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first \"page\" of the collection."}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Insert rows into a data table

> Insert one or more rows into a data table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}/rows":{"post":{"operationId":"createDataTableRows","tags":["DataTable"],"summary":"Insert rows into a data table","description":"Insert one or more rows into a data table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{},{"type":"string"},{}]}},"minItems":1,"description":"Array of rows to insert. Each row is an object with column names as keys."},"returnType":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["count"]},{"type":"string","enum":["id"]}],"default":"count","description":"count: return only the number of rows inserted. id: return an array of objects with the id of each inserted row. all: return the full row data for all inserted rows."}},"required":["data"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"insertedRows":{"type":"integer"}},"required":["success","insertedRows"],"description":"Returned when returnType is 'count'"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"],"additionalProperties":false},"description":"Returned when returnType is 'id'"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The row ID (auto-generated)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the row was last updated"}},"required":["id","createdAt","updatedAt"],"description":"A data table row with system columns (id, createdAt, updatedAt) and user-defined columns"},"description":"Returned when returnType is 'all'"}]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Upsert a row in a data table

> Update an existing row, or insert a new one if no row matches the filter conditions.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}/rows/upsert":{"post":{"operationId":"upsertDataTableRow","tags":["DataTable"],"summary":"Upsert a row in a data table","description":"Update an existing row, or insert a new one if no row matches the filter conditions.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["and"]},{"type":"string","enum":["or"]}],"default":"and"},"filters":{"type":"array","items":{"type":"object","properties":{"columnName":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"condition":{"anyOf":[{"type":"string","enum":["eq"]},{"type":"string","enum":["neq"]},{"type":"string","enum":["like"]},{"type":"string","enum":["ilike"]},{"type":"string","enum":["gt"]},{"type":"string","enum":["gte"]},{"type":"string","enum":["lt"]},{"type":"string","enum":["lte"]}]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{},{}]}},"required":["columnName","condition","value"]},"minItems":1}},"required":["filters"],"description":"Filter conditions to match an existing row. If no row matches, n8n inserts a new row."},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{},{"type":"string"},{}]},"description":"Column values for the row"},"returnData":{"type":"boolean","default":false,"description":"Set to true to return the upserted row(s): the matching rows if updated, or the new row if one was inserted. Set to false to return true on success."},"dryRun":{"type":"boolean","default":false,"description":"Set to true to preview the change without saving it."}},"required":["filter","data"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"anyOf":[{"type":"boolean","description":"Returned when returnData is false and dryRun is false"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"The row ID (auto-generated)"},"createdAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was last updated"},"dryRunState":{"type":"string","enum":["before","after"],"description":"Whether this entry shows the row state before or after the change"}},"required":["id","createdAt","updatedAt","dryRunState"]},"description":"Returned when dryRun is true: one entry per row per before/after state"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The row ID (auto-generated)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the row was last updated"}},"required":["id","createdAt","updatedAt"],"description":"A data table row with system columns (id, createdAt, updatedAt) and user-defined columns"},"description":"Returned when returnData is true and dryRun is false"}]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Update rows in a data table

> Update rows matching filter conditions in a data table.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"unsupportedMediaType":{"description":"Unsupported media type."}}},"paths":{"/data-tables/{dataTableId}/rows/update":{"patch":{"operationId":"updateDataTableRows","tags":["DataTable"],"summary":"Update rows in a data table","description":"Update rows matching filter conditions in a data table.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["and"]},{"type":"string","enum":["or"]}],"default":"and"},"filters":{"type":"array","items":{"type":"object","properties":{"columnName":{"type":"string","minLength":1,"maxLength":63,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"condition":{"anyOf":[{"type":"string","enum":["eq"]},{"type":"string","enum":["neq"]},{"type":"string","enum":["like"]},{"type":"string","enum":["ilike"]},{"type":"string","enum":["gt"]},{"type":"string","enum":["gte"]},{"type":"string","enum":["lt"]},{"type":"string","enum":["lte"]}]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{},{}]}},"required":["columnName","condition","value"]},"minItems":1}},"required":["filters"],"description":"Filter conditions to match rows for update."},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{},{"type":"string"},{}]},"description":"Column values to update"},"returnData":{"type":"boolean","default":false,"description":"Set to true to return the updated row(s). Set to false to return true on success."},"dryRun":{"type":"boolean","default":false,"description":"Set to true to preview the change without saving it."}},"required":["filter","data"]}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"anyOf":[{"type":"boolean","description":"Returned when returnData is false and dryRun is false"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"The row ID (auto-generated)"},"createdAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was last updated"},"dryRunState":{"type":"string","enum":["before","after"],"description":"Whether this entry shows the row state before or after the change"}},"required":["id","createdAt","updatedAt","dryRunState"]},"description":"Returned when dryRun is true: one entry per row per before/after state"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The row ID (auto-generated)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the row was last updated"}},"required":["id","createdAt","updatedAt"],"description":"A data table row with system columns (id, createdAt, updatedAt) and user-defined columns"},"description":"Returned when returnData is true and dryRun is false"}]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"415":{"$ref":"#/components/responses/unsupportedMediaType"}}}}}}
```

## Clear all rows from a data table

> Permanently delete all rows from a data table. The table structure is retained. This action cannot be undone.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}/rows/clear":{"delete":{"operationId":"clearDataTableRows","tags":["DataTable"],"summary":"Clear all rows from a data table","description":"Permanently delete all rows from a data table. The table structure is retained. This action cannot be undone.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"integer","description":"The number of rows that were deleted"}},"required":["deletedCount"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```

## Delete rows from a data table

> Delete rows matching filter conditions from a data table. Filter is required to prevent accidental deletion of all data.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"DataTable","description":"Operations about data tables and their rows"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/data-tables/{dataTableId}/rows/delete":{"delete":{"operationId":"deleteDataTableRows","tags":["DataTable"],"summary":"Delete rows from a data table","description":"Delete rows matching filter conditions from a data table. Filter is required to prevent accidental deletion of all data.","parameters":[{"schema":{"type":"string","format":"nanoid","pattern":"^[A-Za-z0-9]{16}$"},"required":true,"description":"The ID of the data table","name":"dataTableId","in":"path"},{"schema":{"type":"string","format":"jsonString"},"required":true,"description":"JSON string of filter conditions. Required to prevent accidental deletion of all data.","name":"filter","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"description":"If true, return the deleted rows. If false, return true on success.","name":"returnData","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"description":"If true, preview which rows would be deleted without actually deleting them.","name":"dryRun","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"anyOf":[{"type":"boolean","description":"Returned when returnData is false and dryRun is false"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"The row ID (auto-generated)"},"createdAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the row was last updated"},"dryRunState":{"type":"string","enum":["before","after"],"description":"Whether this entry shows the row state before or after the change"}},"required":["id","createdAt","updatedAt","dryRunState"]},"description":"Returned when dryRun is true: one entry per row per before/after state"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The row ID (auto-generated)"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the row was created"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time the row was last updated"}},"required":["id","createdAt","updatedAt"],"description":"A data table row with system columns (id, createdAt, updatedAt) and user-defined columns"},"description":"Returned when returnData is true and dryRun is false"}]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}
```
