DNSimple - Simple Hosted DNS and Domain Management

API Documentation

The following documentation describes the DNSimple REST API.

Clients

There are already a couple different clients and tools that use the DNSimple REST API. You can use these as a starting point or continue on through the documentation below. If you develop a client for the API please let us know so we can add it here: support@dnsimple.com.

Tools

Tools built around the DNSimple API.

Contents

End Point

The DNSimple API end-point URL is https://dnsimple.com/

Authentication

There are two authentication methods availabe: HTTP Basic Authentication or the X-DNSimple-Token header.

HTTP Basic Authentication credentials are the same as your account: your email address and password.

The X-DNSimple-Token header is your email address joined with your API token separated by a colon. You may create, reset or clear your API token by going to your Account page.

Requests

All requests can be sent as application/x-www-form-urlencoded or application/json content types.

The examples below are shown with JSON but WWW Form Encoded data can be sent as well.

Responses

All requests must include the Accept header set to application/json.


Domains

GET /domains

Get a list of all domains in your account.

Example response:

  [
     {
        "domain":{
           "name":"example1.com",
           "expires_at":"3/18/2012 4:07:00 PM",
           "created_at":"2010-10-03T11:38:04Z",
           "registration_status":"registered",
           "updated_at":"2010-10-28T10:00:17Z",
           "registrant_id":1,
           "id":1,
           "user_id":1,
           "name_server_status":"active"
        }
     },
     {
        "domain":{
           "name":"example2.com",
           "expires_at":"8/17/2013 8:57:00 PM",
           "created_at":"2010-07-05T02:43:40Z",
           "registration_status":"registered",
           "updated_at":"2010-10-21T16:10:26Z",
           "registrant_id":1,
           "id":2,
           "user_id":1,
           "name_server_status":"active"
        }
     },
     {
        "domain":{
           "name":"example3.com",
           "expires_at":"7/10/2013 7:37:00 PM",
           "created_at":"2010-07-01T07:46:17Z",
           "registration_status":"registered",
           "updated_at":"2010-10-21T15:47:47Z",
           "registrant_id":1,
           "id":3,
           "user_id":1,
           "name_server_status":"active"
        }
     }
  ]
  

GET /domains/{id_or_name}

Get the details for a specific domain in your account. You may pass either the domain numeric ID or the domain name itself.

Example response:

  {
     "domain":{
        "name":"example.com",
        "expires_at":"3/18/2012 4:07:00 PM",
        "created_at":"2010-10-03T11:38:04Z",
        "registration_status":"registered",
        "updated_at":"2010-10-28T10:00:17Z",
        "registrant_id":1,
        "id":1,
        "user_id":1,
        "name_server_status":"active"
     }
  }
    

POST /domains

Create a single domain in DNSimple in your account.

The request must include the following:

  • domain[name]

Example request body:

  {
      "domain":{
          "name":"newdomain.com"
      }
  }
    

Upon successful creation of the domain the response code will be a 201 and the response body will contain the domain details.

GET /domains/{name}/check

Check if a domain is available for registration. If the domain is available then this will return a 404 which indicates that the name is available. If it is not available then the response will be a 200. In addition the body of the response will contain the domain name that was checked along with a status string.

  {
      "name":"newdomain.com",
      "status":"available"
  }
    

POST /domain_registrations

Register a domain name with DNSimple and the appropriate domain registry. Your account must already be active for this command to complete successfully. You will be automatically charged the 1 year registration fee upon successful registration, so please be careful with this command.

You must use the ID for an existing contact for the domain[registrant_id] value.

The request must include the following:

  • domain[name]
  • domain[registrant_id]

For domains that require extended attributes you must also include the extended attributes:

  • domain[extended_attribute][]

Example request body:

  {
      "domain":{
          "name":"newdomain.com",
          "registrant_id":1
      }
  }
    

Example request body with extended attributes:

  {
      "domain": {
          "name": "newdomain.us",
          "registrant_id": 1,
          "extended_attribute": {
            "us_nexus":"C11",
            "us_purpose":"P3"
          }
      }
  }
    

Upon successful creation of the domain the response code will be a 201 and the response body will contain the domain details.

POST /domain_transfers

Transfer a domain name from another domain registrar into DNSimple. Your account must already be active for this command to complete successfully. You will be automatically charged the 1 year transfer fee upon successful transfer of the domain, which may take anywhere from a few minutes up to 7 days.

