Postman is an API platform available as a web or desktop application. A great way to understand an API is to make requests and review the responses. Postman exactly does that by providing a UI for testing and experimenting with API calls without the need to write code. Hence, we recommend using Postman to get started quickly and get the taste of Telnyx APIs. You can easily accomplish this by utilizing our Postman collections .
Steps to use these collections:
- Configure your local environment
- Import a collection.
- Send a test request and inspect the responses.
An environment is a set of variables you can use in your Postman requests. You can use environments to group related sets of values together.
By the end of this tutorial, you would have imported and configured environment to use with Telnyx collections.
Create an API Key following the below steps.
- Sign up for a free Telnyx account
section and create an API Key by clicking
Create API Keybutton.
Note:You need to obtain your API key so Telnyx can authenticate your API requests
Copy and save this key in a safe place and don't share it with anyone as it is a sensitive value.
- Sign up at Postman or Download and Install the Postman application.
- Once signed in to the Postman, select an existing workspace or create a new workspace for your Telnyx collections. If you are new to postman, learn more about creating a workspace here
Once you are in your desired workspace, click Import in the top left corner, select Link from the options and paste this link in the
Enter a URL
Then click continue and it should show basic details of the environment you are about to import. Click Import and you should see a success confirmation at the bottom right
Go to Environments tab on the left and select
You should see list of variables with the ability to edit existing variables and add new variables. Please do the following steps here:
customerApiKeyvariable, in the Initial Value and Current Value columns, enter your API key that you created earlier in Step 1.
- Click Save at the top right to save the value to the environment.
- For the
Click the box in the top right corner that has list of environments and select
Telnyx Environmentfrom the list. Initially it shows up as
Doing this will set the workspace to use
Telnyx Environmentmoving forward.
You are all set with the Telnyx environment for Postman.
Postman Collections are a group of saved requests.
We made it easy to import postman collections by adding a
Run in Postman Button in all the API reference pages that allows you to fork the collections, test API requests and see the results immediately without writing any code.
For example, Use the Run in Postman button below to import the Phone Numbers API collection:
Then, it should show a dialog box with some information on benefits of forking and links to view/import the collection instead of forking. Click
After clicking Fork Collection, you will see a small form with some details to fill before you fork:
Fork label: Make sure you provide a relevant label for you to easily identify it.
- Workspace: Choose which workspace you would like this collection to be part of.
- Watch original collection: Checking this box will notify you when updates are made to the collection so you can pull the latest changes made to the collection.
Congratulations on forking the collection. You should now be able to see the collection under your selected workspace.
As you've added your
API KEY to the environment and imported a collection from the previous steps, you're now ready to send a request.
Note:Make sure you have selected Telnyx Environment at the top right from the list of environments
As we have imported Phone Numbers API collection from previous steps, let us send a request to list the phone numbers in your account:
- Once you are in your desired workspace where you imported this collection, Select the Collections tab in Postman on the left and expand the Phone Numbers collection.
- Expand the Number Configurations folder and select List phone numbers . This loads the List phone numbers request into Postman, ready to send.
- Click Send . The result pane automatically displays the results of your request.
In case you would like to use any filters, just select the checkbox for any filter you would like from the Params tab, set the value and click
If you receive an error, it's likely that one of the values in the environment isn't set correctly. Check the values and try again.
You can play with the API and if you want to save the request with the modified parameters or any other data, just click save and it should save your changes in the collection. This change would be local to you and would not effect the original collection you forked from.
If you would like to get the latest changes made to the original collection into your local collection, click on the Phone Numbers collection folder and then click on the three dots beside Save button which gives you a list of options. Select
Pull Changesand it will fetch you the latest updates in that collection.
Wohoo!! You have completed your first request with Telnyx API and now you're ready to explore what all the Telnyx API has to offer.
If you would like to see list of all collections, check here