Skip to main content
PUT
/
conversations
/
{conversation_id}
/
variables
/
{variable_id}
Update Conversation Variable
curl --request PUT \
  --url https://{api_base_url}/conversations/{conversation_id}/variables/{variable_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "value": "new value",
  "user": "abc-123"
}
'
{
  "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
  "name": "user_preference",
  "value_type": "string",
  "value": "new value",
  "description": "User preference setting",
  "created_at": 1705407629,
  "updated_at": 1705411229
}

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Path Parameters

conversation_id
string<uuid>
required

Conversation ID.

variable_id
string<uuid>
required

Variable ID.

Body

application/json

Request body for updating a conversation variable.

value
any
required

The new value for the variable. Must match the variable's expected type.

user
string

User identifier.

Response

Variable updated successfully.

id
string<uuid>

Variable ID.

name
string

Variable name.

value_type
string

Variable value type. Possible values: string, number, object, secret, file, boolean, array[any], array[string], array[number], array[object], array[file], array[boolean].

value
string

Variable value (can be a JSON string for complex types).

description
string

Variable description.

created_at
integer<int64>

Creation timestamp.

updated_at
integer<int64>

Last update timestamp.