Only domains that do not require extended attributes may be transferred through the API at this time. For example, domains ending in .com and .net may be transferred through the API, however domains ending in .us and .ca may not.

You must use the ID for an existing contact for the domain[registrant_id] value.

The request must include the following:

  • domain[name]
  • domain[registrant_id]

For top-level domains that require an authorization code, you must include the following:

  • transfer_order[authinfo]

Example request body:

  {
      "domain":{
          "name":"transferdomain.com",
          "registrant_id":1
      },
      "transfer_order":{
          "authinfo":"xjfjfjvhc293"
      }
  }
    

Upon successful issuance of the transfer order the response code will be a 201 and the response body will contain the transfer order details.

POST /domain_renewal

Renew a domain name in your account. This will renew the domain for 1 year.

The request must include the following:

  • domain[name]

The request may include the following:

  • domain[renew_whois_privacy]

Example request body:

  {
      "domain":{
          "name":"renewable.com"
      }
  }
    

Domains will always be renewed for their minimum renewal period, which is 1 year for most domains but for some domains may be more.

POST /domains/{id_or_name}/auto_renewal

Enable auto renewal for a domain. Some TLDs do not support auto renewal and will respond with an error condition in that case.

Example request body:

  {
      "auto_renewal": {}
  }
    

DELETE /domains/{id_or_name}/auto_renewal

Disable auto renewal for a domain.

DELETE /domains/{id_or_name}

Delete the given domain from your account. You may use either the domain ID or the domain name.

Please note that for domains which are registered with DNSimple this will not delete the domain from the registry.

POST /domains/{id_or_name}/transfer_outs

Prepare a domain for transferring out. You may use either the domain ID or the domain name.

Note: this will unlock a domain and send the authorization code to the domain's administrative contact.

There is no body sent with this request.

Name Servers

POST /domains/{id_or_name}/name_servers

Change the name servers either to external name servers or back to DNSimple's name servers. This API accepts up to 6 name servers.

Example request body:

  {
      "name_servers": {
          "ns1": "ns1.example.com",
          "ns2": "ns2.example.com",
          "ns3": "ns3.example.com",
          "ns4": "ns4.example.com"
      }
  }
    

To change the name servers back to DNSimple's name servers, send the following body:

  {
      "name_servers": {
          "ns1": "ns1.dnsimple.com",
          "ns2": "ns2.dnsimple.com",
          "ns3": "ns3.dnsimple.com",
          "ns4": "ns4.dnsimple.com"
      }
  }
    

Services

Services provide a way to apply many records to a domain at once. Additionally any changes made to a service will automatically be reflected in the domain's records.

GET /services

Get a list of all services supported.

  [
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Add Google Apps for your domain.",
              "id": 1,
              "name": "Google Apps",
              "short_name": "googleapps",
              "updated_at": "2010-12-15T08:08:02Z" 
          } 
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use Heroku as your web host.",
              "id": 2,
              "name": "Heroku",
              "short_name": "heroku",
              "updated_at": "2010-12-15T08:08:02Z" 
          } 
      }
  ]
    

GET /services/{id}

Describe a particular service by ID.

  {
      "service": {
          "created_at": "2010-12-15T08:08:02Z",
          "description": "Add Google Apps for your domain. Includes Docs, Spreadsheets, 
          Gmail, Calendar, Presentation and more.",
          "id": 1,
          "name": "Google Apps",
          "short_name": "googleapps",
          "updated_at": "2010-12-15T08:08:02Z"
      }
  }
    

GET /domains/{name_or_id}/applied_services

List services already applied to a domain.

  [
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Add Google Apps for your domain. Includes Docs, Spreadsheets, 
              Gmail, Calendar, Presentation and more.",
              "id": 1,
              "name": "Google Apps",
              "short_name": "googleapps",
              "updated_at": "2010-12-15T08:08:02Z" 
          } 
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use Heroku as your web host.",
              "id": 2,
              "name": "Heroku",
              "short_name": "heroku",
              "updated_at": "2010-12-15T08:08:02Z" 
          } 
      }
  ]
    

GET /domains/{name_or_id}/available_services

