Login to My Dot TK
Dot TK

Renaming The Internet

header

Dot TK API Program

Dot TK API Program / API Documentation

The Dot TK API lets you embed the Dot TK Free Domain Name registration process within your computer or online application. To use the API, you need to register for a Dot TK account or use your existing Dot TK account from My Dot TK.

Your API application needs to be reviewed and will be approved or declined within 24 hours.

After you submit your application, you can retrieve your API Token from My Dot TK immediately. You need the API Token to register free domain names under your account, using the API. Please note that actual free domain name registrations are not possible until your application is reviewed and approved. However, you are able to use the Dot TK API in test mode.

API Request URL

The API is accessible through https://secure.dot.tk/api/freedomain

API Request Parameters

The following parameters should be passed to the API by POST or GET method.

ParameterTypeOptional/
Mandatory
Remarks
commandStringMandatoryCurrently only 'ADD'
registrantnrNumberMandatoryThe registrant number. This identifies you as the registrant. This number is available in My Dot TK directly after you signed up for your Dot TK API account.
tokenStringMandatoryAn 18 character Application Token, which includes alphanumeric and numeric characters, both uppercase and lowercase. This Application Token is available in My Dot TK directly after you signed up for your Dot TK API account.
domainnameStringMandatoryMaximum of 63 characters, all uppercase, only [A-Z], [0-9] and the dash (-) are allowed. It should always include the .TK extension.
urlStringMandatoryFull URL to rename. Maximum of 300 characters, should always include http:// or https://
outputStringOptional'XML' or 'TEXT'. If not specified, TEXT will be used.
testNumberOptional1 or not defined.

API call result codes

A call to any function of the API will return two parameters. The first parameter is result code. This is a number indicating whether or not the call was successful. Its value will be 1 on success, 0 on failure. The second parameter, result, will give a descriptive message.

The following table shows possible replies.

Result codeResultRemarks
1APPROVED Domain name was successfully registered with the registry.
0DECLINED, UNKNOWN USER Registrant number invalid, token invalid or combination invalid.
0DECLINED, NO ACCESS Status of API user is not authorized.
0DECLINED, DOMAIN ALREADY REGISTERED Domain name is already registered.
0DECLINED, DOMAIN CANNOT BE REGISTEREDDomain name is trademark or special domain name and may not be registered for free.
0ERROR, COMMAND NOT SUPPORTEDThe specified command parameter is not supported.
0ERROR, INVALID DOMAINDomain name specified invalid.
0ERROR, INVALID URLURL specified invalid or not accessible.
0ERROR, MISSING PARAMOne or more parameters are missing.
0ERROR, OTHERAny other type of error has occurred.

Output format

The output can be presented in two ways: TEXT or XML. By default the output will be 'TEXT'. With the request it is possible to specify the requested format.

When output is set to TEXT, the output will have the following format: RESULTCODE::RESULT

When output is set to XML, the output will have the following format:

Additional notes

After you have finished integrating the API, please test it before going live! You can test the Dot TK API with the test parameter. If you set this parameter to 1, your call will perform all checks but will not register a free domain.

Example scripts can be found below. If you cannot find the implementation you require, please refer to the Dot TK API Forum for more information.