Mission Control API: Porting

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:

  • Check phone number portability
  • Get your port requests
  • Get a port request
  • Get sub requests for a port request
  • Get a sub request
  • Get comments for a port request
  • Post a comment on a port request
  • Get supporting documents for a port request
  • Get a supporting document
  • Get a link to download supporting documents

Check phone number portability

checks a list of numbers to see if they're portable to Telnyx or not. You can request for an array of numbers/for a single number. To do this double click on the body sample on the right hand corner and it will copy over to the parameters section where you can edit and then click on the "TRY IT OUT" button. Please see screen prints below of both request and response respectively:

Parameters

Response

In this case the number in question is not portable, if it is portable you will get the response accordingly.

Get your port requests

This returns all the port requests that have been made on your account both complete and incomplete. Under parameters you will be able to specify how you want the output/response to be generated. Please see the screen print below for sample request:

Parameters

Response

Get a port request

This returns a single port request that is not canceled or completed based on the id supplied. Under parameters, simply input the Port Request Id and select how you want the response to look like or leave the rest of the parameters as default. Please see screen print of both request and response below:

Parameters

Response : - In this response the port request in question was canceled and hence the error message, otherwise the details will be returned.

Get sub requests for a port request

This returns all sub requests for a given port request. To do this simply input the port request id which you got after making a port request in the parameters section and click the "TRY IT OUT" button. Please see screen print of a request and sample output to expect below:

Parameters

Sample Response

Get a sub request

This will return a sub request belonging to the given port request id. Simply input both port request id and sub request id and then click the "TRY IT OUT" button. Please see screen print of request and response below:

Parameters

Response

In this response we got "401 unauthorized" because this particular port request was canceled.

To get a successful response, you must ensure the port request is not canceled and also ensure the details are correct.

Get comments for a port request

This returns all the comments made on a given port request. Simply input the port request id and click on the "TRY IT OUT" button. Please see screen print of request and sample output:

Parameters

Sample Output

Post a comment on a port request

This allows you to post a comment on a port request by simply inputting the port request id and the comment, then click on the "TRY IT OUT" button. Please see screen print of request and sample output below:

Parameters

Sample Output

Get supporting documents for a port request

This action will return a list of all documents needed for a particular port request by simply inputting the port request id and clicking the "TRY IT OUT" button. Please find screen print of request and a sample output below:

Parameters

Sample output

Get a supporting document

This action will return a supporting document needed for a particular port request by simply inputting the port request and supporting document id( this can be gotten from the "Get supporting documents for a port request") and clicking the "TRY IT OUT" button. Please find screen print of request and a sample output below:

Parameters

Sample Response


Get a link to download supporting documents

This action will create a link to allow you download supporting documents. Expires in 1 hour. To do this simply input the port request and document id and then click on the 'TRY IT OUT" button. Please see sample parameters and response in the below print screen:

Sample Parameters

Sample Response

Congratulations! You are all set to successfully port a number into us

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?