List services available for a domain.

  [
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Forward {{domain}} to your Wordpress.com hosted blog.",
              "id": 3,
              "name": "WordPress",
              "short_name": "wordpress",
              "updated_at": "2010-12-15T08:08:02Z"
          }
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use posterious.com as your blog.",
              "id": 4,
              "name": "Posterous",
              "short_name": "posterous",
              "updated_at": "2010-12-15T08:08:02Z"
          }
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use Blogger for your blog.",
              "id": 5,
              "name": "Blogger",
              "short_name": "blogger",
              "updated_at": "2010-12-15T08:08:02Z"
          }
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use Tumblr for your blog.",
              "id": 6,
              "name": "Tumblr",
              "short_name": "tumblr",
              "updated_at": "2010-12-15T08:08:02Z"
          }
      },
      {
          "service": {
              "created_at": "2010-12-15T08:08:02Z",
              "description": "Use Tender for your customer support.",
              "id": 7,
              "name": "Tender",
              "short_name": "tender",
              "updated_at": "2010-12-15T08:08:02Z"
          }
      }
  ]
    

POST /domains/{name_or_id}/applied_services

Add a service to a domain.

The request must include the short name of the service or the service id:

  • service[name_or_id]

DELETE /domains/{name_or_id}/applied_services/{id}

Remove a service from a domain. {id} is the service ID.

Records

GET /domains/{name_or_id}/records

Get the list of records for the specific domain.

Example response:

  [
     {
        "record":{
           "name":"",
           "ttl":3600,
           "created_at":"2010-07-04T04:41:31Z",
           "special_type":null,
           "updated_at":"2010-10-21T15:47:47Z",
           "domain_id":1,
           "id":31,
           "content":"1.2.3.4",
           "record_type":"A",
           "prio":null
        }
     },
     {
        "record":{
           "name":"www",
           "ttl":3600,
           "created_at":"2010-07-01T08:01:18Z",
           "special_type":null,
           "updated_at":"2010-10-21T15:47:47Z",
           "domain_id":1,
           "id":2,
           "content":"example.com",
           "record_type":"CNAME",
           "prio":null
        }
     },
     {
        "record":{
           "name":"",
           "ttl":3600,
           "created_at":"2010-07-04T04:42:11Z",
           "special_type":null,
           "updated_at":"2010-10-21T15:47:47Z",
           "pdns_identifier":"40",
           "domain_id":1,
           "id":32,
           "content":"mail.somesite.com",
           "record_type":"MX",
           "prio":10
        }
     }
  ]  
    

You may also specify certain query parameters to filter the list. Currently name and/or type are allowed.

Example request: GET /domains/example.com/records?name=www or GET /domains/example.com/records?type=txt

GET /domains/{name_or_id}/records/{id}

Display details about a specific record.

Example response:

  {
     "record":{
        "name":"www",
        "ttl":3600,
        "created_at":"2010-07-01T08:01:18Z",
        "special_type":null,
        "updated_at":"2010-10-21T15:47:47Z",
        "domain_id":1,
        "id":2,
        "content":"example.com",
        "record_type":"CNAME",
        "prio":null
     }
  }
    

POST /domains/{name_or_id}/records

Create a record for the given domain.

The request must include the following:

  • record[name]
  • record[record_type]
  • record[content]

The request may also include the following:

  • record[ttl]
  • record[prio]

Example request body:

  {
      "record":{
          "name":"",
          "record_type":"MX",
          "content":"mail1.mailservers.com",
          "ttl":3600,
          "prio":10
      }
  }
    

Upon successful creation of the record the response code will be a 201 and the response body will contain the record details.

PUT /domains/{name_or_id}/records/{id}

Update the given record for the given domain.

The request may include any or all of the following:

  • record[name]
  • record[content]
  • record[ttl]
  • record[prio]

Example request body:

  {
      "record":{
          "name":"",
          "content":"1.2.3.4",
          "ttl":600
      }
  }
    

DELETE /domains/{name_or_id}/records/{id}

Delete the record with the given ID for the given domain.

Vanity Name Servers

Vanity name servers are used to hide the use of DNSimple's name servers and instead use our name servers with different names.

POST /domains/{name_or_id}/vanity_name_servers

Enable vanity name servers for the given domain.

Required fields:

  • vanity_nameserver_configuration[server_source]

server_source must be either "dnsimple" or "external". If you pass "external" as the server source then you must include name servers to use. You may use up to 4 external name servers (ns1 through ns4).

Example request:

  {
      "vanity_nameserver_configuration":{
          "server_source": "dnsimple"
      }
  }
    

Example request with external name servers:

  {
      "vanity_nameserver_configuration":{
          "server_source": "external",
          "ns1": "ns1.example.com",
          "ns2": "ns2.example.com"
      }
  }
    

