How to Test API Requests on Postman

An introduction on how to effectively configure your Postman environment to utilize SignalWire's Communication API's

Postman is a tool that can be used to test SignalWire API Requests. Follow the steps below to set up an instance of Postman to test API requests from SignalWire:

  1. First, go to the SignalWire Space and choose the project that will be accessed. Go to the API tab on the left side and copy the Project ID, SignalWire Space, and Auth Token. These will be needed for every request.

  2. On the Postman home page, click the gear in the upper right corner. This will open up environments to allow setting the project ID, space, and Auth token as an environment variable so that they don’t have to be re-entered repeatedly.

  1. Now click on the drop down menu that says No Environment and choose the one created.
    Note: A different environment should be created for each project that uses the same name for the space, project ID, and auth token so that projects can be easily switched between without having to change saved requests.

  1. Next, make a collection for each project. Using a Collection allows grouping of requests together and performs authentication at the Collection level instead of having to enter authentication each time. Click the orange + button in the left corner that says New Collection . Go to the Authorization tab and choose Basic Auth from the dropdown menu. Enter the Project ID Variable name between two sets of curly braces for the username and AuthToken variable name nested between two curly braces for the password.

  1. Hover over the collection on the left sidebar and three dots appear. Click the three dots then click Add Request.

  1. API requests can be entered easily by copying from the documentation, without having to include authentication or worry about formatting or encoding. As a general rule, all GET requests use the Query Params tab and POST, PUT, and PATCH use the body tab. Our Compatibility API will use x-www-form-urlencoded as the type, and Relay REST will use type Raw and select JSON then input the JSON data.

Query Param (GET) Example:

Body (POST) Example

Body (RAW JSON):

Did this page help you?