Home / Resources / API Reference

Workspace Variable

Base route: /api/workspace-variable

Create workspace variable

This API endpoint creates a new variable within the workspace. Variables can be used to store configuration data that can be scoped to different environments or targets.

Request

Parameters
workspaceId
string
required
The unique identifier of the workspace.
name
string
required
The name of the variable.
variableType
string
required
The data type of the variable (e.g., String, Sensitive).
Request body

POST /api/workspace-variable {   "workspaceId": "string",   "name": "string",   "description": "string",   "variableType": "string" }

Response

Parameters
variableId
string
The unique ID assigned to the new variable.
Response body

{   "variableId": "string" }