DELETE /domains/{name_or_id}/vanity_name_servers

Disable vanity name servers for the given domain.

Example response:

  {
    "status": "disabled"
  }
    

Contacts

Contacts are used for domain registrant information when a domain is registered with DNSimple or transferred into DNSimple from another registrar.

GET /contacts

List all of the contacts in the account.

Example response:

  [
     {
        "contact":{
           "city":"Miami",
           "address1":"2834 SW 88th Ave",
           "state_province":"FL",
           "created_at":"2010-08-24T01:58:22Z",
           "address2":"",
           "job_title":"",
           "country":"US",
           "updated_at":"2010-08-24T01:58:22Z",
           "postal_code":"33546",
           "organization_name":"",
           "id":1,
           "user_id":1,
           "phone_ext":null,
           "phone":"+13051123333",
           "last_name":"Doe",
           "fax":null,
           "email_address":"jane.doe@gmail.com",
           "first_name":"Jane"
        }
     },
     {
        "contact":{
           "city":"Miami",
           "address1":"1000 SW 1st Street",
           "state_province":"FL",
           "created_at":"2010-09-03T20:11:51Z",
           "address2":"",
           "job_title":"President",
           "country":"US",
           "updated_at":"2010-09-03T20:11:51Z",
           "postal_code":"33143",
           "organization_name":"Little Co Inc.",
           "id":6,
           "user_id":1,
           "phone_ext":null,
           "phone":"505 111 2222",
           "last_name":"Smith",
           "fax":null,
           "email_address":"john.smith@example.com",
           "first_name":"John"
        }
     }
  ]

    

GET /contacts/{id}

List a specific contact in the account using the contact ID to find the contact.

Example response:

  {
      "contact": {
          "city": "Miami",
          "address1": "123 Ave B",
          "state_province": "FL",
          "created_at": "2010-08-11T02:12:35Z",
          "address2": "",
          "job_title": "",
          "country": "US",
          "updated_at": "2010-09-06T01:21:20Z",
          "postal_code": "12345",
          "organization_name": "",
          "id": 4,
          "user_id": 16,
          "state_province_choice": "S",
          "phone_ext": null,
          "phone": "111 111 1111",
          "last_name": "Doe",
          "fax": "",
          "email_address": "jane.doe@example.com",
          "first_name": "Jane" 
      }
  }
    

POST /contacts

Create the contact in DNSimple.

The request must include the following:

  • contact[first_name]
  • contact[last_name]
  • contact[address1]
  • contact[city]
  • contact[state_province]
  • contact[postal_code]
  • contact[country]
  • contact[email_address]
  • contact[phone]

The request may also include the following:

  • contact[organization_name]
  • contact[job_title]
  • contact[fax]
  • contact[phone_ext]
  • contact[label]

Example request body:

  {
      "contact": {
          "first_name": "John",
          "last_name": "Doe",
          "address1": "1 SW 1st Street",
          "city": "Miami",
          "state_province": "FL",
          "postal_code": "33143",
          "country": "US",
          "email_address": "john.doe@gmail.com",
          "phone": "+15551122323",
          "label": "Home"
      }
  }
    

If the contact[organization_name] is specified then you must also include contact[job_title].

PUT /contacts/{id}

Update a contact in DNSimple. See the POST /contacts above for information on which fields are required and which are optional.

DELETE /contacts/{id}

Delete a contact from DNSimple.

Templates

Templates provide a way to group common records together and apply them en masse to a domain.

GET /templates

List all of the custom templates in the account.

Example response:

  [
      {
          "dns_template": {
              "name": "Example",
              "created_at": "2010-09-30T20:01:55Z",
              "updated_at": "2010-09-30T20:01:55Z",
              "id": 31,
              "user_id": 1,
              "short_name": "example",
              "description": "An example of a template."
          }
      }
  ]

    

GET /templates/{short_name_or_id}

Get a specific template.

Example response:

  {
      "dns_template": {
          "name": "Example",
          "created_at": "2010-09-30T20:01:55Z",
          "updated_at": "2010-09-30T20:01:55Z",
          "id": 31,
          "user_id": 1,
          "short_name": "example",
          "description": "An example of a template."
      }
  }
    

POST /templates

Create a custom template.

The request must include the following:

  • dns_template[name]
  • dns_template[short_name]

