### Answer
Based on the official documentation, dynamic variables can be used in custom function API endpoints, but there are specific ways to implement them [(1) ](
) [(2) ](
) .
For
query parameters, you can include dynamic variables in the request URL . The documentation shows you can set query parameters where "Query parameter values can be static or include dynamic variables" .
However, for
path variables in the endpoint URL itself, there are some limitations. From community discussions, it appears that while dynamic variables work in POST request bodies, using them directly in GET endpoint URLs as path variables can be problematic [(3) ](
) .
The recommended approach is to:
1. Use query parameters instead of path variables for dynamic values [(1) ](
) [(2) ](
)
2. Set up dynamic variables using the Extract Dynamic Variables function before calling your custom function [(3) ](
)
3. For GET requests, pass dynamic values as query parameters rather than embedding them in the URL path [(4) ](
) [(3) ](
)
For example, instead of
/api/employee/{{employeeId}}
, use
/api/employee
with
employeeId
as a query parameter [(3) ](
) .
The documentation confirms that you can "define query parameters to include in the request URL that Retell appends to your endpoint" and