---
title: "Update agent variable"
method: PUT
path: "/public/v1/agents/{agentId}/variables/{variableId}"
tags: ["Flow Variables"]
---

# Update agent variable

`PUT /public/v1/agents/{agentId}/variables/{variableId}`

Manages a single agent variable. Requires a USER API key.

## Path parameters

- `agentId` string, required
- `variableId` number, nullable

## Request body

- PublicVariableUpdateInput
  - `name` string, required
  - `description` string, nullable
  - `pattern` string, nullable

## Response `200`

Variable

- Variable
  - `id` number, required
  - `name` string, required
  - `description` string, nullable
  - `status` 'ACTIVE' | 'DELETED', required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `assistantId` string, nullable
  - `automationId` number, nullable
  - `pattern` string, nullable
  - `defaultValue` string, nullable
  - `isDefault` boolean, required

---

[API](https://skmtc.net/getfrontline/apis/public-api.md) · [All operations](https://skmtc.net/getfrontline/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getfrontline/public-api/revisions/9d33b6aad674/schema)
