This document describes the Freenom API at a technical level. It explains the supported data formats and how to interact with the API. For each function supported by the API a description is given including an example how such a function call and response may look.
Examples are given using the command line tool 'curl'. Curl is an easy tool to access any URL and is installed on most Unix like environments.
The API delivers output in JSON format by default. If the API User prefers, output can be given in XML. The method of output is defined in the function call.
Example: Ping the service
Example: Ping the service expecting XML output. Note the .xml behind the method name.
Examples in this manual are given in XML for readability.
Interaction with the API should be trivial. The service is a RESTful-like service that interacts over HTTPS. Of all the HTTP methods available, only GET and POST are used. GET calls retrieve information and do not change anything, while POST calls are meant to change data.
POST calls are idempotent for 30 seconds. This allows a caller to resubmit a transaction having it not being executed twice.
Each function supported by the API has been documented thoroughly. Some errors can occur for a multiple of functions and are described in this chapter. This information will not be repeated in the related function description.
In case an unsupported function is called, the service will reply the following:
Most functions can only be executed by authorized users. For these functions authorization must take place. If the user is not authorized to make the call, the content returned will be:
If the function itself is supported, but data submitted is invalid or missing an error will be reported. For example:
The status field will state 'error' when an error occurred. Whenever this field is set to 'error', an element will display the error found.
The service will always reply directly when a first error is found. If there are multiple errors in the function call, only one is returned. This stops the service from doing unnecessary work, as the call will fail in any case.
A number of parameters are used in a multiple of functions. Other parameters deserve special attention. Those parameters are explained in this chapter.
domainname |
The domain name involved. The domain name should consist of only a-z and 0-9 characters and the - (dash). The dash may not be in the beginning or end of the domain name. Domain names are not case sensitive |
forward_url |
If the domain is configured for forwarding, the URL to forward traffic for the domain to is given via the forward_url. The forward_url can be any HTTP or HTTPS URL. |
nameserver |
The nameserver. A nameserver needs to be a hostname that is resolvable if it's a hostname not under the domain name specified. |
period |
The period of domain registration or renewal. Paid domains are registered in number of years. Supported periods for Paid domains: 1Y, 2Y, 3Y, 4Y, 5Y, 9Y and 10Y. Free domains are registered in number of months. Supported periods for Free domains: 1M - 12M. |
idshield |
ID Shield is a FREE privacy service that is designed to protect you. Your personal information is not exposed in the WHOIS database, while emails are automatically forwarded - after human interface detection - to the email address we have on file. The two possible values of the parameter: enabled or disabled. |
Supporting parameters are parameters that are not specific to a function call but to the API behavior.
test_mode |
When set to 1, the function is discarded after execution. Any changes done to Freenom's database are rolled back. |
method |
If caller is unable to specify the method of the function by that method, this parameter can help. Setting the method parameter to 'post' will tell the service that a POST method is meant by caller. Same counts for 'get', 'put' and 'delete'. |
Function parameters are described in a table for each function. One of the columns in this table is labeled "multiple". This indicates whether or not the parameter can be specified more than once.
An example call would look like this:
Parameters: None.
Returned propertiesProperty | Description |
result | PING REPLY |
timestamp | YYYY-MM-DD HH24:MI:SS UTC |
status | OK |
Example:
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
E-mail address used for authentication | No | No | |
password | Password used for authentication | No | No |
domaintype | The type of the domain: PAID or FREE | Yes | No |
Returned properties
Property | Description | Type |
result | DOMAIN AVAILABLE or DOMAIN NOT AVAILABLE | Both |
domain | One or multiple hashes with result of domain name search | Both |
domainname | The domain name as requested | Both |
domaintype | The domaintype of the searched domain name. | Both |
pricing | Multiple hashes of pricing info for domainname. | Paid |
currency | The currency for given prices | Paid |
period | The registration period for given price. | Paid |
partnerprice | The amount to be paid by the reseller | Paid |
retailprice | The amount to be paid by the enduser. (public price) | Paid |
status | AVAILABLE or NOT AVAILABLE | Both |
status | OK | Both |
Example: Check the availability of domain test001.tk
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
period | The period of registration. If not given it will default to 1Y for paid domains and will default to 3M for free domains | No | No |
forward_url | The URL the domain name should forward to | No* | No |
nameserver | Nameserver to use. A minimum of 2 nameservers is required | No* | Yes |
owner_id | Contact ID of domain owner | Yes** | No |
billing_id | Contact ID of billing contact | No | No |
tech_id | Contact ID of technical contact | No | No |
admin_id | Contact ID of admin contact | No | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
domaintype | The type of the domain: PAID or FREE | Yes | No |
idshield | Identity protection parameter, possible values : enabled or disabled | No** | No |
Notes:
* forward_url and nameservers are mutual exclusive. Either the forward_url OR nameservers need to be specified. It is not possible to specify both. In case the nameserver is under the same domain, a glue record must be created for this domain. This can be done by registering Nameserver records.
** In case idshield is enabled owner_id doesn't need to be specified.
Returned propertiesProperty | Description | Type |
result | DOMAIN REGISTERED or NOT AVAILABLE | Both |
domain | One or multiple hashes with result of domain name registration | Both |
currency | The currency for given prices | Paid |
domainname | The domain name as requested | Both |
domaintype | The domaintype of the checked domainname | Both |
expirationdate | The date the domain will expire in YYYYMMDD | Both |
period | The registration period of the registered domainname | Both |
partnerprice | The amount to be paid by the reseller | Paid |
retailprice | The amount to be paid by the enduser. (public price) | Paid |
owner_id | Contact ID of domain owner | Paid |
tech_id | Contact ID of technical contact | Paid |
billing_id | Contact ID of billing contact | Paid |
admin_id | Contact ID of administrative contact | Paid |
status | REGISTERED or NOT AVAILABLE | Both |
authcode | Generated authorization code | Paid |
status | OK | Both |
Example: Registering a domain for 2 years with nameservers under the domain.
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
period | The period of registration. If not given it will default to 1Y for paid domains and will default to 3M for free domains | No | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Property | Description | Type |
result | DOMAIN RENEWED or NOT AVAILABLE | Paid |
domain | One or multiplehashes with result of domain name renewal | Both |
currency | The currency for given prices | Paid |
domainname | The domain name as requested | Both |
domaintype | The domaintype of the checked domainname | Both |
expirationdate | The date the domain will expire in YYYYMMDD | Both |
period | The registration period of the registered domainname | Both |
partnerprice | The amount to be paid by the reseller | Paid |
retailprice | The amount to be paid by the enduser. (public price) | Paid |
owner_id | Contact ID of domain owner | Paid |
tech_id | Contact ID of technical contact | Paid |
billing_id | Contact ID of billing contact | Paid |
admin_id | Contact ID of administrative contact | Paid |
status | RENEWED or NOT AVAILABLE | Both |
status | OK | Both |
Example: Renewal of paid domain TEST001.TK for three years.
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Property | Description | Type |
result | DOMAIN LISTED | Both |
domain | One or multiple hashes with result of domain name search | Both |
domainname | The domain name as requested | Both |
domaintype | The domaintype of the checked domainname | Both |
expirationdate | The date the domain will expire in YYYYMMDD | Both |
authcode | The authorization code | Paid |
pricing | Multiple hashes with pricing info for domain name | Paid |
currency | The currency for given prices | Paid |
period | The registration period of the checked domainname | Paid |
partnerprice | The amount to be paid by the reseller | Paid |
retailprice | The amount to be paid by the enduser. (public price) | Paid |
status | ACTIVE or CANCELLED; Status of the domain | Both |
forward_url | The URL the domain name should forward to | Both |
nameserver | Zero or multiple hashes with nameserver info | Both |
hostname | Hostname of nameserver | Both |
ipaddress | IP address of nameserver if glue present | Both |
owner_contact | Hash containing contact data of owner | Paid |
contact_id | Contact ID of owner contact | Paid |
contact_title | Title of contact; Mr, Mrs, etc. | Paid |
contact_firstname | Firstname of contact | Paid |
contact_middlename | Middle name of owner contact | Paid |
contact_lastname | Lastname of owner contact | Paid |
contact_organization | Organization name of owner (if any) | Paid |
contact_address | Address of owner contact | Paid |
contact_city | City of owner contact | Paid |
contact_zipcode | Zipcode of owner contact | Paid |
contact_statecode | Statecode (ISO 3166-2) of owner contact | Paid |
contact_countrycode | Countrycode (ISO 3166-1) of owner contact | Paid |
contact_phone | Phone number of owner contact | Paid |
contact_fax | Fax number of owner contact | Paid |
contact_email | Email address of owner contact | Paid |
admin_contact | Hash containing contact data of admin | Paid |
contact_id | Contact ID of admin contact | Paid |
contact_title | Title of contact; Mr, Mrs, etc. | Paid |
contact_firstname | Firstname of admin contact | Paid |
contact_middlename | Middle name of admin contact | Paid |
contact_lastname | Last name of admin contact | Paid |
contact_organization | Organization name of admin (if any) | Paid |
contact_address | Address of admin contact | Paid |
contact_city | City of admin contact | Paid |
contact_zipcode | Zipcode of admin contact | Paid |
contact_statecode | Statecode (ISO 3166-2) of admin contact | Paid |
contact_countrycode | Countrycode (ISO 3166-1) of admin contact | Paid |
contact_phone | Phone number of admin contact | Paid |
contact_fax | Fax number of admin contact | Paid |
contact_email | Email address of admin contact | Paid |
tech_contact | Contact ID of tech contact | Paid |
contact_id | Contact ID of tech contact | Paid |
contact_title | Title of contact; Mr, Mrs, etc. | Paid |
contact_firstname | Firstname of tech contact | Paid |
contact_middlename | Middlename of tech contact | Paid |
contact_lastname | Lastname of tech contact | Paid |
contact_organization | Organization name of tech (if any) | Paid |
contact_address | Address of tech contact | Paid |
contact_city | City of tech contact | Paid |
contact_zipcode | Zipcode of tech contact | Paid |
contact_statecode | Statecode (ISO 3166-2) of tech contact | Paid |
contact_countrycode | Countrycode (ISO 3166-1) of tech contact | Paid |
contact_phone | Phone number of tech contact | Paid |
contact_fax | Fax number of tech contact | Paid |
contact_email | Email address of tech contact | Paid |
billing_contact | Hash containing contact data of billing contact | Paid |
contact_id | Contact ID of billing contact | Paid |
contact_title | Title of contact; Mr, Mrs, etc. | Paid |
contact_firstname | Firstname of billing contact | Paid |
contact_middlename | Middlename of billing contact | Paid |
contact_lastname | Lastname of billing contact | Paid |
contact_organization | Organization name of billing (if any) | Paid |
contact_address | Address of billing contact | Paid |
contact_city | City of billing contact | Paid |
contact_zipcode | Zipcode of billing contact | Paid |
contact_statecode | Statecode (ISO 3166-2) of billing contact | Paid |
contact_countrycode | Countrycode (ISO 3166-1) of billing contact | Paid |
contact_phone | Phone number of billing contact | Paid |
contact_fax | Fax number of billing contact | Paid |
contact_email | Email address of billing contact | Paid |
status | OK | Both |
Example: Customer retrieves info on domain TEST002.TK.
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
forward_url | The URL the domain name should forward to | No* | No |
nameserver | Nameserver to use. Minimally 2 are needed | No* | Yes |
owner_id | Contact ID of domain owner | No | No |
admin_id | Contact ID of administrative contact | No | No |
tech_id | Contact ID of technical contact | No | No |
billing_id | Contact ID of billing contact | No | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
idshield | Identity protection parameter, possible values : enabled or disabled | No | No |
Notes: * forward_url and nameservers are mutual exclusive. Either the forward_url OR nameservers need to be specified. It is not possible to specify both. In case the nameserver is under the same domain, a glue record must be created for this domain. This can be done by registering Nameserver records.
Returned properties
Property | Description | Type |
domain | One or multiple hashes with result of domain name modification | All |
domainname | The requested domain name | All |
status | MODIFIED | All |
result | DOMAIN MODIFIED | All |
status | OK | All |
Example: Modify domain TEST002.TK, having it forward to http://www.freedomregistry.com/
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
domain | One or multiple hashes with result of domain deletion | All |
domainname | Domain name that was deleted | All |
status | DELETED | All |
result | DOMAIN DELETED | All |
status | OK | All |
Example: Delete TEST002.TK
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
domain | One or multiple hashes with result of domain restore | All |
domainname | Domain name that was restored | All |
result | DOMAIN RESTORED | All |
status | RESTORED | All |
status | OK | All |
Example:
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
owner_id | Contact ID of owner contact | No** | No |
billing_id | Contact ID of billing contact | No | No |
admin_id | Contact ID of admin contact | No | No |
tech_id | Contact ID of technical contact | No | No |
idshield | Identity protection parameter, possible values : enabled or disabled | No** | No |
period | Number of years to add to domain expiration, after the domain has been upgraded. | Yes | Yes |
Notes: ** In case idshield is enabled owner_id doesn't need to be specified.
Returned propertiesProperty | Description | Type |
domain | One or multiple hashes with result of domain upgrade | All |
domainname | Domain name that was upgraded | All |
result | DOMAIN UPGRADED | All |
status | UPGRADED | All |
status | OK | All |
Example: Upgrade a free domain to paid domain
Parameter | Description | Required | Multiple |
pagenr | Page number of results. Defaults to 1 | No | No |
results_per_page | Number of results per page. Defaults to 25 | No | No |
E-mail address used for authentication | No | No | |
password | Password used for authentication | No | No |
Returned properties
Property | Description | Type |
domain | One or multiple hashes with result of domain deletion | Both |
domainname | The name of the domain | Both |
domaintype | Type of the domain | Both |
registrationdate | The date the domain was registered in YYYYMMDD | Both |
expirationdate | The date the domain will expire in YYYYMMDD | Both |
status | ACTIVE or CANCELLED; Status of the domain | Both |
authcode | The authorization code | Paid |
result | <nr> DOMAINS FOUND | Both |
Example:
Parameter | Description | Required | Multiple |
domainname | Domain name of glue record | Yes | No |
hostname | Domain name of glue record | Yes | No |
ipaddress | Value of DNS record | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | NAMESERVER REGISTERED or NAMESERVER UPDATED | All |
nameserver | One or multiple hashes with result of nameserver registration | All |
domainname | Domain name of zone to add DNS record | All |
hostname | The hostname of the glue record | All |
ipaddress | The IP address of the glue record | All |
status | REGISTERED or UPDATED | All |
status | OK | All |
Example: Register a nameserver glue for TEST002.TK
Parameter | Description | Required | Multiple |
domainname | Domain name of glue record | Yes | No |
hostname | The hostname to delete | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | NAMESERVER DELETED | All |
nameserver | One or multiple hashes with result of nameserver delete | All |
domainname | Domain name of zone | All |
hostname | The nameserver that was deleted | All |
status | DELETED | All |
status | OK | All |
Example: Register a nameserver glue for TEST002.TK
Parameter | Description | Required | Multiple |
domainname | The domain name to list nameserver glue for | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | All | |
nameserver | Name for DNS record | All |
domainname | The requested domain name | All |
hostname | Value for DNS record | All |
ipaddress | IP addres linked to the nameserver host | All |
status | OK | All |
Example: Requesting the DNS names registered under TEST002.TK
Parameter | Description | Required | Multiple |
contact_organization | Organization name of contact | No | No |
contact_title | Title of the contact | No | No |
contact_firstname | First name of contact | Yes | No |
contact_middlename | Middle name of contact | No | No |
contact_lastname | Last name of contact | Yes | No |
contact_address | Address of the contact | Yes | No |
contact_city | City of the contact | Yes | No |
contact_zipcode | Zipcode of the contact | Yes | No |
contact_statecode | ISO-3166 code for state | Yes | No |
contact_countrycode | ISO-3166 code for country | Yes | No |
contact_phone | Phone number of contact (international format) | Yes | No |
contact_fax | Fax number of contact (international format) | No | No |
contact_email | Email address of contact | Yes | No |
contact_id | ID of existing contact | No | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | CONTACT REGISTERED / CONTACT UPDATED | Paid |
contact | One or multiple hashes with contacts affected | Paid |
contact_id | ID of the registered or updated contact | Paid |
status | REGISTERED / UPDATED | Paid |
status | OK | Paid |
Example: Register Contact
Parameter | Description | Required | Multiple |
contact_id | ID of contact | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | CONTACT DELETED | Paid |
contact | One or multiple hashes with contacts affected | Paid |
contact_id | ID of the deleted | Paid |
status | DELETED | Paid |
status | OK | Paid |
Example: Delete Contact
Parameter | Description | Required | Multiple |
contact_id | One or more contact id to get info on | Yes | Yes |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | CONTACTS LISTED | Paid |
contact | Array of one or multiple contacts | Paid |
contact_id | ID of contact | Paid |
contact_title | Title of the contact | Paid |
contact_firstname | First name of contact | Paid |
contact_middlename | Middle name of contact | Paid |
contact_lastname | Last name of contact | Paid |
contact_organization | Organization name of contact | Paid |
contact_address | Address of the contact | Paid |
contact_city | City of the contact | Paid |
contact_zipcode | Zipcode of the contact | Paid |
contact_statecode | Country of contact | Paid |
contact_countrycode | State of contact | Paid |
contact_phone | Phone number of contact (international format) | Paid |
contact_fax | Fax number of contact (international format) | Paid |
contact_email | Email address of contact | Paid |
contact_domain | Array of one or multiple domains contact is linked to | Paid |
domainname | Name of domain contact is linked to | Paid |
type | Contact type (owner, tech, admin or billing) | Paid |
status | OK | Paid |
Example: Get info on one contact_id
Parameter | Description | Required | Multiple |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | CONTACTS LISTED | Paid |
contact | Array of one or multiple contacts | Paid |
contact_id | ID of contact | Paid |
contact_title | Title of the contact | Paid |
contact_firstname | First name of contact | Paid |
contact_middlename | Middle name of contact | Paid |
contact_lastname | Last name of contact | Paid |
contact_organization | Organization name of contact | Paid |
contact_address | Address of the contact | Paid |
contact_city | City of the contact | Paid |
contact_zipcode | Zipcode of the contact | Paid |
contact_statecode | Country of contact | Paid |
contact_countrycode | State of contact | Paid |
contact_phone | Phone number of contact (international format) | Paid |
contact_fax | Fax number of contact (international format) | Paid |
contact_email | Email address of contact | Paid |
contact_domain | Array of one or multiple domains contact is linked to | Paid |
domainname | Name of domain contact is linked to | Paid |
type | Contact type (owner, tech, admin or billing) | Paid |
status | OK | Paid |
Example: List Contacts.
Parameter | Description | Required | Multiple |
domainname | The domainname | Yes | No |
authcode | The authorization code | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
transfer | Array of one or multiple transfers | Paid |
domainname | Domain name updated | Paid |
domaintype | Type of the domain | Paid |
period | Length of renewal after transfer; always 1Y | Paid |
currency | The currency for given prices | Paid |
retailprice | Price for registrant | Paid |
partnerprice | Price for partner | Paid |
result | PRICES PROVIDED | Paid |
status | OK | Paid |
Example: Request transferprice for TEST002.TK
Parameter | Description | Required | Multiple |
domainname | The name of the domain | Yes | No |
authcode | The authorization code | Yes | No |
period | Number of years to renew the domain. Defaults to 1Y | Yes | No |
owner_id | contact_id of new owner | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | TRANSFER REQUESTED | Paid |
transfer | Array of one or more transfers | Paid |
domainname | Domain name updated | Paid |
status | REQUESTED | Paid |
status | OK | Paid |
Example: Transfer domain TEST002.TK to our account
Parameter | Description | Required | Multiple |
domainname | The domainname | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | TRANSFER APPROVED | Paid |
transfer | Array of one or more transfers | Paid |
domainname | Domain name updated | Paid |
status | APPROVED | Paid |
status | OK | Paid |
Example: Approce transfer of domainTEST002.TK from our account.
Parameter | Description | Required | Multiple |
domainname | The domain name | Yes | No |
reason | Reason of declining the transfer | Yes | No |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | TRANSFER DECLINED | Paid |
transfer | Array of one or more transfers | Paid |
domainname | Domain name updated | Paid |
status | DECLINED | Paid |
status | OK | Paid |
Example: Decline a domain transfer of TEST002.TK from our account.
Parameter | Description | Required | Multiple |
E-mail address used for authentication | Yes | No | |
password | Password used for authentication | Yes | No |
Returned properties
Property | Description | Type |
result | Paid | |
transfer | Zero, one or multiple entries containing information about the domain transfer | Paid |
domainname | The name of the domain | Paid |
transfertype | Incoming or outgoing | Paid |
status | Status of the transfer. PENDING, APPROVED, DECLINED | Paid |
newregistrar | In case of outgoing transfer, name of new registrar | Paid |
lastupdate | Date of last update | Paid |
Example: Retrieve a list of domain transfers