The DNSimple API client for Ruby.
Latest commit 393c63a Jun 30, 2017 @weppos weppos committed on GitHub Use RVM aliases
Failed to load latest commit information.
spec rubocop --auto-correct Jun 20, 2017
.gitignore Revert 8384639 Mar 9, 2016
.rubocop.yml Make the code compatible with rubocop 0.43 👮 Sep 23, 2016
.rubocop_todo.yml Rubocop: Silence Style/IfUnlessModifier Mar 28, 2016
.travis.yml Use RVM aliases Jun 30, 2017 rubocop --auto-correct Jun 20, 2017 Update repository location Jul 14, 2016
Gemfile Relax rake dependency now that the incompatibilities are fixed Jul 31, 2016
Rakefile Add extension to the license file Dec 18, 2015

DNSimple Ruby Client

A Ruby client for the DNSimple API v2.

Build Status Coverage Status

DNSimple provides DNS hosting and domain registration that is simple and friendly. We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.


You can install the gem manually:

$ gem install dnsimple

Or use Bundler and define it as a dependency in your Gemfile:

gem 'dnsimple', '~> 4.0'


This library is a Ruby client you can use to interact with the DNSimple API v2. Here are some examples.

require 'dnsimple'

client = "a1b2c3")

# Fetch your details
response = client.identity.whoami   # execute the call                       # extract the relevant data from the response or         # execute the call and get the data in one line

# Define an account ID.
account_id = 1010

# You can also fetch it from the whoami response
# as long as you authenticate with an Account access token
whoami =
account_id =

# List your domains
puts                      # => domains from the account 1234, first page
puts, query: { page: 3 }).data  # => domains from the account 1234, third page
puts                       # => all domains from the account 1234 (use carefully)

# Create a domain
response =, name: "")

# Get a domain
response =, "")

For the full library documentation visit

Sandbox Environment

We highly recommend testing against our sandbox environment before using our production environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.

The client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host using the base_url option when you construct the client:

client = "", access_token: "a1b2c3")

You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Setting a custom User-Agent header

You customize the User-Agent header for the calls made to the DNSimple API:

client = "my-app")

The value you provide will be appended to the default User-Agent the client uses. For example, if you use my-app, the final header value will be dnsimple-ruby/4.1.0 my-app (note that it will vary depending on the client version).


Copyright (c) 2010-2017 Aetrion LLC. This is Free Software distributed under the MIT license.