Create Your API Key
Visit the API Keys page to create your first API key. On the API Keys page, look for the ”+ API Key” button, typically located in the top-right corner of the page. Clicking this button will initiate the process of generating a new API key. Now that you have created your API key you can make your first API request.Creating an Agent with Python
Prerequisites:
- python version 3 or higher
- virtual environment
1
Virtual Environment Setup
2
Phone Number Setup
We’re going to need a phone number to call our agent. Let’s start by making our first API call to query for available numbers for purchase.You will need a payment method set to use this endpoint. We will also need an API key to call this endpoint, you go here to create one. Make sure you save it somewhere safe, as you can only access it once.If you lose it, just delete the old one and create another.Make sure you place your API key in the appropriate place, or our next call will fail. Now we’re going to actually call the API:If that works correctly, you should see a list of phone numbers available for purchase in JSON format.Next, lets add the code to actually purchase one.Once we add this code, this will actually purchase one on your behalf so be careful running this script after this point. The rest of the code in the quickstart should be placed in the try block.
3
Agent Configuration and Deployment
Now that we have a phone number, the last thing we need to do is configure and deploy our agent with it.This is a minimal configuration, for a full reference of our powerful agent configuration possibilities see here.Now you can call your agent and test it!You can manage your agents, phone numbers, view metrics, and more through the UI or the API.