Mission Control API: Numbers

Using the API is an alternative way to configure and use your Mission Control account. This can be useful if you are interested in writing programs to explore and automate the use of our features.

In this guide we will give you an example of using our API docs GUI. Hopefully this will give you a base for writing programs to interact with our API.

Before we begin, we must tell the API our credentials so the API knows which portal account we will be using it with(and who we are).

For how to do this, please refer to our article on "Authentication and Tokens" after updating your credentials you can follow on from here.

 In this article you will learn how to:

  • Get your numbers
  • Delete a number
  • Get a number
  • Update a number
  • Create a bulk number update request
  • Get a bulk number update request
  • Enable E911 on a number

Get your numbers:

This endpoint returns all the numbers the user has on their account along with some information about them. You can filter which numbers by supplying values to the relevant parameters There are 2 mandatory parameters, simply fill these in with the number of pages you would like returned & the amount of result per page. Once you've done that, hit "Try It Out".

You will receive a JSON response similar to the below with the details of all the numbers associated with your account.

Delete a number:

We can use the delete a number endpoint to delete a number from our account. In order to get the number, we have the option to pass either the number itself (ex: +12124567890) or number ID as as the parameter. If you do not have your number ID or know the number itself, you can acquire it by using the "Get your numbers" endpoint above. Once you have you ID or number, enter it into the "id" box and click "TRY IT NOW".

You will receive a JSON response similar to the below letting you know if you know if your request was successful or not.

Get a number:

Similarly to the "Delete a number" endpoint, we can use the get a number endpoint to get a numbers details from our Telnyx account. In order to get the number, we have the option to pass either the number itself (ex: +12124567890) or number ID as as the parameter. If you do not have your number ID or know the number, you can acquire it by using the "Get your numbers" endpoint above. Once you have you ID or number, enter it into the "id" box and click "TRY IT NOW".

You will receive a JSON response similar to the below with the details of all the number you have requested.

Update a number:

We can update the settings for any number on our account by using the "Update a number" endpoint.

Firstly, we have the option to pass either the number itself (ex: +12124567890) or number ID as as the parameter. If you do not have your number ID or know the number, you can acquire it by using the "Get your numbers" endpoint above. Next, we can enter our JSON body into the parameter box with our desired updated settings. None of the parameters are mandatory. Below Is an example of updating a numbers connection:

You will receive a JSON response similar to the below with the updated details of the number.

Create a bulk number update request:

We can also update multiple numbers at once by using the "Create a bulk number update request" endpoint.

Firstly, must pass either the numbers or number IDs as as the parameter in the id_or_number_vals field. Next, we can enter our JSON body into the parameter box with our desired updated settings. None of the parameters are mandatory. Below Is an example of updating two numbers connection:

You will receive a JSON response similar to the below with the status of the bulk edit. Note your id to check your updates status in the future.

Pending status -1

Complete status - 2

Expired status - 3

PLEASE NOTE: Any changes made to a number while a bulk request is pending can and will be overwritten when the bulk request is processed.

Check the status of your bulk request and the error_messages property withGET/origination/bulk_number_update_requests/{id}. Note that only the properties you specified are returned in the GET.

Get a bulk number update request:

We can use the Get a bulk number update request endpoint to the details bulk number update. In order to get the bulk number update details, we pass either thebulk number update ID as as the parameter. Enter the ID into the "id" box and click "TRY IT NOW".

You will receive a JSON response similar to the below with the details of the bulk edit.

Enable E911 on a number:

We can use the "Enable E911 on a number" endpoint to enable or disable e911 on a number.

We have the option to pass either the number itself (ex: +12124567890) or number ID as the first parameter. If you do not have your number ID or know the number, you can acquire it by using the "Get your numbers" endpoint above. Next, we can enter our JSON body into the next parameter. Both parameters are mandatory. Below is an example of enabling e911 on a number:

You will receive a JSON response similar to the below with the numbers updated details.

Congratulations! You are now able to use the number Mission Control API endpoint!


Can't find what you're looking for? Click the chat bubble at your lower right-hand corner and start a chat!

Did this answer your question?