# Data Tables API, webhooks and automation

**Category:** [Data Tables](https://help.totalctrl.app/hc/totalctrl/totalctrl-help-center/en-US/categories/data-tables)
**Updated:** 2026-10-04

## REST API

All endpoints take your API token (`X-Api-Token` / `X-Api-Secret`). Columns are addressed by **name**, so a script does not have to resolve ids first.

- `GET /api/v1/data-tables` — every table, with its columns.
- `GET /api/v1/data-tables/<uid>`
- `GET /api/v1/data-tables/<uid>/rows` — supports `q`, `sort`, `dir`, `limit` and `offset`: the same query the screen runs, so a script and a person get the same answer.
- `POST /api/v1/data-tables/<uid>/rows` — append rows. Values that do not fit their column, and names that match no column, come back in `rejected` rather than being dropped.
- `DELETE /api/v1/data-tables/<uid>/rows/<row_uid>`

The API deliberately does not create or retype columns: changing a table's shape from a script, with no preview of what will not convert, is the operation most likely to quietly empty a column.
## Webhooks

Subscribe under **Developer & API → Webhooks**, in the Data Tables group:

- `datatable.table.created` / `datatable.table.deleted`
- `datatable.rows.imported`
- `datatable.rows.changed`
- `datatable.rows.exported`

## Orchestration

The same five events are triggers on the **TotalCtrl** app — for example, post to Slack when the approved-supplier list changes, or open a task when somebody exports it.
## MCP tools

For AI agents: `datatable_list`, `datatable_query` and `datatable_add_rows`. `datatable_query` is the useful one — it lets an assistant answer from your own reference data instead of guessing.

---

## Related Articles

- [Getting started with Data Tables](https://help.totalctrl.app/en-US/articles/data-tables-getting-started)
- [Importing a spreadsheet](https://help.totalctrl.app/en-US/articles/data-tables-import)
- [Archiving and deleting a table](https://help.totalctrl.app/en-US/articles/data-tables-archive)
- [Exporting a table](https://help.totalctrl.app/en-US/articles/data-tables-export)
- [Working in the grid](https://help.totalctrl.app/en-US/articles/data-tables-grid)

---
[← Back to TotalCtrl Help Center](https://help.totalctrl.app/en-US/)