# updatetable: Update a data table

> updatetable (Update a data table) is a 1001fx API function in the group Data tables: POST https://api.1001fx.com/datatables/updatetable, 1 credit per call. It works as a ready-made module in Make or as a plain HTTP call.

Renames a data table, adds columns or removes columns (their values are deleted).

- Group: Data tables
- Endpoint: `POST https://api.1001fx.com/datatables/updatetable`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 1 credit per call
- Ready-made in: Make
- Docs: https://1001fx.com/functions/updatetable

## Parameters

- `table` (string, required) – Table: ID or name of the data table.
- `name` (string, optional) – New name: Optional new name.
- `addColumns` (array<object>, optional) – Add columns
  - `name` (string, required) – Name: Letters, digits and _, starting with a letter.
  - `type` (enum, required, one of `string`, `number`, `boolean`, `date`) – Type: string, number, boolean or date (ISO 8601).
- `removeColumns` (array<string>, optional) – Remove columns: Names of columns to remove, with their values.

## Example: Update a data table

```bash
curl -X POST 'https://api.1001fx.com/datatables/updatetable' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"table":"processed_orders","addColumns":[{"name":"paid","type":"boolean"}]}'
```
