https://retellai.com/?utm_source=discord&utm_medium=seo logo
does the api endpoint to get call results need the...
# ❓・ai-evy-support
k
@AI Evy does the api endpoint to get call results need the specific agent id, or if i dont specifi the id it will pull all the results?
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer The
agent_id
parameter in the List Calls endpoint is optional [(1) ]() . If you don't specify the
agent_id
in the
filter_criteria
, it will pull all call results across all agents in your account . You can use the
filter_criteria
object to optionally filter by
agent_id
like this :
Copy code
json
{  
 "agent_id": ["agent_oBeDLoLOeuAbiuaMFXRtDOLriT12345"]
}
If you omit the
agent_id
from your filter criteria, the endpoint returns calls from all agents . Note: There was a recent bug where the
agent_id
filter was being ignored and returning calls from all agents regardless of the filter value [(2) ]() . This issue has been fixed .
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] Retell SDK /APInot filtering by agent id](https://discord.com/channels/1186424376300679209/1476277305352650752) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy is ther a way to chnage a lenguage of an agent for an outbount call via api, before the call starts?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer Based on the available sources, I don't have information about changing an agent's language for a specific outbound call via API before the call starts [(1) ]() [(2) ]() . The
language
parameter is configured at the agent level when creating or updating an agent . However, the sources don't show a way to override this setting for individual calls through the outbound call API. Alternative approach: You could create separate agents with different language configurations (e.g., one agent for English with
"language": "en-US"
and another for Spanish with
"language": "es-ES"
) [(1) ]() . Then, when making an outbound call, you would specify the appropriate
agent_id
for the desired language . If you need to dynamically switch languages during a call, one Discord discussion mentions using a transfer call tool to transfer to a different agent configured for another language [(3) ]() .
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[3] hand off tasks or switch to another agent](https://discord.com/channels/1186424376300679209/1238523181824999445) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.