Skip to main content
GET
/
api
/
public
/
v2
/
env-vars
List Workspace Env Vars
curl --request GET \
  --url https://api.promptlayer.com/api/public/v2/env-vars \
  --header 'X-API-KEY: <api-key>'
{
  "success": true,
  "workspace_env_vars": [
    {
      "id": 123,
      "key": "<string>",
      "value_suffix": "<string>",
      "is_empty": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "workspace_id": 123,
      "tool_registry_id": 123
    }
  ]
}
List all environment variables in the workspace scope. Values are not returned — only the key, a 4-character suffix for display, and an is_empty flag.

Authorizations

X-API-KEY
string
header
required

Response

Successful Response

success
boolean
workspace_env_vars
object[]