The request may also include the following:

  • dns_template[description]

Example request body:

  {
      "dns_template": {
          "name": "My Template",
          "short_name": "my_template" 
      }
  }
    

DELETE /templates/{short_name_or_id}

Delete the given template.

POST /domains/{id_or_name}/templates/{id_or_short_name}/apply

Apply the specific template, identified by either its ID or its short name, to the given domain.

Template Records

Manage records on a template.

GET /templates/{short_name_or_id}/template_records

List the template records for a template.

Example response:

  [
      {
          "dns_template_record": {
              "name": "sample",
              "ttl": 3600,
              "dns_template_id": 31,
              "created_at": "2010-09-30T20:02:11Z",
              "special_type": "",
              "updated_at": "2010-09-30T20:02:11Z",
              "id": 119,
              "content": "1.2.3.4",
              "record_type": "A",
              "prio": null
          }
      }
  ]
    

GET /templates/{short_name_or_id}/template_records/{id}

View a specific template record.

Example response:

  {
      "dns_template_record": {
          "name": "sample",
          "ttl": 3600,
          "dns_template_id": 31,
          "created_at": "2010-09-30T20:02:11Z",
          "special_type": "",
          "updated_at": "2010-09-30T20:02:11Z",
          "id": 119,
          "content": "1.2.3.4",
          "record_type": "A",
          "prio": null
      }
  }
    

POST /templates/{short_name_or_id}/template_records

Create a template record in the given template.

The request must include the following:

  • dns_template_record[name]
  • dns_template_record[record_type]
  • dns_template_record[content]

The request may also include the following:

  • dns_template_record[ttl]
  • dns_template_record[prio]

Example request body:

  {
      "dns_template_record": {
          "name": "sample",
          "record_type": "A",
          "content": "1.2.3.4",
          "ttl": 7200
      }
  }
    

DELETE /templates/{short_name_or_id}/template_records/{id}

Delete the specific template record.

Extended Attributes

Some TLDs require extended attributes when registering or transferring a domain. This API interface provides information on the extended attributes for any particular TLD.

GET /extended_attributes/{tld}

Get detais on what extended attributes are required for a particular top-level domain.

Example response

  [
      {
          "name": "uk_legal_type",
          "description": "Legal type of registrant contact",
          "child": false,
          "required": true,
          "application": "2",
          "options": [
              {
                  "title": "UK Individual",
                  "value": "IND",
                  "description": "UK Individual (our default value)"
              },
              {
                  "title": "Non-UK Individual (representing self)",
                  "value": "FIND",
                  "description": "Non-UK Individual (representing self)"
              },
              {
                  "title": "UK Limited Company",
                  "value": "LTD",
                  "description": "UK Limited Company"
              },
              {
                  "title": "UK Public Limited Company",
                  "value": "PLC",
                  "description": "UK Public Limited Company"
              },
              {
                  "title": "UK Partnership",
                  "value": "PTNR",
                  "description": "UK Partnership"
              },
              {
                  "title": "UK LLP",
                  "value": "LLP",
                  "description": "UK Limited Liability Partnership"
              },
              {
                  "title": "UK Sole Trader",
                  "value": "STRA",
                  "description": "UK Sole Trader"
              },
              {
                  "title": "UK Registered Charity",
                  "value": "RCHAR",
                  "description": "UK Registered Charity"
              },
              {
                  "title": "UK Industrial/Provident Registered Company",
                  "value": "IP",
                  "description": "UK Industrial/Provident Registered Company"
              },
              {
                  "title": "UK School",
                  "value": "SCH",
                  "description": "UK School"
              },
              {
                  "title": "Other Foreign",
                  "value": "FOTHER",
                  "description": "Other foreign organizations"
              },
              {
                  "title": "UK Government Body",
                  "value": "GOV",
                  "description": "UK Government Body"
              },
              {
                  "title": "UK Corporation by Royal Charter",
                  "value": "CRC",
                  "description": "UK Corporation by Royal Charter"
              },
              {
                  "title": "UK Statutory Body FIND",
                  "value": "STAT",
                  "description": "UK Statutory Body FIND"
              },
              {
                  "title": "UK Entity (other)",
                  "value": "OTHER",
                  "description": "UK Entity (other)"
              },
              {
                  "title": "Non-UK Corporation",
                  "value": "FCORP",
                  "description": "Non-UK Corporation"
              },
              {
                  "title": "Non-UK Organization (other)",
                  "value": "FOTHER",
                  "description": "Non-UK Organization"
              }
          ]
      },
      {
          "name": "uk_reg_co_no",
          "description": "Company identification number",
          "child": true,
          "required": false,
          "application": "2"
      },
      {
          "name": "registered_for",
          "description": "Company or person domain is registered for (this must be 
            accurate and CANNOT BE CHANGED)",
          "child": false,
          "required": true,
          "application": "2"
      },
      {
          "name": "uk_reg_opt_out",
          "description": "Hide registrant data in Nominet WHOIS",
          "child": false,
          "required": false,
          "application": "2",
          "options": [
              {
                  "title": "No",
                  "value": "n",
                  "description": "Do not hide the registrant contact information in Nominet's WHOIS."
              },
              {
                  "title": "Yes",
                  "value": "y",
                  "description": "Hide the registrant contact information in Nominet's 
                    WHOIS (only available to individuals)."
              }
          ]
      }
  ]
    

