---
title: "Update a data table"
method: PUT
path: "/api/v3/data-tables/{data_table_id}"
tags: ["Data tables"]
---

# Update a data table

`PUT /api/v3/data-tables/{data_table_id}`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3/data-tables/{data_table_id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3/data-tables/:data_table_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates which fields (columns) of the data table are selected for delivery. `selected_fields` must contain the full list of field `name` values (as returned by the detail endpoint's `fields[].name`) that should be selected — any field not listed becomes deselected. Field selection is set at the data table level and affects all loads delivering this data table.
Unknown field names are ignored. Dimension fields cannot be deselected — omitting a dimension field from `selected_fields` returns `400`. Fields the detail endpoint returns with `can_edit: false` are not meant to be toggled and should always be included in `selected_fields`.

## Path parameters

- `data_table_id` integer, required

## Request body

- object
  - `selected_fields` string[], required: Full list of field `name` values that should be selected. Any field of the data table not listed becomes deselected.

## Response `200`

Update a Data Table

- DataTableDetail: Data Table Detail object
  - `title` string: Data Table title
  - `freshness` string: Data Table freshness date
  - `datasource_name` string: Data source name
  - `report_type` string: Report type
  - `data_class` string: Data class
  - `workspace` integer: Workspace ID
  - `sql_name` string: SQL name
  - `auto_extract_new_accounts` boolean: Auto extract new accounts
  - `fields` object: Fields object
    - `name` Field: Field object
      - `title` string: Field title
      - `name` string: Field name
      - `user_kind` string: Field kind
      - `user_type` string: Field type
      - `selected` boolean: Is the field selected
      - `can_edit` boolean: Can the field be edited
      - `sql_name` string: Sql Name of a Field
      - `format` 'string' | 'float' | 'integer' | 'iso_8601_date' | 'currency' | 'percent' | 'duration' | 'url' | 'image_url': Hint on how the value is meant to be rendered — not a storage contract. Metrics fall back to `float` whenever a data source does not declare a format explicitly, so `float` does not imply the value is fractional, and no decimal precision is guaranteed: values are passed through exactly as the data source returns them, without rounding. New formats may be added over time, so treat an unrecognised value as an unformatted string rather than failing.
      - `is_dynamic` boolean: Is the field dynamic

## Other responses

- `400`: Bad Request
- `401`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3.md) - [All operations](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/revisions/a881099bd6c4?raw)
