> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/global-variable-api.md).

# Global Variable API

The Global Variable API lets you create, read, update, and delete global variables in your workspace. Global variables are reusable, named values referenced across rules and workflows — useful for configuration values, feature flags, rate constants, and secrets.

**Supported `dataType` values:** `string`, `numeric`, `boolean`, `json`.

**`checksum` and optimistic locking:** Update and Delete both require the current variable `checksum` passed as a request **header**. Obtain it from the Create (`200`) response or `GET /dev/variable/{name}` → `data.checksum`. If the checksum does not match the server's state, the operation is rejected.

**Secret variables:** When `isSecret: true`, the `value` field is masked as `***` in all get and list responses.

### Base URL

All endpoints are prefixed with `/dev/variable`.

### Authentication

| Header           | Type   | Required | Description             |
| ---------------- | ------ | -------- | ----------------------- |
| `Nected-API-Key` | string | Yes      | Your Nected API key.    |
| `Nected-Branch`  | string | No       | Branch name (optional). |

***

### Endpoints

| Method | Path                   | Description                 |
| ------ | ---------------------- | --------------------------- |
| GET    | `/dev/variable`        | List global variables       |
| POST   | `/dev/variable`        | Create global variable      |
| GET    | `/dev/variable/{name}` | Get global variable by name |
| PATCH  | `/dev/variable/{name}` | Update global variable      |
| DELETE | `/dev/variable/{name}` | Delete global variable      |
