Skip to main content
PATCH
/
api
/
public
/
v2
/
tool-registry
/
{identifier}
/
env-vars
/
{var_id}
Update Tool Env Var
curl --request PATCH \
  --url https://api.promptlayer.com/api/public/v2/tool-registry/{identifier}/env-vars/{var_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "value": "<string>"
}
'
{
  "success": true,
  "tool_env_var": {
    "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
  }
}
Update the value of a tool-scoped environment variable. The new value must be non-empty.

Authorizations

X-API-KEY
string
header
required

Path Parameters

identifier
string
required

Tool ID (numeric) or name

var_id
integer
required

Body

application/json
value
string
required

New value for the environment variable. Must be non-empty.

Required string length: 1 - 8192

Response

Successful Response

success
boolean
tool_env_var
object