https://retellai.com/?utm_source=discord&utm_medium=seo logo
a
@AI Evy hi there .is it possible to maanage workspaces through api?.the official doc doesn't mention any way to manange workspaces programmatically. another thing is there is an api for buying numbers.but there seems to be no api that allows to get what numbers are available to buy.can you please instruct me on this?
a
Thanks for tagging me @a_retell_fanboyx334_43483. I'll look through relevant sources and get back to you shortly.
### Answer Workspace Management via API Currently, Retell doesn't expose a public API to create or provision new workspaces programmatically [(1) ]() . Workspaces can only be created via the dashboard UI . For multi-tenant setups, the usual approach is to use one workspace with separate agents + phone numbers per tenant, or request enterprise-level API access from Retell support to enable workspace provisioning . The complete API reference at should be complete, so there are not ways to create/edit workspaces via API [(2) ]() . Phone Number Availability API I don't have information in the available sources about an API endpoint to check available phone numbers before purchasing. The sources only discuss workspace management limitations. For the phone number availability question, I'd recommend: - Checking the [official API documentation]() - Visiting [Contact Sales]() for clarification on number provisioning APIs Would you like me to provide a general answer based on common telephony API patterns?
​ To learn more, see the sources I considered: [[1] Is there an API endpoint to add/provision additional workspaces?](https://discord.com/channels/1186424376300679209/1387492122017660988) [[2] Discord message from @jeffl6289 on 2025-01-19](https://discord.com/channels/1186424376300679209/1186462578310910112/1330350084218556436) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy alright.can you please dig deeper on the api for available numbers thingy?
a
Thanks for the follow-up, @a_retell_fanboyx334_43483. I'll get back to you soon.
### Answer Based on the available documentation, there is no API endpoint to query available phone numbers before purchasing [(1) ]() . The phone number purchase workflow in Retell works as follows : Purchase from Dashboard: You can purchase numbers from the dashboard and optionally specify area codes . Purchase via API: You can create a phone number programmatically, but you cannot check availability first . The API simply attempts to purchase a number based on your criteria . Here's the documented approach for purchasing a number via API :
Copy code
javascript
const phoneNumberResponse = await retell.phoneNumber.create({
  inbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  outbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
}) ;
What you can do: - List phone numbers you already own [(2) ]() - Purchase numbers (with optional area code specification) [(1) ]() - Import existing numbers from custom telephony [(3) ]() - Update phone number settings [(4) ]() - Delete phone numbers [(5) ]() The documentation doesn't include an endpoint to search or preview available numbers before purchase [(1) ]() . For clarification on number availability APIs or to request this feature, visit [Contact Sales]() . **
​ To learn more, see the sources I considered: [[1] Purchase phone number](https://docs.retellai.com/deploy/purchase-number) [[2] List Phone Numbers](https://docs.retellai.com/api-references/list-phone-numbers) [[3] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[4] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[5] Delete Phone Number](https://docs.retellai.com/api-references/delete-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.