WHOIS Privacy Protection

WHOIS Privacy Protection replaces a domain's WHOIS data with a proxy service to protect a customer's address, phone number and email address. The service is a paid service and must be renewed on a yearly basis. The cost for 1 year is $8.00.

POST /domains/{name_or_id}/whois_privacy

Turn on WHOIS Privacy Protection. If WHOIS Privacy Protection has not yet been purchased then invoking this will purchase the service and enable it. If the privacy protection is currently disabled then it will be enabled.

Example response body:

  {
      "whois_privacy": {
          "autorenew": false,
          "created_at": "2011-07-23T20:42:48Z",
          "domain_id": 1000,
          "enabled": true,
          "expires_on": "2012-07-23",
          "id": 18,
          "updated_at": "2011-07-23T20:42:48Z"
      }
  }
    

DELETE /domains/{name_or_id}/whois_privacy

Turn off WHOIS Privacy Protection. If the privacy protection has not expired it can always be turned back on with no additional charge.

Sharing

Manage domain sharing.

GET /domains/{name_or_id}/memberships

List all of the current members for a domain. Domain members have the privilege of managing a domain's records and templates.

POST /domains/{name_or_id}/memberships

Add another DNSimple customer to a domain's memberships. You must provide an email address for the person to add. If the person already exists in DNSimple as a customer then they will immediately be added to the domain's membership list. If the person does not yet have a DNSimple account then they will receive an invitation to join via email.

The request must include the following:

  • email

Example request body:

  {
      "membership": {
          "email": "john.smith@example.com"
      }
  }
    

DELETE /domains/{name_or_id}/memberships/{email}

Remove a DNSimple customer from the membership list for a domain. The customer will no longer be able to manage the domain.

SSL Certificates

Purchase and manage SSL certificates with DNSimple.

GET /domains/{name_or_id}/certificates

Get a list of certificates purchased under the given domain.

GET /domains/{name_or_id}/certificates/{id}

Get a specific certificate purchased under the given domain.

Example response:

