Skip to main content
PATCH
/
manage-dynamic-variables
/
{id}
curl -X PATCH "https://api.magpipe.ai/functions/v1/manage-dynamic-variables/789e0123-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "The caller full name including middle name",
    "var_type": "text"
  }'
{
  "id": "789e0123-e89b-12d3-a456-426614174000",
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_id": "456e7890-e89b-12d3-a456-426614174000",
  "name": "caller_name",
  "description": "The caller full name including middle name",
  "var_type": "text",
  "enum_options": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T14:00:00Z"
}
Update a dynamic variable’s configuration. Only include fields you want to change.

Path Parameters

id
string
required
UUID of the dynamic variable to update

Request Body

name
string
Variable name
description
string
Description of what this variable captures
var_type
string
Data type: text, number, boolean, or enum
enum_options
array
Required when var_type is enum. List of allowed values.

Response

Returns the updated dynamic variable object.
curl -X PATCH "https://api.magpipe.ai/functions/v1/manage-dynamic-variables/789e0123-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "The caller full name including middle name",
    "var_type": "text"
  }'
{
  "id": "789e0123-e89b-12d3-a456-426614174000",
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_id": "456e7890-e89b-12d3-a456-426614174000",
  "name": "caller_name",
  "description": "The caller full name including middle name",
  "var_type": "text",
  "enum_options": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T14:00:00Z"
}