Skip to main content

List Tables

Retrieve all tables in a base.
GET /api/v1/db/meta/projects/{baseId}/tables
curl -X GET https://app.nocodb.com/api/v1/db/meta/projects/p_124hhlkbeasewh/tables \
  -H "xc-auth: YOUR_API_TOKEN"

Path Parameters

baseId
string
required
Unique base identifier (e.g., p_124hhlkbeasewh)
sourceId
string
Optional source identifier to filter tables by data source

Query Parameters

page
number
Page number for pagination
pageSize
number
Number of tables per page
sort
string
Sort order for tables
includeM2M
boolean
default:"false"
Include many-to-many relation tables

Response

list
array
Array of table objects
id
string
Unique table identifier (e.g., md_w9gpnaousnfss1)
table_name
string
Physical table name in database
title
string
Display title of the table
type
string
Table type (e.g., table, view)
base_id
string
Parent base identifier
source_id
string
Data source identifier
columns
array
Array of column definitions
views
array
Array of view configurations
pageInfo
object
Pagination information

Get Table

Retrieve details of a specific table including columns and views.
GET /api/v1/db/meta/tables/{tableId}
curl -X GET https://app.nocodb.com/api/v1/db/meta/tables/md_w9gpnaousnfss1 \
  -H "xc-auth: YOUR_API_TOKEN"

Path Parameters

tableId
string
required
Unique table identifier (e.g., md_w9gpnaousnfss1)

Response

Returns complete table metadata including:
  • All columns with their data types and properties
  • All views (Grid, Gallery, Kanban, etc.)
  • Table relationships
  • Table settings and metadata

Create Table

Create a new table in a base.
POST /api/v1/db/meta/projects/{baseId}/tables
curl -X POST https://app.nocodb.com/api/v1/db/meta/projects/p_124hhlkbeasewh/tables \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Users",
    "table_name": "users",
    "columns": [
      {
        "column_name": "id",
        "title": "Id",
        "uidt": "ID",
        "pk": true,
        "ai": true
      },
      {
        "column_name": "name",
        "title": "Name",
        "uidt": "SingleLineText"
      },
      {
        "column_name": "email",
        "title": "Email",
        "uidt": "Email"
      }
    ]
  }'

Path Parameters

baseId
string
required
Unique base identifier
sourceId
string
Optional source identifier (defaults to primary source)

Request Body

title
string
required
Display title of the table
table_name
string
required
Physical table name in database
columns
array
required
Array of column definitions
column_name
string
required
Physical column name
title
string
required
Display column title
uidt
string
required
UI data type (e.g., SingleLineText, Number, Email, URL, DateTime)
pk
boolean
default:"false"
Whether this is a primary key
ai
boolean
default:"false"
Whether this is auto-increment
rqd
boolean
default:"false"
Whether this field is required

Response

Returns the created table object with generated columns and default view.

Update Table

Update table metadata.
PATCH /api/v1/db/meta/tables/{tableId}
curl -X PATCH https://app.nocodb.com/api/v1/db/meta/tables/md_w9gpnaousnfss1 \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "User Accounts",
    "description": "Table for storing user information"
  }'

Path Parameters

tableId
string
required
Unique table identifier

Request Body

title
string
Updated table title
table_name
string
Updated physical table name
description
string
Table description
meta
object
Additional metadata

Response

{
  "msg": "The table has been updated successfully"
}

Delete Table

Delete a table from the base.
DELETE /api/v1/db/meta/tables/{tableId}
curl -X DELETE https://app.nocodb.com/api/v1/db/meta/tables/md_w9gpnaousnfss1 \
  -H "xc-auth: YOUR_API_TOKEN"

Path Parameters

tableId
string
required
Unique table identifier

Response

Returns true on successful deletion.

Reorder Table

Change the display order of a table.
POST /api/v1/db/meta/tables/{tableId}/reorder
curl -X POST https://app.nocodb.com/api/v1/db/meta/tables/md_w9gpnaousnfss1/reorder \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "order": 3
  }'

Path Parameters

tableId
string
required
Unique table identifier

Request Body

order
number
required
New position order for the table

Response

Returns success confirmation.

Duplicate Table

Create a copy of an existing table.
POST /api/v1/db/meta/duplicate/{baseId}/table/{tableId}
curl -X POST https://app.nocodb.com/api/v1/db/meta/duplicate/p_124hhlkbeasewh/table/md_w9gpnaousnfss1 \
  -H "xc-auth: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "options": {
      "excludeData": false,
      "excludeViews": false,
      "excludeHooks": false,
      "title": "Users Copy"
    }
  }'

Path Parameters

baseId
string
required
Base identifier
tableId
string
required
Table identifier to duplicate

Request Body

options
object
Duplication options
excludeData
boolean
default:"false"
Exclude table data from duplication
excludeViews
boolean
default:"false"
Exclude views from duplication
excludeHooks
boolean
default:"false"
Exclude webhooks from duplication
title
string
Title for the duplicated table

Response

id
string
ID of the duplicated table
name
string
Name of the duplicated table