https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I release a phone number from an agent
# ❓・ai-evy-support
t
@AI Evy how do I release a phone number from an agent?
a
Thanks for tagging me @theoz. I'll look through relevant sources and get back to you shortly.
### Answer To release (unbind) a phone number from an agent, you can update the phone number and set the agent ID to
null
. [(1) ]() The
inbound_agent_id
and
outbound_agent_id
fields accept
null
values: - Setting
inbound_agent_id
to
null
means the number will not accept inbound calls - Setting
outbound_agent_id
to
null
means the number won't be able to initiate outbound calls without an agent ID override Using the SDK:
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
  inbound_agent_id: null,
  outbound_agent_id: null,
}) ;
[(2) ]() This will unbind both inbound and outbound agents from the number. You can also update just one field if you only want to release the inbound or outbound agent binding.
​ To learn more, see the sources I considered: [[1] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[2] Here is how that can be fixed](https://retell.discourse.group/t/here-is-how-that-can-be-fixed/23) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.