> 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      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nected.ai/nected-docs/management-api/global-variable-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
