---
title: "Create variable name"
method: POST
path: "/dataTables/{data_table_id}/variableNames"
tags: ["DataTable"]
---

# Create variable name

`POST /dataTables/{data_table_id}/variableNames`

Add a new variable to an existing DataTable. The variable is appended to all scenarios with an empty string as the default value. Use the [update scenario](https://api.help.mabl.com/reference/putscenario) endpoint to assign specific values per scenario.

## Path parameters

- `data_table_id` string, required

## Request body

- VariableNamesCreateRequest
  - `name` string — Variable names must be unique
  - `default_value` string — Default value to use for value in updated scenarios, default is empty string

## Response `200`

The current variable names

- string[]

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
