URL parameters inside API Raw Request is that possible?

Hello Team,

I am back with another challenge for me at least. Hopefully it has easy solution.

I am using one API endpoint to grab events list with various data inside the array. And now I need to show a single event page with different sets of data per each instance so I have to grab it from a different API endpoint. To pull up corresponding data set per event I need to use Raw parameters for the Request inside second endpoint settings. It looks something like this:

{ "action":"getAppMode", "args": "{\"id\" : \"a9761703-de61-4b10-9641-a9e85a5c6e4f\",\"typeID\":470\n}" }

The challenge I currently have is that instead of id and typeID I need to use URL parameters. And if instead of existing in the array id and typeID I put something like {{dc:url:param key="ID"}} and {{dc:url:param key="typeID"}} I get error 500 in the API Tester. I also tried Twig variants {{ url.param({"key":"ID"}) }} and {{ url.param({"key":"typeID"}) }} instead as it is active at my site.

In other words the following expression doesn’t pass the URL parameters dynamically and the tester check fails:

{ "action":"getAppMode", "args": "{\"id\" : \"{{dc:url:param key="ID"}}\",\"typeID\":{{dc:url:param key=\"typeID\"}}}" }

Is there a way to solve this problem?

Another similar case with the API endpoint Request in Raw format where that could be useful is this:

{
"type":["events"],
"organizations":["b6208ed0-4227-479e-8572-91b5e185fecc"],
"start":"01.11.2024",
"end":"31.10.2025",
"categories": 8,
"locations":["c5eaec9f-a4df-4028-b234-a4b0468b98f1"]
}

If we could be pull up variables like type, organizations, start, end, categories and locations from the Element Parameters that would be a very flexible solution to put them in via Param tab and get only the data you need from the External API. If it is not yet possible. I might not know.