Skip to main content
Fetch metadata for a single table: its row count, creation time, and archive linkage. The response shape is discriminated on type — a regular table links to its archive companion (if any), and an archive table points back to its parent. List tables with clay tables list.
clay tables get <tableId>

Arguments

ArgumentDescription
tableIdThe id of the table to fetch. Required.

Output

A regular table:
{
  "type": "regular",
  "id": "tbl_123",
  "name": "Leads",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "rowCount": 1200,
  "archive": { "tableId": "tbl_archive", "searchableFieldFormula": null }
}
An archive table:
{
  "type": "archive",
  "id": "tbl_archive",
  "name": "Leads (archive)",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "rowCount": 50000,
  "parentTableId": "tbl_123"
}
FieldTypeDescription
type"regular" | "archive"Discriminates the two output shapes.
idstringTable id.
namestringDisplay name.
createdAtstringCreation timestamp.
rowCountnumberNumber of rows in the table.
archive{ tableId, searchableFieldFormula } | nullRegular tables only. Links to the archive companion, or null if none.
parentTableIdstringArchive tables only. Id of the regular table this archives.

Errors

CodeExitNotes
validation_error2The tableId argument is required.
not_found6No table with that id in the workspace.
auth_forbidden3The API key lacks the cli:all scope, or you cannot read this table.

Examples

clay tables get tbl_123
clay tables get tbl_123 | jq -r '.rowCount'
clay tables get tbl_123 | jq -r 'if .type == "archive" then .parentTableId else .archive.tableId end'