Manage all your domains using Java

We've got the best API to manage your domain portfolio while saving time and money.

A quick tour of our Java API in under 9 minutes.Pointing up arrow

Pointing straight arrow

A quick tour of our Java API in under 9 minutes.

Fast and easy to use.

Quickly check domain availability, add a DNS record, and request an SSL certificate directly from Java.

Java API Browser

import com.dnsimple.Client;
import com.dnsimple.data.WhoamiData;
import com.dnsimple.request.ContactOptions;
import com.dnsimple.request.RegistrationOptions;

public class Domains {
    public static void main(String[] args) {
        // Obtain your API token and Account ID
        // https://support.dnsimple.com/articles/api-access-token/
        var client = new Client.Builder().accessToken(args[0]).build();
        WhoamiData whoami = client.identity.whoami().getData();
        var accountId = whoami.getAccount() != null
                ? whoami.getAccount().getId()
                : client.accounts.listAccounts().getData().get(0).getId();

        // Check for domain availability
        var domainName = "chuchu-to-check.com";
        var available = client.registrar.checkDomain(accountId, domainName).getData().isAvailable();
        System.out.printf(
                "Domain %s is %s%n",
                domainName,
                available ? "available" : "not available"
        );

        // Before we register a domain we need to create a contact
        var contact = client.contacts.createContact(accountId, ContactOptions.of(
                "Jane",
                "Smith",
                "111 SW 1at Street",
                "Miami",
                "FL",
                "11111",
                "US",
                "jane.smith@example.com",
                "+1 321 555 4444"
        )).getData();
        System.out.printf(
                "Contact %s has been created",
                contact.getId()
        );

        // Register the domain
        var registration = client.registrar.registerDomain(
                accountId,
                domainName,
                RegistrationOptions.of(contact.getId())
        ).getData();
        System.out.printf(
                "Domain %s has been registered with ID %d and state %s%n",
                domainName,
                registration.getId(),
                registration.getState()
        );

        // List all domains in account
        var domainList = client.domains.listDomains(accountId).getData();
        System.out.printf(
                "Your account has %d domains%n",
                domainList.size()
        );
    }
}

Never regretted signing up long ago.

Marius Maximus avatar Marius Maximus, DevOps

Configuring server-wide DNS template is made simple for our Enterprise Network with DNSimple.

Rithika G. avatar Rithika G., Cloud Engineer

A dependable service with amazing technical support.

Valters J. avatar Valters J., DevOps Engineer

Best DNS Hosting Company by far.

Dorian Kind avatar Dorian Kind, Director of Data & Technologies

Case studies

Learn how our customers use DNSimple to automate their companies' domain management — from registering domains and adding zone records, to reselling domains and managing cloud infrastructure.

Linux Foundation logo
Unsplash logo
ClickFunnels logo
Apex Hosting logo

Developer tips

1. Use Sandbox
2. Start small
3. Go further

Open a free account in our Sandbox environment. Write, test, and verify your code before you move to production.

Test domain registration and issuing SSL certificates at no charge. Domains registered in Sandbox do not resolve, and SSL certificates should not be installed in any production environment.

Use our testing credit card to select a plan that matches the features that you'd like to test.

Follow this guide to obtain your token for your API calls.

Create an account in Sandbox

Reliable DNS at the right price

If you manage 100+ domains, get in touch.
We offer flexible plans with adjusted rates and discounts for Enterprise and Resellers.

Integrate in minutes with our API

Update DNS records, request SSL certificates, and transfer or register new domains from Java.

Manage your domains from Java.

Start your free 30-day trial

Photo by Christina @ wocintechchat.com on Unsplash