---
title: Hook and action data
project: Tables
version: 7.0
section: reference
language: it
translation: missing
license: Total.js Enterprise
url: https://totaljs.es/docs/it/tables/7-0/reference/hook-and-action-data/
updated: 2026-11-20T06:40:02.622Z
---

# Hook and action data

> The JSON that Tables sends to hooks and actions.

Tables sends JSON in a `POST` request to the addresses of [hooks](../../guides/hooks/) and [actions](../../guides/actions/).

## Hooks

```json
{
	"tableid": "t118h7",
	"app": "Tables",
	"user": {
		"id": "admin",
		"name": "Jane Doe",
		"groups": []
	},
	"data": {
		"id": "JasptJ1cg61f",
		"name": "Desk lamps",
		"rev": 1,
		"dtcreated": "2026-11-20T05:55:08.930Z",
		"dtupdated": null,
		"createdby": "Jane Doe",
		"updatedby": null,
		"x01": "20260006",
		"x02_id": "JasodS1c561f",
		"x02": "Northwind Supplies",
		"x04": 10,
		"x05": "new"
	}
}
```

| Field | Content |
|---|---|
| `tableid` | The ID of the table. |
| `app` | The `name` of the app from the config file. |
| `user` | The user or API token that made the change. |
| `data` | The record after the change. For a removed record, the record before it was removed. |

In `data`, each column appears under its ID. For a relation column, `<id>_id` is the ID of the linked record and `<id>` its name. `rev` is the revision number of the record.

## Actions

```json
{
	"id": "JasodS1g561f",
	"source": "detail",
	"tableid": "t118h7",
	"table": "Orders",
	"action": "update",
	"app": "Tables",
	"data": { "id": "JasodS1g561f", "name": "Office chairs", "x04": 1300 },
	"user": { "id": "admin", "name": "Jane Doe", "sa": true, "groups": [] }
}
```

| Field | Content |
|---|---|
| `id` | The ID of the record, empty for a new record. |
| `source` | `detail` when run from the record window, `list` when run from the list. |
| `tableid`, `table` | The ID and the name of the table. |
| `action` | `update` for an existing record, `create` for a new one. |
| `data` | The values of the record. |
| `user` | The user who ran the action: `id`, `name`, `email`, `sa`, `groups`, `language` and `color`. |

## The answer

- Hooks: Tables does not use the answer.
- Actions: if the answer is a text, Tables shows it to the user in a message.
