Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

Update an Agent Variable

PATCH/v1/projects/{project_id}/agent-variables/{variable_id}Update an Agent Variable

Updates the value of an existing template variable

Parameters

project_idstringpathrequired

The unique identifier of the project

variable_idstringpathrequired

The unique identifier of the agent variable

Request body

Updated value for the agent variable

application/json
objectUpdateAgentVariableV1Request

UpdateAgentVariableV1Request

Request body for updating an agent variable

valuevaluerequired

The new value to substitute

Example request
{
  "value": null
}

Responses

200Agent variable updatedapplication/json
objectAgentVariableV1

AgentVariableV1

A template variable for agent configurations

created_atstring · date-time

Timestamp when the variable was created

keystringrequired

The variable name, following the DG_<VARIABLE_NAME> format

updated_atstring · date-time

Timestamp when the variable was last updated

valuevaluerequired

The value to substitute. Can be any valid JSON type

variable_idstringrequired

The unique identifier of the variable

Example response
{
  "created_at": "2026-06-09T00:00:00Z",
  "key": "string",
  "updated_at": "2026-06-09T00:00:00Z",
  "value": null,
  "variable_id": "string"
}
400Invalid Requestapplication/json
valueErrorResponse

ErrorResponse

oneOf · 3 options
Option 1stringErrorResponseTextError

ErrorResponseTextError

Option 2objectErrorResponseLegacyError

ErrorResponseLegacyError

err_codestring

The error code

err_msgstring

The error message

request_idstring

The request ID

Option 3objectErrorResponseModernError

ErrorResponseModernError

categorystring

The category of the error

detailsstring

A description of the error

messagestring

A message about the error

request_idstring

The unique identifier of the request

Example response
{
  "err_code": "string",
  "err_msg": "string",
  "request_id": "string"
}
Documentation menu