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 FQDNs
- Create a new FQDN
- Delete a FQDN
- Update a FQDN
Get your FQNDs:
This endpoint GETs and returns FQDNs associated with your account. There are 2 parameters, simply fill these in with the amount 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 with the FQDNs associated information.
Create a new FQND:
We can use the create a new FQDN endpoint to add a new FQDN to our account. Below is the example of the JSON message body. The fields connection_id, fqdn and dns_record_type are mandatory.
Note: FQDNs can only be created on connections with the authorization type "FQDN".
Fill out your message body with your FQDN details in the Parameters box and click "TRY IT OUT". If your successful, you should get a response displaying the new FQDNs associated information.
Delete an FQDN:
We can use the delete an FQDN endpoint to delete an address from our Telnyx account. In order to delete the address, we will need to pass the FQDN ID as a JSON parameter. If you do not have your FQDN ID, you can acquire it by using the "Get your FQDNs" endpoint above. Once you have your ID, enter it into the "id" box and click "TRY IT NOW". You will get a response similar to the one below letting you know if your request was successful or not.
Update an FQND:
The update an FQDN endpoint allows you to change the details of an existing FQDN on your account. Firstly enter the "id" of the FQDN you want to update in the "id" parameter box. Next prepare the JSON body with the updated FQDN information.
When you are ready, click "TRY IT OUT". If you are successful you will receive a JSON response with the updated FQDN information similar to the one below:
Can't find what you're looking for? Click the chat bubble at your lower right-hand corner and start a chat!