{
    "certificate": {
        "approver_email": null,
        "certificate_status": null,
        "configured_at": "2011-05-14T15:14:43Z",
        "contact_id": 470,
        "created_at": "2011-05-14T15:14:43Z",
        "csr": "-----BEGIN NEW CERTIFICATE REQUEST-----
        MIIC0DCCAbgCAQAwWzELMAkGA1UEBhMCVVMxFTATBgNVBAoTDEFudGhvbnkgRWRl
        bjEOMAwGA1UEBxMFTWlhbWkxCzAJBgNVBAgTAkZMMRgwFgYDVQQDEw93d3cuZXhh
        bXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtW/z7avuO
        CrvfRBYkqJt+2w8YlivjMrUTOJT2DQdqXTnOgqnOeL4+Jdey9BBaJRQS+HhPLkJN
        rBmv9uDOEzQBAfm3POP/2Cg6ZvDren+fZuziq+FRopxDiaDupnWgVxCAzxu9wzOb
        dXQW5dB0BnrtPsclYhPwgSMIhxaCbeJSIDP1WveCZzRyLIthg6ajOMsKILKJ+TQg
        K64dpV4LGU5uLUrYHCMMatQ5OZ+N1PKL3nPLSKEHtLnYxKDoX3em5tRz7pc4JsIC
        UFOIRIuQr7Gdp9sH9fHVwcvZL5q1Ykz83rWKHAhu2vBL04n3EYFLYlA9NzPO23Zj
        GkWYafsn1gu9AgMBAAGgMDAuBgkqhkiG9w0BCQ4xITAfMAwGA1UdEwEB/wQCMAAw
        DwYDVR0PAQH/BAUDAweAADANBgkqhkiG9w0BAQUFAAOCAQEAgl4cBmVFpbl1Y1iD
        H6xPeRaT60jp2pPi3pwE7jTw6oqTSqCuH9EAvG2FopUlV7Jz10I8w7Cts2fwgayr
        h6MnSTUv1Nep6pEKrQaOYbAmwioTEZaNyzRwQVy6geKcz0PZeVFHm7Hs57WTJQiR
        bpm0sc/Rhu9h19y14KRlfWUwQU8rM8biJSGJhIpJ9TqtxMcKgswYKV8L6pt4ZvKM
        /IuGxTqSv4pJagzSCbww+8uyKfscOMnEUkkFOE2/kK+Bf+EdAy2rKLJDqPRc1Yeb
        WUf0sRMLu6e50I140w2YYIyyKR10KHP6PQmr+Fz9DxEmjgAY7BWOLS3TSwqCm0Ek
        t0evlw==
        -----END NEW CERTIFICATE REQUEST-----",
        "domain_id": 1497,
        "expiration_date": null,
        "id": 1,
        "name": "www",
        "order_date": null,
        "private_key": "-----BEGIN RSA PRIVATE KEY-----
        MIIEogIBAAKCAQEArVv8+2r7jgq730QWJKibftsPGJYr4zK1EziU9g0Hal05zoKp
        zni+PiXXsvQQWiUUEvh4Ty5CTawZr/bgzhM0AQH5tzzj/9goOmbw63p/n2bs4qvh
        UaKcQ4mg7qZ1oFcQgM8bvcMzm3V0FuXQdAZ67T7HJWIT8IEjCIcWgm3iUiAz9Vr3
        gmc0ciyLYYOmozjLCiCyifk0ICuuHaVeCxlObi1K2BwjDGrUOTmfjdTyi95zy0ih
        B7S52MSg6F93pubUc+6XOCbCAlBTiESLkK+xnafbB/Xx1cHL2S+atWJM/N61ihwI
        btrwS9OJ9xGBS2JQPTczztt2YxpFmGn7J9YLvQIDAQABAoIBAADxEvq6pgsre8HG
        uOgSEmYqAnb7udlOGTW1hPmhMH0fbIT2qL16Ym4r/nP2Z3BV6zn/J4gmlC2f1bPi
        /22fJRUsUZLxPbvSDMXkcUKWM8NF59uDW4H6BCdJxBoHxXPNhUVt2pS5Trp1dN/6
        95rpvhkz0hkd40XXLb2KHlEvD5+qktOU7xg7R7aRATg6KtEpSxDqKwNy5o3+YVAe
        Z+nhYCevKboshMuJFx7OJ0zvn3gYU7/85RI9Zn4ofqUjFzZl6PPHmb6xn5v1v6+5
        t9gp19FF1MbMFpnKnsbR/2jm5xX3BVo5PofM2Xx04hThCi9pno/JApdJ95nOzmuK
        bQT9YIECgYEAzW2KugAoN0JwhlGc9pIcZ1OyM9YYAN4KHCVlaFIIfWD1PoP1uieV
        EIsGb9bworQgItXi6SwFnw+i9eRZI70Hmx+Y8SSY9IDtiI1nY5W71H9+9CJS/foc
        zDbmYclR/1e91MVwAVJDScECCuic9NUfxjaZDKChRPifKCXBG0wRGjUCgYEA2Als
        hJSsVQby00b+YuMCVp6IbyhvlGm6hKrKAQXNMhZWrHIs52qrlbuqeyfYg9IjGhSS
        +qNBRj/KzFvx8QuU55M3ydHZzz5Ah8MzwfP8gbVsdkPvnDbPvHDUkAFpewsp/4OG
        F5559iRwv/JStGgEtwnNV91JX5mmGOI7KxCynGkCgYAdlwnEgQFJ9GgA8QCLA8DT
        oVqp3MzYUyNhqoFQ5YATj0PEHX3nsovmNiBXO76tsQRwAB8PNygYIUh34sx0OWY/
        Ee4Vzg+6KFgOs0+RKKBFm5fN0qPhsYU0ZTQKIdWN0jWl0Eqx5geLOCHzME5rdcd9
        5Z9mEj0okidawRVvuSU9gQKBgDh7DkIDVKLONEIEd5GG5B+dRvI40iMtGTSCKlnm
        GGWV7YccOp0uCDoXXFTib/rWv5Kb+mlIsVIab3zKNRDeBEoe9SDwmk9SaTCVWjzE
        +yk2M2sgC879jYYowYn8tIUUwCArVK1sI1q04D1uryy3XTQ1fdgQ5JP36bLrwqhZ
        rzixAoGAbcOK7v+IUHamcWJb8kkAsrIxjAGE/CNLYiZTeSTbTegZFb9KcpNzojJT
        ClvuFGYh3Rb35NMC9XIvJbAfWBv1XB+TX+o41YcS8H3AocQtuxmxNqYzZOvUpAkM
        oWo54arDcDjcPm2TYZ0umKl/CacGYTwfUpA42BEpoxx+RcF7/XU=
        -----END RSA PRIVATE KEY-----",
        "ssl_certificate": null,
        "updated_at": "2011-05-14T15:14:43Z",
        "available_approver_emails": "res-dom@iana.org,res-dom@iana.org,admin@example.com,
        administrator@example.com,hostmaster@example.com,root@example.com,webmaster@example.com,
        postmaster@example.com,admin@www.example.com,administrator@www.example.com,
        hostmaster@www.example.com,root@www.example.com,webmaster@www.example.com,
        postmaster@www.example.com"
    }
}
  

