Skip to main content
GET
/
manage-dynamic-variables
curl "https://api.magpipe.ai/functions/v1/manage-dynamic-variables?agent_id=123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "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 full name of the caller",
    "var_type": "text",
    "enum_options": null,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "abc12345-e89b-12d3-a456-426614174000",
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "user_id": "456e7890-e89b-12d3-a456-426614174000",
    "name": "shirt_size",
    "description": "Customer preferred shirt size",
    "var_type": "enum",
    "enum_options": ["small", "medium", "large", "x-large"],
    "created_at": "2024-01-14T09:00:00Z",
    "updated_at": "2024-01-14T09:00:00Z"
  }
]
Retrieve all dynamic variables configured for a specific agent.

Query Parameters

agent_id
string
required
UUID of the agent to list variables for

Response

Returns an array of dynamic variable objects.
id
string
UUID of the variable
agent_id
string
UUID of the agent
name
string
Variable name
description
string
Variable description
var_type
string
Data type (text, number, boolean, enum)
enum_options
array
Allowed values (only for enum type)
created_at
string
ISO 8601 timestamp
curl "https://api.magpipe.ai/functions/v1/manage-dynamic-variables?agent_id=123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "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 full name of the caller",
    "var_type": "text",
    "enum_options": null,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "abc12345-e89b-12d3-a456-426614174000",
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "user_id": "456e7890-e89b-12d3-a456-426614174000",
    "name": "shirt_size",
    "description": "Customer preferred shirt size",
    "var_type": "enum",
    "enum_options": ["small", "medium", "large", "x-large"],
    "created_at": "2024-01-14T09:00:00Z",
    "updated_at": "2024-01-14T09:00:00Z"
  }
]