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"
}
{
"error": "var_type must be one of: text, number, boolean, enum"
}
{
"error": "Dynamic variable not found"
}
Dynamic Variables
Update Dynamic Variable
Update an existing dynamic variable
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"
}
{
"error": "var_type must be one of: text, number, boolean, enum"
}
{
"error": "Dynamic variable not found"
}
Update a dynamic variable’s configuration. Only include fields you want to change.
Path Parameters
string
required
UUID of the dynamic variable to update
Request Body
string
Variable name
string
Description of what this variable captures
string
Data type:
text, number, boolean, or enumarray
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"
}
{
"error": "var_type must be one of: text, number, boolean, enum"
}
{
"error": "Dynamic variable not found"
}