Free Trial
Learning

What you can do with the DNSimple API

Anthony Eden's profile picture Anthony Eden on

The DNSimple API is a powerful collection of endpoints that are useful for automating your domain's management. The size of that collection of endpoints is pretty significant. It helps to understand how the API is organized in order to make the most of it, so in this post I will introduce you to the structure of the DNSimple API.

Getting Started

To start, open the documentation for version 2 of the DNSimple API. Here you will see a series of sections explaining the basic use of the API including information about authentication, how to connect, how to paginate and filter responses, and much more. To the left under the API v2 header are the subsections. You could start from the top and work your way down, but for this post I'd like to highlight a few common activities and their corresponding API endpoints.

First, if you want to verify that you can connect to the API with a particular user or account you'll want to use the Identity endpoint. This endpoint provides you with basic information about who you are connecting as when you make an API call with specific credentials.

Domains and Records

Once you've verified you can connect using specific credentials you may want to create a domain via the API; for this, use the Domains endpoint (specifically the Create a Domain endpoint. Creating a domain as a hosted domain is useful if you already have domains registered elsewhere and is the first step in being able to manage DNS records through the API.

If you want to register a brand new domain that is not registered elsewhere or transfer an existing domain, then you'll use the Registration endpoints; this endpoint provides access to various domain registrar functionality. Before registering a domain you also may need to use the Contacts endpoint to create a contact that is used as the domain registrant if you do not already have the registrant.

Once you have a domain, either hosted or registered, you can use the Zones Records endpoint; with this you can list records for a zone, as well as add, edit, and remove zone records. Keep in mind that listing endpoints are paginated so if you have more than 30 records in your zone you will need to handle pagination. All of our official API clients include code to help with managing pagination.

In addition to managing records in a zone directly you can also use the Services API to list available one-click services, and then apply them using the Domain Services endpoint.

Email Forwards and Webhooks

Another useful endpoint is the Email Forwards endpoint; with this endpoint you can add and remove email forwards to and from domains.

Finally, once you've gotten the basics of querying and controlling your domains through the API, take a look at the Webhooks endpoint for details on how to add and remove webhooks and what kinds of messages are sent as webhooks.

Conclusion

That's it for now. I hope this blog post has given you a taste of what can be done with the DNSimple API and provided you with the entry points you need to get started automating your domain management today! Keep in mind we maintain a Developer Sandbox for you to test your API calls and simulate responses before you go live. The DNSimple API is quite powerful and can be helpful whether you have lots of domains to manage, or just a few. As always if you have any questions or want to talk with us about your integration feel free to get in touch.

Share on Twitter and Facebook

Anthony Eden's profile picture

Anthony Eden

I break things so Simone continues to have plenty to do. I occasionally have useful ideas, like building a domain and DNS provider that doesn't suck.

We think domain management should be easy.
That's why we continue building DNSimple.

Try us free for 30 days
4.5 stars

4.3 out of 5 stars.

Based on Trustpilot.com and G2.com reviews.