---
title: "Get invalid variable names"
method: GET
path: "/datafiles/invalid_variable_names/{sid}/{file_id}"
tags: ["Microdata"]
---

# Get invalid variable names

`GET /datafiles/invalid_variable_names/{sid}/{file_id}`

Get list of variables that do not meet Stata/SPSS naming rules (e.g. leading underscore, invalid characters, starts with number, too long). Used for bulk-fix workflows.

## Path parameters

- `sid` string, required
- `file_id` string, required

## Response `200`

successful operation

- object
  - `status` string
  - `invalid_names` object[] — List of { name, message, reason } for each invalid variable
    - `name` string
    - `message` string
    - `reason` 'leading_underscore' | 'invalid_chars' | 'starts_with_number' | 'too_long' | 'empty'

## Other responses

- `400` — Bad request - project not found or data file not found

---

[API](https://skmtc.dev/worldbank/apis/metadata-editor-api.md) · [All operations](https://skmtc.dev/worldbank/apis/metadata-editor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/worldbank/metadata-editor-api/revisions/f4c8258bab5a/schema)
