https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi Retell support, I need to use the batch call fe...
# ❓・ai-evy-support
p
@AI Evy Hi Retell support, I need to use the batch call feature via API to let two different agents make calls: - Agent A should make the first calls - Agent B should send the subsequent reminder calls From what I understand, the API lets me choose the phone number (callerId), but not the specific agent connected to that number. Does this mean I need to have a separate number (DID) for each outbound agent? Thanks for your help!
a
Thanks for tagging me @plannest_26464. I'll look through relevant sources and get back to you shortly.
### Answer You're correct that the batch call API doesn't allow you to override the agent ID for specific calls within a batch [(1) ]() . According to the Create Batch Call API, you can only specify the
from_number
and a list of tasks with
to_number
for each call [(2) ]() . For phone numbers, when you create a phone number, you can bind specific agents to it using
outbound_agent_id
for outbound calls [(3) ]() . This means each phone number is associated with a specific agent for outbound operations. However, there's a workaround for your use case. Instead of using batch calls, you can use the individual Create Phone Call API, which does support agent override [(1) ]() . This would allow you to: 1. Use Agent A for initial calls 2. Use Agent B for reminder calls 3. Use the same phone number for both
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
 from_number: '+14157774444',
 to_number: '+12137774445',
}) ;
[(4) ]() While this approach requires making individual API calls rather than batch calls, it gives you the flexibility to use different agents with the same phone number. The trade-off is that you'll need to handle the calling logic in your application rather than using the batch processing feature.
​ To learn more, see the sources I considered: [[1] Custom agents in batch calls](https://discord.com/channels/1186424376300679209/1400702839629680671) [[2] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[3] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[4] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy Got it. Can you confirm that from the user interface (not via API) it’s possible to assign only one agent to a specific phone number? I’m not able to do it, and I’m afraid it might be a bug. As soon as I try to set just one number for outbound calls and publish the agent, it gets published with both numbers I have on the account.
a
Thanks for the follow-up, @plannest_26464. I'll get back to you soon.
### Answer Based on the documentation, you can indeed assign specific agents to individual phone numbers via the API [(1) ]() [(2) ]() . When importing or updating a phone number, you can set specific agents for inbound and outbound calls using the
inbound_agent_id
and
outbound_agent_id
parameters . For example, when importing a phone number, you can specify:
Copy code
javascript
{
  "phone_number": "+14157774444",
  "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
}
[(1) ]() Similarly, when updating a phone number, you can modify these agent assignments:
Copy code
javascript
{
  "inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "outbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"
}
[(2) ]() However, I don't have specific information about the user interface behavior you're describing in the available sources. The documentation I have access to focuses on the API methods for phone number and agent management [(1) ]() [(2) ]() [(3) ]() [(4) ]() . If you're experiencing issues with the UI where agents are being assigned to all phone numbers instead of just the one you select, this could indeed be a bug or a UI behavior that differs from the API functionality. For UI-specific issues like this, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[2] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) [[4] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
I would just need some support from a technician to check my UI setup — is that possible?
@AI Evy ore simply a hard intervention from your backed, assigning une specific number to one specific agent and one other specific agent to another specific agent
a
Thanks for the follow-up, @plannest_26464. I'll get back to you soon.
### Answer For technical support and backend interventions to assign specific agents to specific phone numbers, you'll need to contact Retell AI support directly through their official channels. Based on the documentation, phone numbers can be configured with specific agents using the API [(1) ]() . When importing a phone number, you can set specific agents for inbound and outbound calls using
inbound_agent_id
and
outbound_agent_id
parameters . Similarly, when retrieving phone number information, you can see which agents are bound to specific numbers [(2) ]() . However, for UI-specific issues or backend interventions where you need technical support to manually configure your phone number and agent assignments, I recommend: - Visit [Contact Sales]() - Visit [) The support team will be able to access your account and make the specific phone number to agent assignments you need, as well as investigate any UI behavior that might be preventing you from making these configurations through the dashboard.
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[2] Get Phone Number](https://docs.retellai.com/api-references/get-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.