POST /domains/{name_or_id}/certificates

Purchase a certificate. This is the first step in the process for buying a certificate. Once you have successfully purchased a certificate you will need to submit it to complete the process and receive your SSL certificate. The URL must include the domain name or ID for the domain under which the certificate is being purchased.

The following fields are required:

  • certificate[name]
  • certificate[contact_id]

The following fields are optional:

  • certificate[csr]

The name is the subdomain for the certificate. For example, if you have the domain mydomain.com and you want to register a certificate for www.mydomain.com then the name would be www. If you would like a certificate for the domain itself, such as mydomain.com, then leave name blank.

The contact_id is the ID of the contact that is responsible for the certificate. In case of wildcard domains, the contact information must match what is in the Certificate Signing Request. If you plan on submitting your own Certificate Signing Request then you must ensure these details match.

The optional csr field stands for Certificate Signing Request. If you do not want DNSimple to generate your private key then you generate your own Certificate Signing Request using a tool such as OpenSSL or GnuTLS. You must ensure that the common name in the CSR is your fully qualified domain name (for example, www.mydomain.com or *.mydomain.com).

Example request:

{
    "certificate": {
         "name": "",
         "contact_id": 1 
    }
}
  

PUT /domains/{name_or_id}/certificates/{id}/submit

Submit a purchased certificate for signing by the certificate authority. The URL must include the domain name that the certificate is under as well as the ID for the certificate previously created by purchasing it.

Email Forwarding

Set up email forwarding from your domain to another email account.

You can set up as many email forwards on a domain as you like. You will be charged $2 per month for up to 1000 messages delivered per domain. Additional charges may apply for delivery of more than 1000 messages in a month.

POST /domains/{name_or_id}/email_forwards

Set up email forwarding on a domain.

Example request:

{
    "email_forward": {
      "from": "john",
      "to": "someone@example.com"
    }
}
    

DELETE /domains/{name_or_id}/email_forwards/{id}

Remove an email forward entry.

Users

This portion of the API provides a means for provisioning users.

POST /users

Provision a new user account. If the user can be created then this method will respond with 201. If the user already exists or is invalid then this will return response code 422.

Example request:

  {
      "user": {
          "email": "john.smith@example.com",
          "password": "x8ejfhfgjQ#A",
          "password_confirmation": "x8ejfhfgjQ#A" 
      }
  }
    

Subscriptions

API for creating and managing account subscriptions.

POST /subscription

Create a subscription for the currently authenticated user.

Example request:

  {
      "subscription": {
          "plan": "Silver",
          "credit_card": {
              "number": "1",
              "first_name": "John",
              "last_name": "Smith",
              "billing_address": "111 SW 1st Street",
              "billing_zip": "12345",
              "month": "02",
              "year": "2015",
              "cvv": "111"
          }
      }
  }
    

GET /subscription

View the current subscription details.

Statements

API for listing account history as statements.

GET /statements

List all statements including the current one.