Change Log

Version 1.10
Version 1.9
Version 1.8
Version 1.7
Version 1.6
  • Updated authentication method to HTTP HMAC - details

  • Added API webhook support for API messages - details

  • Deprecated all previous API versions - view deprecations

Version 1.5
Version 1.4
Version 1.3
Version 1.2
  • Changed datetime format to ISO-8601 compatible format (1970-01-01T01:00:00+01:00)

  • Added message queue support

  • Added SMD support for sunrise domain applications

  • Added support for fetching and using claim notifications

Deprecations

Table 1. Parameters
Date Notice

2018-07-25

All API versions below 1.6 will no longer be supported after 2019-01-31

Introduction

The Lexsynergy API is a REST-ful API over HTTPS for managing your Lexsynergy API-enabled portfolio.

This book covers version 1.10 of the API

Warning
You are strongly advised to test your implementation of the API via the OT&E platform before moving to production. Please contact your account manager for access to the OT&E API and connection details.

Basics

  1. URLs should be in the follow format https://{hostname}/{api version}/{resource}.json

  2. The Content-Type MUST be set to application/json

  3. All requests MUST be signed using HTTP HMAC authentication

  4. All GET methods also support the POST method for client compatibility reasons

Authentication

Authorisation is done via the HTTP "Authorization" header.

Note
Make sure your server’s clock is synchronised with an NTP server. Requests are only valid for +/- 10 seconds based on the timestamp in the authorisation header
Note
Your NONCE can be reused after 60 seconds from the time of the initial request. This will still prevent replay attacks based on the above time based restriction.
Authorization = "lexsynergy-http-hmac" + " " +
                "realm=" + URLEncode( Realm ) + "&" +
                "key=" + URLEncode( Api_Key ) + "&" +
                "nonce=" + URLEncode( Nonce ) + "&" +
                "timestamp=" + URLEncode( Unix_Timestamp ) + "&" +
                "signature=" + URLEncode( HMAC_Signature )

Realm = "api"

Nonce = RFC4122_UUID()

HMAC_Signature = Base64( HMACSHA256 ( Secret_Key, String_To_Sign ) )

String_To_Sign = Realm + "\n" +
   Api_Key + "\n" +
   Nonce + "\n" +
   Unix_Timestamp + "\n" +
   Upper_Case(HTTP_Method) + "\n" +
   URL + "\n" +
   Request_Body + "\n"

PHP Example

<?php

class RequestSigner
{
    public function __construct(
        private string $apiKey,
        private string $apiSecret,
        private string $realm = 'api',
    ) {}

    public function getAuthorisationHeader(string $method, string $url, string $body): string
    {
        $timestamp = time();
        $nonce = uuid_create(UUID_TYPE_RANDOM);

        $signature =
            $this->realm . "\n" .
            $this->apiKey . "\n" .
            $nonce . "\n" .
            $timestamp . "\n" .
            strtoupper($method) . "\n" .
            $url . "\n" .
            $body . "\n";

        return 'lexsynergy-http-hmac ' . http_build_query(
                [
                    'realm' => $this->realm,
                    'key' => $this->apiKey,
                    'nonce' => $nonce,
                    'timestamp' => $timestamp,
                    'signature' => base64_encode(hash_hmac('sha256', $signature, $this->apiSecret, true)),
                ]
            );
    }
}

$apiKey = '';
$apiSecret = '';

$method = 'GET';
$url = 'https://api.lexsynergy.com/1.10/domains/info.json';
$body = '{"name": "domain.tld"}';

$requestSigner = new RequestSigner($apiKey, $apiSecret);

printf("Authorization: %s\n", $requestSigner->getAuthorisationHeader($method, $url, $body));

JavaScript Example

const apiKey = '';
const apiSecret = '';
const realm = 'api';

const uuid = require('uuid');
const crypto = require('crypto-js');
const querystring = require('querystring');

function getAuthorisationHeader(method, url, body)
{
    const nonce = uuid.v4();
    const timestamp = Math.floor(Date.now() / 1000);

    let signature =
        realm + '\n' +
        apiKey + '\n' +
        nonce + '\n' +
        timestamp + '\n' +
        method.toUpperCase() + '\n' +
        url + '\n' +
        body + '\n';

    signature = crypto.enc.Base64.stringify(crypto.HmacSHA256(signature, apiSecret));

    return 'lexsynergy-http-hmac ' + querystring.stringify(
        {
            realm: realm,
            key: apiKey,
            nonce: nonce,
            timestamp: timestamp,
            signature: signature,
        }
    );
}

const method = 'GET';
const url = 'https://api.lexsynergy.com/1.10/domains/info.json';
const body = '{"name": "domain.tld"}';

console.log('Authorization: ' + getAuthorisationHeader(method, url, body));

Python Example

import base64
import hmac
import sys
import time
import urllib.parse
import uuid


class RequestSigner:
    def __init__(self, api_key: str, api_secret: str, realm: str = 'api') -> None:
       self._api_key = api_key
       self._api_secret = api_secret
       self._realm = realm

    def authorisation_header(self, method: str, url: str, body: str) -> str:
        timestamp: int = int(time.time())
        nonce: str = str(uuid.uuid4())

        signature: str = f'{self._realm}\n{self._api_key}\n{nonce}\n{timestamp}\n{method.upper()}\n{url}\n{body}\n'
        signature = base64.b64encode(
            hmac.digest(self._api_secret.encode('utf-8'), signature.encode('utf-8'), 'sha256')
        ).decode('utf-8')

        return 'lexsynergy-http-hmac ' + urllib.parse.urlencode({
            'realm': self._realm,
            'key': self._api_key,
            'nonce': nonce,
            'timestamp': timestamp,
            'signature': signature
        })

if __name__ == '__main__':
    api_key: str = ''
    api_secret: str = ''

    method: str = 'GET'
    url: str = 'https://api.lexsynergy.com/1.10/domains/info.json'
    body: str = '{"name": "domain.tld"}'

    request_signer: RequestSigner = RequestSigner(api_key, api_secret)

    sys.stdout.writelines([f'Authorization: {request_signer.authorisation_header(method, url, body)}', '\n'])

Responses

The following response headers will be included if your authorisation header is valid.

X-Signature-Timestamp: Unix_Timestamp
X-Signature: Base64( HMACSHA256 ( Secret_Key, X-Signature-Timestamp + "\n" + HTTP_Status_Code + "\n" + Response_Body ) )

Example Request

For example to get the domain list the request would be:

curl -XGET -H "Content-Type: application/json" \
https://hostname/{api-version}/domains.json \
-d '{
        "limit": 50,
        "page": 10
}'

However throughout this book we will use the follow formats for resource, request, and response:

Resource
GET /domains.json
Request
{
    "limit": 50,
    "page": 10
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "83240286-f065-4b38-afe0-e3ec1352b16a",
    "data": {
        "limit": 50,
        "page": 10,
        "count": 46,
        "domains": []
    }
}

TLDs

Get a list of available TLDs

Resource
GET /tlds.json
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "bd53a649-d3bb-407c-8a49-20ee3ab6d25c",
    "data": {
        "tlds": [
            "com",
            "net"
        ]
    }
}
Note
This list has been truncated for this book however this will return a long list of TLDs in OT&E and production.

Get a list of TLD prices

Resource
GET /tlds/prices.json
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "def344da-e012-48c4-9600-c88e1d47cb11",
    "data": {
        "currency": "GBP",
        "prices": {
            "com": {
                "registration": "16.20",
                "sunrise": "0.00",
                "landrush": "0.00",
                "renewal": "16.20",
                "restore": "69.00",
                "transfer": "16.20",
                "backorder": "69.00",
                "registrant_change": "0.00",
                "nameserver_change": "0.00",
                "local_presence": "0.00",
                "registration_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
                "renewal_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
                "transfer_requires_auth_code": true
            },
            "net": {
                "registration": "16.20",
                "sunrise": "0.00",
                "landrush": "0.00",
                "renewal": "16.20",
                "restore": "69.00",
                "transfer": "16.20",
                "backorder": "69.00",
                "registrant_change": "0.00",
                "nameserver_change": "0.00",
                "local_presence": "0.00",
                "registration_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
                "renewal_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
                "transfer_requires_auth_code": true
            }
        }
    }
}
Note
This list has been truncated for this book however this will return a long list of TLDs in OT&E and production.

Get TLD info

Table 2. Parameters
Parameter Type Required Description

name

string

yes

TLD name

Resource
GET /tlds/info.json
Request
{
    "name": "net"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "45f78120-af73-470f-8c1d-38eddb02c4dd",
    "data": {
        "registration": "16.20",
        "sunrise": "0.00",
        "landrush": "0.00",
        "renewal": "16.20",
        "restore": "69.00",
        "transfer": "16.20",
        "backorder": "69.00",
        "registrant_change": "0.00",
        "nameserver_change": "0.00",
        "local_presence": "0.00",
        "registration_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
        "renewal_years": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
        "transfer_requires_auth_code": true,
        "country": "",
        "region": "",
        "requires_local_presence": [],
        "local_presence_type": false,
        "supports_transfer_lock": true,
        "categories": ["gTLD"]
    }
}

Account

Get account balance

This command fetches your real-time balance information

Resource
GET /account/balance.json
Response
{
    "code":200,
    "message":"Command completed successfully",
    "command-id":"e35fdf34-6d12-4132-99fd-479ad95e6cf2",
    "data":{
        "currency":"GBP",
        "balance":54.61,
        "unpaid":712.8,
        "credit_limit":10000,
        "available_funds":9341.81
    }
}

Folders

List folders

Note
If the user is restricted to a subset of folders only these will be returned.
Table 3. Parameters
Parameter Type Required Description

limit

integer

no

Maximum number of records to return, default and maximum value is 1,000

page

integer

no

Page number to return

Resource
GET /account/folders.json
Request
{
    "limit": 5,
    "page": 2
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "50bd98ce-1887-4db5-8bcd-435601d92955",
    "data": {
        "limit": 5,
        "page": 2,
        "count": 16,
        "folders": [
            "Folder A",
            "Folder B",
            "Folder C",
            "Folder D",
            "Folder E"
        ]
    }
}

Create folder

Note
If the user is restricted to a subset of folders they will not be able to use this command.
Table 4. Parameters
Parameter Type Required Description

name

string

yes

The new folder’s name

Resource
POST /account/folders/create.json
Request
{
    "name": "My New Folder"
}
Response
{
    "code": 200,
    "message": "Folder created",
    "command-id": "05c97d27-c51b-456e-8ced-46e15734385a",
    "data": {
        "folder": "My New Folder"
    }
}

Update folder

Note
If the user is restricted to a subset of folders they will not be able to use this command.
Table 5. Parameters
Parameter Type Required Description

current

string

yes

The current folder’s name

name

string

yes

The folder’s new name

Resource
PUT /account/folders/create.json
Request
{
    "current": "My New Folder",
    "name": "My Updated Folder"
}
Response
{
    "code": 200,
    "message": "Folder updated",
    "command-id": "7e88e409-725a-44a2-bd34-50ca677c8dce",
    "data": {
        "folder": "My Updated Folder"
    }
}

Delete folder

Note
If the user is restricted to a subset of folders they will not be able to use this command.
Table 6. Parameters
password string yes Your API password

name

string

yes

The current folder’s name

Resource
DELETE /account/folders/delete.json
Request
{
    "name": "My Updated Folder"
}
Response
{
    "code": 200,
    "message": "Folder deleted",
    "command-id": "d1766ea7-ea67-4410-93e2-4332b6bebff5",
    "data": {
        "folder": "My Updated Folder"
    }
}

Handles

List handles

Table 7. Parameters
Parameter Type Required Description

limit

integer

no

Maximum number of records to return, default and maximum value is 1,000

page

integer

no

Page number to return

Resource
GET /handles.json
Request
{
    "limit": 5,
    "page": 2
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "490357db-abf0-4d3b-b2b0-fb4ab7da0c49",
    "data": {
        "limit": 5,
        "page": 2,
        "count": 69,
        "handles": [
            "Domain Name Department A",
            "Domain Name Department B",
            "Domain Name Department C",
            "Domain Name Department D",
            "Domain Name Department E"
        ]
    }
}

Get a handle

Table 8. Parameters
Parameter Type Required Description

name

string

yes

The name of the handle you wish to retrieve

Resource
GET /handles/info.json
Request
{
    "name": "Lexsynergy Limited"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "9da00cdd-9376-4bbe-8375-37a5540e042d",
    "data": {
        "name": "Lexsynergy Limited",
        "first_name": "Domain Name",
        "middle_name": "",
        "last_name": "Department",
        "company": "Lexsynergy Limited",
        "company_number": "",
        "address_line_1": "130 Hampstead House",
        "address_line_2": "176 Finchley Road",
        "city": "London",
        "county": "London",
        "postcode": "NW3 6BT",
        "telephone": "+44.2081331319",
        "fax": "+43.15120587",
        "email": "domains@lexsynergy.com",
        "disclose_on_whois": true,
        "country": "GB",
        "folder": null
    }
}

Create a handle

Table 9. Parameters
Parameter Type Required Description

name

string

yes

Handle name

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

folder

string

no

disclose_on_whois

boolean

no

Only allowed when the handle is not a company

Note
If disclose_on_whois is set to false then this handle will not qualify for use as a local presence handle
Resource
POST /handles/create.json
Request
{
    "name": "Domain Name Department Z",
    "first_name": "Domain Name",
    "last_name": "Department",
    "company": "Lexsynergy Limited",
    "company_number": "",
    "address_line_1": "130 Hampstead House",
    "address_line_2": "176 Finchley Road",
    "city": "London",
    "county": "London",
    "postcode": "NW3 6BT",
    "telephone": "+44.2081331319",
    "fax": "+43.15120587",
    "email": "domains@lexsynergy.com",
    "country": "GB"
}
Response
{
    "code": 200,
    "message": "Handle created",
    "command-id": "55590fdb-e4cd-406c-8b1e-495ba45e5d15",
    "data": {
        "handle": "Domain Name Department Z"
    }
}

Update a handle

Table 10. Parameters
Parameter Type Required Description

current

string

yes

Current handle name

name

string

no

New handle name, handle must not already exist

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

folder

string

no

Set to empty string to remove from a folder

disclose_on_whois

boolean

no

Only allowed when the handle is not a company, defaults to false for non companies

Note
If disclose_on_whois is set to false then this handle will not qualify for use as a local presence handle
Resource
PUT /handles/create.json
Request
{
    "current": "Domain Name Department Z",
    "name": "Domain Name Department Z (updated)",
    "first_name": "Domain Name",
    "last_name": "Department",
    "company": "Lexsynergy Limited",
    "company_number": "",
    "address_line_1": "130 Hampstead House",
    "address_line_2": "176 Finchley Road",
    "city": "London",
    "county": "London",
    "postcode": "NW3 6BT",
    "telephone": "+44.2081331319",
    "fax": "+43.15120587",
    "email": "domains@lexsynergy.com",
    "country": "GB"
}
Response
{
    "code": 200,
    "message": "Handle updated",
    "command-id": "d474111b-aa11-43fc-9a39-62fbbfce98aa",
    "data": {
        "handle": "Domain Name Department Z (updated)"
    }
}

Delete a handle

Table 11. Parameters
Parameter Type Required Description

name

string

yes

Current handle name

Resource
DELETE /handles/delete.json
Request
{
    "name": "Domain Name Department Z (updated)"
}
Response
{
    "code": 200,
    "message": "Handle deleted",
    "command-id": "26d63d50-e7fd-4218-90cf-9fcda8a8253a",
    "data": {
        "handle": "Domain Name Department Z (updated)"
    }
}

Domains

List of domains

Table 12. Parameters
Parameter Type Required Descriptiond

limit

integer

no

Maximum number of records to return, default and maximum value is 1,000

page

integer

no

Page number to return

folder

string

no

Filter list by folder, set to empty string to list domains without a folder

Resource
GET /domains.json
Request
{
    "limit": 2,
    "page": 10
}
Note
If the domain has no expiration date yet, for example: if it is pending create, then the expires_at field will be null
Note
If local presence is being used on a handle it will return null instead of the handle’s name
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "c6543ea0-4d48-11ec-8bab-f23c921cb2d2",
    "data": {
        "limit": 2,
        "page": 10,
        "count": 500,
        "domains": [
            {
                "name": "domain01.capetown",
                "status": "Pending Landrush Registration",
                "expires_at": null,
                "registered_at": null,
                "registrant_handle": "Lexsynergy Limited",
                "admin_handle": "Lexsynergy Limited",
                "tech_handle": "Lexsynergy Limited",
                "folder": "Domain names",
                "tags": [],
            },
            {
                "name": "domain02.com",
                "status": "Registered",
                "expires_at": "2022-05-03T13:59:35+00:00",
                "registered_at": "2005-05-03T13:59:35+00:00",
                "registrant_handle": "Lexsynergy Limited",
                "admin_handle": "Lexsynergy Limited",
                "tech_handle": "Lexsynergy Limited",
                "pending_registrant_handle": "New Registrant",
                "folder": null,
                "tags": [
                    "Development"
                ]
            }
        ]
    }
}

Get domain info

Table 13. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to retrieve

deep

boolean

no

If deep is true you get full handle info embedded in the response otherwise just handle names

Basic / shallow request

Resource
GET /domains/info.json
Request
{
    "name": "domain01.com"
}
Note
Where a domain does not support transfer locks "transfer_lock" will be set to null instead of a boolean
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "8f0dd7da-4d48-11ec-afb8-f23c921cb2d2",
    "data": {
        "name": "domain01.com",
        "status": "Registered",
        "registered_at": "2005-05-03T13:59:35+00:00",
        "expires_at": "2022-05-03T13:59:35+00:00",
        "use_whois_privacy": false,
        "auto_renew_mode": "Auto Renew",
        "use_lexsynergy_ns": true,
        "allow_transfer": false,
        "suspended": false,
        "transfer_lock": true,
        "registrant_handle": "Lexsynergy Limited",
        "registrant_handle_use_local_presence": false,
        "admin_handle": "Lexsynergy Limited",
        "admin_handle_use_local_presence": false,
        "tech_handle": "Lexsynergy Limited",
        "tech_handle_use_local_presence": false,
        "pending_registrant_handle": "New Registrant",
        "nameservers": [
            {
                "name": "ns1.lexsynergy.net"
            },
            {
                "name": "ns2.lexsynergy.us"
            },
            {
                "name": "ns3.lexsynergy.info"
            }
        ],
        "folder": "My Folder",
        "tags": [
            "Development"
        ]
    }
}

Deep request

Resource
GET /domains/info.json
Request
{
    "name": "domain02.com",
    "deep": true
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "f5865ed6-7e00-45ae-b2ba-f5739570aad4",
    "data": {
        "name": "domain02.com",
        "status": "Registered",
        "registered_at": "2005-05-03T13:59:35+00:00",
        "expires_at": "2022-05-03T13:59:35+00:00",
        "use_whois_privacy": false,
        "auto_renew_mode": "Auto Renew",
        "use_lexsynergy_ns": true,
        "allow_transfer": false,
        "suspended": false,
        "transfer_lock": true,
        "renewable": true,
        "addons": [
            {
                "service": "Anycast DNS",
                "expires_at": "2022-05-03T13:59:35+00:00"
            }
        ],
        "registrant_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "admin_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "tech_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "nameservers": [
            {
                "name": "ns1.lexsynergy.net"
            },
            {
                "name": "ns2.lexsynergy.us"
            },
            {
                "name": "ns3.lexsynergy.info"
            }
        ],
        "folder": "My Folder",
        "tags": [
            "Development"
        ]
    }
}

Get domain auth code

Note
Auth codes expire after a period of time, please consult the expires_at value return to see when your auth code will expire
Table 14. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to retrieve an auth code for

Resource
GET /domains/auth-code.json
Request
{
    "name": "domain01.com"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "2a16cb9d-2d96-44e5-a3f5-f0f8216663b2",
    "data": {
        "name": "domain01.com",
        "auth_code": "P8|]!EJ~ug99Yxv9",
        "expires_at": "2014-11-24T13:12:49+00:00"
    }
}

Update a domain

Table 19. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to update

folder

string

no

Set to empty string to remove from a folder

auto_renew_mode

string

no

Should be either "Do Not Renew", "Renew Once" or "Auto Renew"

use_whois_privacy

boolean

no

Use whois privacy service

allow_transfer

boolean

no

Allow transfer out of domain and auto accept where possible

transfer_lock

boolean

no

Set transfer lock

use_lexsynergy_ns

boolean

no

Use Lexsynergy’s nameservers

tags

array

no

An array of tags to set on the domain, any tags not present here will be removed from the domain

nameservers

object

no

A collection/array of nameserver objects

Table 15. Nameserver collection
Parameter Type Required Description

name

string

yes

ips

array

no

Array of IPv4 and IPv6 addresses

registrant_handle_use_local_presence

boolean

no

Use local presence for registrant handle

registrant_handle

string|object

no

Either a handle name or object

Table 16. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

admin_handle_use_local_presence

boolean

no

Use local presence for admin handle

admin_handle

string|object

no

Either a handle name or object

Table 17. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

tech_handle_use_local_presence

boolean

no

Use local presence for tech handle

tech_handle

string|object

no

Either a handle name or object

Table 18. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

Resource
PUT /domains/update.json
Request
{
    "name": "domain01.com",
    "folder": "API Domains",
    "registrant_handle": "API-4WCWEVYOK-17C640-0",
    "tech_handle": {
        "first_name": "Domain Name",
        "last_name": "Department",
        "company": "Lexsynergy Limited",
        "address_line_1": "130 Hampstead House",
        "address_line_2": "176 Finchley Road",
        "city": "London",
        "county": "London",
        "postcode": "NW3 6BT",
        "telephone": "+44.2081331319",
        "fax": "+43.15120587",
        "email": "domains@lexsynergy.com",
        "country": "GB"
    }
}
Response
{
    "code": 200,
    "message": "Domain updated",
    "command-id": "ee10344e-b5f2-4dba-a187-2efe07534c56",
    "data": {
        "name": "domain01.com"
    }
}

Renew a domain

Table 20. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to renew

years

integer

yes

Number of years to renew the domain for

expires_at

date

yes

The current expiration date, this prevents accidental duplicate renewals

Resource
PUT /domains/renew.json
Request
{
    "name": "domain01.com",
    "years": 2,
    "expires_at": "2015-05-03"
}
Response
{
    "code": 200,
    "message": "Domain renewed",
    "command-id": "3998be12-36d2-4e3a-85a3-90ac61e06b26",
    "data": {
        "name": "domain01.com",
        "expires_at": "2017-05-03T14:59:31+00:00"
    }
}

Renew domains in bulk

Table 21. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to renew

years

integer

yes

Number of years to renew the domain for

expires_at

date

yes

The current expiration date, this prevents accidental duplicate renewals

Resource
PUT /domains/renew.json
Request
{
    "domains": [
        {
            "name": "domain01.com",
            "years": 1,
            "expires_at": "2017-05-03"
        },
        {
            "name": "domain01.net",
            "years": 5,
            "expires_at": "2015-05-03"
        }
    ]
}
Response
{
    "code": 200,
    "message": "2 domains renewed",
    "command-id": "ec26b06b-37ff-462e-a269-ff13a6c33bd1",
    "data": {
        "renewed": {
            "domain01.com": {
                "expires_at": "2018-05-03T14:59:31+00:00"
            },
            "domain01.net": {
                "expires_at": "2020-05-03T14:59:35+00:00"
            }
        },
        "failures": []
    }
}

Check availability of a domain

Table 22. Parameters
Parameter Type Required Description

name

array

yes

Array of domain names to check

Resource
GET /domains/check.json
Request
{
    "name": ["domain03.com", "domain03.net", "domain03.org", "domain04.com"]
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "f5776756-9551-45dd-8e2c-33b986b795fa",
    "data": {
        "domains": {
            "domain03.com": "available",
            "domain03.net": "taken",
            "domain03.org": "available",
            "domain04.com": "available"
        }
    }
}

Check for claims notifications

Table 23. Parameters
Parameter Type Required Description

name

array

yes

Array of domain names to check

Resource
GET /domains/claims.json
Request
{
    "name": ["domain03.com", "domain03.org", "domain04.com"]
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "30b0b287-a9a0-4a3b-b3ef-306fb0d202e5",
    "data": {
        "notices": {
            "tmch\/2014110901\/7\/C\/D\/fNoVPdcFMpsOnieS4D57V26b0000023681": {
                "id": "f842049c0000000000039900530",
                "notBefore": "2014-11-09T12:00:00+00:00",
                "notAfter": "2014-11-11T12:00:00+00:00",
                "marks": [
                    {
                        "mark": "DOMAIN04",
                        "jurisdiction": "United Kingdom",
                        "goodsAndServices": "Hosting websites.Domain name registration services; domain name renewal services; domain name transfer services; domain name portfolio management services.",
                        "classes": [
                            {
                                "class": 42,
                                "description": "Scientific and technological services and research and design relating thereto; industrial analysis and research services; design and development of computer hardware and software."
                            }
                        ],
                        "registrant": {
                            "company": "Lexsynergy Limited",
                            "street": [
                                "130 Hampstead House",
                                "176 Finchley Road"
                            ],
                            "city": "London",
                            "postcode": "NW3 6BT",
                            "country": "GB"
                        }
                    }
                ]
            }
        },
        "domains": {
            "domain04.com": "tmch\/2014110901\/7\/C\/D\/fNoVPdcFMpsOnieS4D57V26b0000023681"
        }
    }
}

Register a domain name

Table 30. Parameters
Parameter Type Required Description

domains

array

yes

Array of domain objects

Table 29. Domain object
Parameter Type Required Description

name

string

yes

The name of the domain you wish to update

years

integer

yes

Number of years to register the domain

folder

string

no

auto_renew_mode

string

no

Should be either "Do Not Renew", "Renew Once" or "Auto Renew"

use_whois_privacy

boolean

no

Use whois privacy service

use_lexsynergy_ns

boolean

no

Use Lexsynergy’s nameservers

nameservers

object

no

A collection/array of nameserver objects

Table 24. Nameserver collection
Parameter Type Required Description

name

string

yes

ips

array

no

Array of IPv4 and IPv6 addresses

registrant_handle_use_local_presence

boolean

no

Use local presence for registrant handle

registrant_handle

string|object

yes

Either a handle name or object

Table 25. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

admin_handle_use_local_presence

boolean

no

Use local presence for admin handle

admin_handle

string|object

yes

Either a handle name or object

Table 26. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

tech_handle_use_local_presence

boolean

no

Use local presence for tech handle

tech_handle

string|object

yes

Either a handle name or object

Table 27. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

smd

string

no

Encoded SMD file for sunrise registrations

claims

object

no

A claims notification acceptance

Table 28. Handle object
Parameter Type Required Description

noticeID

string

yes

This is taken from the claims check

notAfter

datetime

no

This is taken from the claims check

acceptedDate

datetime

yes

When the user accepted the notice

Resource
POST /domains/create.json
Request
{
    "domains": [
        {
            "name": "domain04.com",
            "years": 2,
            "registrant_handle": "API-4WCWEVYOK-17C640-0",
            "tech_handle": "API-4WCWEVYOK-17C640-0",
            "admin_handle": "API-4WCWEVYOK-17C640-0",
            "use_lexsynergy_ns": true,
            "claims": {
                "noticeID": "f842049c0000000000039900530",
                "notAfter": "2014-11-11T12:00:00+00:00",
                "acceptedDate": "2014-11-09T12:05:00+00:00"
            }
        },
        {
            "name": "domain03.org",
            "years": 5,
            "registrant_handle": "API-4WCWEVYOK-17C640-0",
            "tech_handle": "API-4WCWEVYOK-17C640-0",
            "admin_handle": "API-4WCWEVYOK-17C640-0",
            "nameservers": [
                {
                    "name": "ns1.example.com"
                },
                {
                    "name": "ns2.domain03.org",
                    "ips": ["127.0.0.1", "::1"]
                }
            ]
        }
    ]
}
Response
{
    "code": 200,
    "message": "2 domains submitted for registration",
    "command-id": "5c722958-ba9a-4a77-81b1-9d73c83693ac",
    "data": {
        "registered": {
            "domain04.com": {
                "status": "Registered",
                "registered_at": "2014-11-10T00:00:00+00:00",
                "expires_at": "2016-11-10T00:00:00+00:00"
            },
            "domain03.org": {
                "status": "Registered",
                "registered_at": "2014-11-10T00:00:00+00:00",
                "expires_at": "2019-11-10T00:00:00+00:00"
            }
        },
        "failures": []
    }
}

Suspend a domain

Table 31. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to suspend

Resource
PUT /domains/suspend.json
Request
{
    "name": "domain01.com",
}

Note: If the domain is not already suspended it will be queued for suspension otherwise it will return as saying suspended

Response (queued)
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "3998be12-36d2-4e3a-85a3-90ac61e06b26",
    "data": {
        "name": "domain01.com",
        "queued": true
    }
}
Response (suspended)
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "3998be12-36d2-4e3a-85a3-90ac61e06b26",
    "data": {
        "name": "domain01.com",
        "suspended": true
    }
}

Unsuspend a domain

Table 32. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to unsuspend

Resource
PUT /domains/unsuspend.json
Request
{
    "name": "domain01.com",
}
Note
A domain can be suspended by both Lexsynergy and you, if the domain has been suspended by Lexsynergy then after unsuspending the domain it will return as partially unsuspended
Response (queued)
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "a2e2d5d2-4e04-11ec-aa65-02428222e843",
    "data": {
        "name": "domain01.com",
        "queued": true
    }
}
Response (suspended)
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "f9f467be-4e04-11ec-8b34-02428222e843",
    "data": {
        "name": "domain01.com",
        "partial": true
    }
}

Delete a domain

Table 33. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to delete

Resource
DELETE /domains/delete
Request
{
    "name": "domain01.com",
}
Response
{
    "code": 200,
    "message": "Domain deleted",
    "command-id": "4dff7ba4-add2-11ed-86c1-024207c2e6ec",
    "data": {
        "name": "domain01.com",
    }
}

Domain Transfers

List of pending transfers

Table 34. Parameters
Parameter Type Required Description

limit

integer

no

Maximum number of records to return, default and maximum value is 1,000

page

integer

no

Page number to return

Resource
GET /domains/transfers.json
Request
{
    "limit": 10
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "87d18200-688f-4555-ac06-36e51a702f18",
    "data": {
        "limit": 10,
        "page": 1,
        "count": 2,
        "domains": [ "domain005.net", "domain004.net" ]
    }
}

Get transfer info

Table 35. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain you wish to retrieve

deep

boolean

no

If deep is true you get full handle info embedded in the response otherwise just handle names

Basic / shallow request

Resource
GET /domains/transfers/info.json
Request
{
    "name": "domain005.net"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "0ee93bbe-823a-42ab-9a82-fac3755e81f6",
    "data": {
        "name": "domain005.net",
        "auto_renew_mode": "Auto Renew",
        "use_lexsynergy_ns": true,
        "registrant_handle": "Lexsynergy Limited",
        "admin_handle": "Lexsynergy Limited",
        "tech_handle": "Lexsynergy Limited",
        "nameservers": [
            {
                "name": "ns1.lexsynergy.net"
            },
            {
                "name": "ns2.lexsynergy.us"
            },
            {
                "name": "ns3.lexsynergy.info"
            }
        ]
    }
}

Deep request

Resource
GET /domains/transfers/info.json
Request
{
    "name": "domain005.net",
    "deep": true
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "74b508b1-7d01-4eb4-b322-3715dd8e6e2a",
    "data": {
        "name": "domain005.net",
        "auto_renew_mode": "Auto Renew",
        "use_lexsynergy_ns": true,
        "registrant_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "admin_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "tech_handle": {
            "name": "Lexsynergy Limited",
            "first_name": "Domain Name",
            "middle_name": "",
            "last_name": "Department",
            "company": "Lexsynergy Limited",
            "company_number": "",
            "address_line_1": "130 Hampstead House",
            "address_line_2": "176 Finchley Road",
            "city": "London",
            "county": "London",
            "postcode": "NW3 6BT",
            "telephone": "+44.2081331319",
            "fax": "+43.15120587",
            "email": "domains@lexsynergy.com",
            "country": "GB"
        },
        "nameservers": [
            {
                "name": "ns1.lexsynergy.net"
            },
            {
                "name": "ns2.lexsynergy.us"
            },
            {
                "name": "ns3.lexsynergy.info"
            }
        ]
    }
}

Transfer a domain name

Table 42. Parameters
Parameter Type Required Description

domains

array

yes

Array of domain objects

Table 41. Domain object
Parameter Type Required Description

name

string

yes

The name of the domain you wish to update

auth_code

string

no

Only required for domains that use auth codes

folder

string

no

auto_renew_mode

string

no

Should be either "Do Not Renew", "Renew Once" or "Auto Renew"

use_whois_privacy

boolean

no

Use whois privacy service

use_lexsynergy_ns

boolean

no

Use Lexsynergy’s nameservers

nameservers

object

no

A collection/array of nameserver objects

Table 36. Nameserver collection
Parameter Type Required Description

name

string

yes

ips

array

no

Array of IPv4 and IPv6 addresses

registrant_handle_use_local_presence

boolean

no

Use local presence for registrant handle

registrant_handle

string|object

yes

Either a handle name or object

Table 37. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

admin_handle_use_local_presence

boolean

no

Use local presence for admin handle

admin_handle

string|object

yes

Either a handle name or object

Table 38. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

tech_handle_use_local_presence

boolean

no

Use local presence for tech handle

tech_handle

string|object

yes

Either a handle name or object

Table 39. Handle object
Parameter Type Required Description

first_name

string

yes

middle_name

string

no

last_name

string

yes

company

string

no

company_number

string

no

address_line_1

string

yes

address_line_2

string

no

city

string

yes

county

string

no

postcode

string

no

This is not optional for handles using country code GB or US

country

string

yes

Two letter ISO 3166-1 country code

telephone

string

yes

Format +44.2081331319

fax

string

no

Format +44.2081331319

email

string

yes

smd

string

no

Encoded SMD file for sunrise registrations

claims

object

no

A claims notification acceptance

Table 40. Handle object
Parameter Type Required Description

noticeID

string

yes

This is taken from the claims check

notAfter

datetime

no

This is taken from the claims check

acceptedDate

datetime

yes

When the user accepted the notice

Resource
POST /domains/transfers/create.json
Request
{
    "domains": [
        {
            "name": "domain010.net",
            "auth_code": "my-auth_code",
            "registrant_handle": "API-4WCWEVYOK-17C640-0",
            "tech_handle": "API-4WCWEVYOK-17C640-0",
            "admin_handle": "API-4WCWEVYOK-17C640-0",
            "use_lexsynergy_ns": true
        },
        {
            "name": "domain011.net",
            "auth_code": "my-auth_code",
            "registrant_handle": "API-4WCWEVYOK-17C640-0",
            "tech_handle": "API-4WCWEVYOK-17C640-0",
            "admin_handle": "API-4WCWEVYOK-17C640-0",
            "nameservers": [
                {
                    "name": "ns1.example.com"
                },
                {
                    "name": "ns2.domain011.net",
                    "ips": ["127.0.0.1", "::1"]
                }
            ]
        }
    ]
}
Response
{
    "code": 200,
    "message": "2 domains submitted for transfer",
    "command-id": "2acfb481-6f6c-4a85-8836-3081154fc21c",
    "data": {
        "queued": {
            "domain010.net": {
                "status": "Pending Transfer"
            },
            "domain011.net": {
                "status": "Pending Transfer"
            }
        },
        "failures": []
    }
}

DNS

List DNS records for a specific domain

Table 43. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain’s DNS records you wish to retrieve

Resource
GET /dns.json
Request
{
    "name": "domain04.com"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "7c017d01-3883-4a1a-ae91-72254cfab895",
    "data": {
        "name": "domain04.com",
        "records": [
            {
                "record": "domain04.com",
                "type": "SOA",
                "ttl": 86400,
                "content": "ns1.lexsynergy.net domains.lexsynergy.com 6 86400 7200 3600000 172800",
                "protected": "soa"
            },
            {
                "record": "domain04.com",
                "type": "NS",
                "ttl": 3600,
                "content": "ns1.lexsynergy.net",
                "protected": "ns"
            },
            {
                "record": "domain04.com",
                "type": "NS",
                "ttl": 3600,
                "content": "ns2.lexsynergy.us",
                "protected": "ns"
            },
            {
                "record": "domain04.com",
                "type": "NS",
                "ttl": 3600,
                "content": "ns3.lexsynergy.info",
                "protected": "ns"
            },
            {
                "record": "domain04.com",
                "type": "A",
                "ttl": 3600,
                "content": "1.2.3.4",
                "protected": null
            },
            {
                "record": "www.domain04.com",
                "type": "A",
                "ttl": 3600,
                "content": "1.2.3.4",
                "protected": null
            },
            {
                "record": "domain04.com",
                "type": "MX",
                "ttl": 3600,
                "prio": 10,
                "content": "mail.google.com",
                "protected": null
            },
            {
                "record": "forwarder.domain04.com",
                "type": "A",
                "ttl": 3600,
                "content": "178.79.178.218",
                "protected": "web forward"
            },
            {
                "record": "forwarder.domain04.com",
                "type": "AAAA",
                "ttl": 3600,
                "content": "2a01:7e00:e000:3f7::",
                "protected": "web forward"
            },
        ]
    }
}

Update DNS Zone

Note
This will overwrite all existing unprotected DNS records in your zone with the submitted records
Table 45. Parameters
Parameter Type Required Description

name

string

yes

Domain name to update

records

array

yes

Array of DNS records

Table 44. DNS record
Parameter Type Required Description

record

string

yes

The name

type

string

yes

The record type: A, AAAA, CAA, CERT, CNAME, DS, EUI48, EUI64, HINFO, HTTPS, IPSECKEY, MX, NS, OPENPGPKEY, SMIMEA, SPF, SRV, SSHFP, SVCB, TLSA, TXT, URI

ttl

integer

no

content

string

yes

prio

integer

no

Only required for records that support priorities

Resource
PUT /dns/update.json
Request
{
    "name": "domain.com",
    "records": [
        {
            "record": "domain.com",
            "type": "MX",
            "ttl": 3600,
            "prio": 5,
            "content": "mail.domain.net"
        },
        {
            "record": "domain.com",
            "type": "TXT",
            "ttl": 3600,
            "content": "\"v=spf1 a mx -all\""
        },
        {
            "record": "localhost.domain.com",
            "type": "A",
            "ttl": 300,
            "content": "127.0.0.1"
        },
        {
            "record": "localhost.domain.com",
            "type": "AAAA",
            "ttl": 300,
            "content": "::1"
        }
    ]
}
Response
{
    "code": 200,
    "message": "Zone updated",
    "command-id": "ddf1aa56-858e-11ec-b89d-024222e2dc00",
    "data": [
        {
            "record": "domain.com",
            "type": "NS",
            "ttl": 3600,
            "content": "ns1.lexsynergy.net",
            "protected": "ns"
        },
        {
            "record": "domain.com",
            "type": "NS",
            "ttl": 3600,
            "content": "ns2.lexsynergy.us",
            "protected": "ns"
        },
        {
            "record": "domain.com",
            "type": "NS",
            "ttl": 3600,
            "content": "ns3.lexsynergy.info",
            "protected": "ns"
        },
        {
            "record": "domain.com",
            "type": "MX",
            "ttl": 3600,
            "prio": 5,
            "content": "mail.domain.net",
            "protected": null
        },
        {
            "record": "domain.com",
            "type": "TXT",
            "ttl": 3600,
            "content": "\"v=spf1 a mx -all\"",
            "protected": null
        },
        {
            "record": "localhost.domain.com",
            "type": "A",
            "ttl": 300,
            "content": "127.0.0.1",
            "protected": null
        },
        {
            "record": "localhost.domain.com",
            "type": "AAAA",
            "ttl": 300,
            "content": "::1",
            "protected": null
        },
        {
            "record": "domain.com",
            "type": "SOA",
            "ttl": 3600,
            "content": "ns1.lexsynergy.net dnsmaster.lexsynergy.com 2 302400 3600 1209600 600",
            "protected": "soa"
        }
    ]
}

Create a DNS record

Table 46. Parameters
Parameter Type Required Description

name

string

yes

The domain name to add the DNS record to

record

string

yes

The name

type

string

yes

The record type: A, AAAA, CAA, CERT, CNAME, DS, EUI48, EUI64, HINFO, HTTPS, IPSECKEY, MX, NS, OPENPGPKEY, SMIMEA, SPF, SRV, SSHFP, SVCB, TLSA, TXT, URI

ttl

integer

no

content

string

yes

prio

integer

no

Only required for records that support priorities

Resource
POST /dns/create.json
Request
{
    "name": "domain04.com",
    "record": "sub.domain04.com",
    "type": "AAAA",
    "content": "::1"
}
Response
{
    "code": 200,
    "message": "Record created",
    "command-id": "60e4a41d-a2d1-4611-b9d4-19a5e82f7f2f",
    "data": {
        "record": "sub.domain04.com",
        "type": "AAAA",
        "ttl": 3600,
        "content": "::1",
        "prio": 0
    }
}

Delete DNS records

Note
This will delete any record that matches the criteria in the provided parameters.
Table 47. Parameters
Parameter Type Required Description

name

string

yes

The domain name to add the DNS record to

record

string

no

The name

type

string

no

The record type: A, AAAA, AFSDB, CERT, CNAME, HINFO, IPSECKEY, KX, LOC, MR, MX, NAPTR, NS, RP, SPF, SRV, SSHFP, TXT

ttl

integer

no

content

string

no

prio

integer

no

Only required for records that support priorities

Resource
DELETE /dns/delete.json
Request
{
    "name": "domain04.com",
    "content": "::1"
}
Response
{
    "code": 200,
    "message": "Record deleted",
    "command-id": "41b4ee95-ae8f-4839-931a-c321d0045bd9",
    "data": {
        "name": "domain04.com",
        "records": [
            {
                "record": "sub.domain04.com",
                "type": "AAAA",
                "ttl": "3600",
                "content": "::1"
            }
        ]
    }
}

Email Forwarding

List email forwarding for a specific domain

Table 48. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain’s email forwarding you wish to retrieve

Resource
GET /domains/forwarding/email.json
Request
{
    "name": "domain01.com"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "cc7d0aae-4e07-11ec-b2bc-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarders": [
            {
                "forwarder": "user",
                "to": [
                    "user1@domain02.net",
                    "user2@domain02.net",
                ]
            }
        ]
    }
}

Get email forwarder info

Table 49. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

forwarder

string

yes

The user part of the forwarder

Resource
GET /domains/forwarding/email/info.json
Request
{
    "name": "domain01.com",
    "forwarder": "user"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "798dcfc6-4e08-11ec-99d8-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarder": "user",
        "to": [
            "user1@domain02.net",
            "user2@domain02.net",
        ]
    }
}

Create email forwarder

Table 50. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

forwarder

string

yes

The user part of the forwarder

to

array

yes

Array of email addresses to forward emails to

Resource
POST /domains/forwarding/email/create.json
Request
{
    "name": "domain01.com",
    "forwarder": "alias",
    "to": [
        "user3@domain02.net",
        "user4@domain02.net"
    ]
}
Response
{
    "code": 200,
    "message": "Email forward created",
    "command-id": "64ddef2e-4e09-11ec-95e1-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarder": "alias",
        "to": [
            "user3@domain02.net",
            "user4@domain02.net"
        ]
    }
}

Update email forwarder

Table 51. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

forwarder

string

yes

The user part of the forwarder

to

array

yes

Array of email addresses to forward emails to

Resource
PUT /domains/forwarding/email/update.json
Request
{
    "name": "domain01.com",
    "forwarder": "alias",
    "to": [
        "user5@domain02.net",
        "user6@domain02.net"
    ]
}
Response
{
    "code": 200,
    "message": "Email forward updated",
    "command-id": "64ddef2e-4e09-11ec-95e1-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarder": "alias",
        "to": [
            "user5@domain02.net",
            "user6@domain02.net"
        ]
    }
}

Delete email forwarder

Table 52. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

forwarder

string

yes

The user part of the forwarder

Resource
DELETE /domains/forwarding/email/delete.json
Request
{
    "name": "domain01.com",
    "forwarder": "alias"
}
Response
{
    "code": 200,
    "message": "Email forward deleted",
    "command-id": "64ddef2e-4e09-11ec-95e1-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarder": "alias",
        "to": [
            "user5@domain02.net",
            "user6@domain02.net"
        ]
    }
}

Web Forwarding

List web forwarding for a specific domain

Table 53. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain’s web forwarding you wish to retrieve

Resource
GET /domains/forwarding/web.json
Request
{
    "name": "domain01.com"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "e250374a-4e0a-11ec-a093-02428222e843",
    "data": {
        "name": "domain01.com",
        "forwarders": [
            {
                "hostname": "domain01.com",
                "type": "Permanent Redirect",
                "destination": "https://www.domain02.net"
            },
            {
                "hostname": "www.domain01.com",
                "type": "Permanent Redirect",
                "destination": "https://www.domain02.net"
            }
        ]
    }
}

Get web forwarder info

Table 54. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

hostname

string

yes

The hostname (FQDN) of the forwarder

Resource
GET /domains/forwarding/web/info.json
Request
{
    "name": "domain01.com",
    "hostname": "www.domain01.com"
}
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "2b7ea6cc-4e0b-11ec-a806-02428222e843",
    "data": {
        "name": "domain01.com",
        "hostname": "www.domain01.com",
        "type": "Permanent Redirect",
        "destination": "https://www.domain02.net"
    }
}

Create web forwarder

Table 55. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

hostname

string

yes

The hostname (FQDN) of the forwarder

destination

string

yes

URL to forward to, not required for "Holding Page"

type

string

yes

"Permanent Redirect", "Temporary Redirect", "Framed" or "Holding Page"

Resource
POST /domains/forwarding/email/create.json
Request
{
    "name": "domain01.com",
    "hostname": "alias.domain01.com",
    "destination": "https://domain02.net",
    "type": "Permanent Redirect"
}
Response
{
    "code": 200,
    "message": "Web forward created",
    "command-id": "8b16e35a-4e0c-11ec-914d-02428222e843",
    "data": {
        "name": "domain01.com",
        "hostname": "alias.domain01.com",
        "type": "Permanent Redirect",
        "destination": "https://domain02.net"
    }
}

Update web forwarder

Table 56. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

hostname

string

yes

The hostname (FQDN) of the forwarder

destination

string

yes

URL to forward to, not required for "Holding Page"

type

string

yes

"Permanent Redirect", "Temporary Redirect", "Framed" or "Holding Page"

Resource
PUT /domains/forwarding/email/update.json
Request
{
    "name": "domain01.com",
    "hostname": "alias.domain01.com",
    "destination": "https://domain03.net",
    "type": "Permanent Redirect"
}
Response
{
    "code": 200,
    "message": "Web forward updated",
    "command-id": "b645db8a-4e0c-11ec-9a58-02428222e843",
    "data": {
        "name": "domain01.com",
        "hostname": "alias.domain01.com",
        "type": "Permanent Redirect",
        "destination": "https://domain03.net",
    }
}

Delete web forwarder

Table 57. Parameters
Parameter Type Required Description

name

string

yes

The name of the domain for the email forwarder

hostname

string

yes

The hostname (FQDN) of the forwarder

Resource
DELETE /domains/forwarding/email/delete.json
Request
{
    "name": "domain01.com",
    "hostname": "alias.domain01.com",
}
Response
{
    "code": 200,
    "message": "Web forward deleted",
    "command-id": "e038a3a4-4e0d-11ec-a527-02428222e843",
    "data": {
        "name": "domain01.com",
        "hostname": "alias.domain01.com",
        "type": "Permanent Redirect",
        "destination": "https://domain03.net",
    }
}

Message queue

Warning
Messages older than 21 days will automatically be removed from the message queue
Note
The user must have full access to the account to access the message queue

The message queue is used to notify you of out-of-band changes to domains, such as domain status changes.

Event types

domain.status.update

Raised whenever a domain changes status

{
    "name": "domain.tld",
    "status": {
        "old": "Pending Transfer",
        "new": "Registered"
    }
}

Get next message

Table 58. Parameters
Parameter Type Required Description
Table 59. Response
Parameter Type Description

event

string

The message event type

id

string

The message ID, used for acknowledging the message

time

datetime

The time the message was queued

data

object

Message specific data

messages

integer

Number of messages in the queue, including this one

Resource
GET /messages.json
Response
{
    "code": 200,
    "message": "Command completed successfully",
    "command-id": "53ebdf5a-d4ac-11e5-81be-e549c727086e",
    "data": {
        "event": "domain.status.update",
        "id": "406f74e0-d49e-11e5-b23d-a45e60c22f39",
        "time": "2016-02-16T11:13:05+00:00",
        "data": {
            "name": "domain.tld",
            "status": {
                "old": "Registered",
                "new": "Expired"
            }
        },
        "messages": 1
    }
}
Response
{
    "code": 200,
    "message": "No messages queued.",
    "command-id": "9d642354-d4ac-11e5-a3e2-ecd054e2aae1",
    "data": {
        "messages": 0
    }
}

Acknowledge message

Note
You can only acknowledge the message at the front of the queue
Table 60. Parameters
Parameter Type Required Description

id

string

yes

The message ID to acknowledge

Resource
DELETE /messages.json
Request
{
    "id": "406f74e0-d49e-11e5-b23d-a45e60c22f39"
}
Response
{
    "code": 200,
    "message": "Message successful acknowledged.",
    "command-id": "902e7b1c-d4ac-11e5-956f-1a7e800a21dc",
    "data": {
        "messages": 0
    }
}

Webhooks

Webhooks are useful if you want near real-time notifications of messages. Alternatively you can periodically poll the system using the API for new messages.

Warning
The HTTP connection settings have a connection timeout of 1 second and a general timeout of 2 seconds for your webhook
Note
In the production enviorment your webhook must be an HTTPS URL, HTTP is supported in testing.
Note
You should still poll the API for new messages even if using webhooks. Messages that are not successfully delivered and acknowledged will end up in your normal message queue

You can configure your webhook URL and get your signing secret by logging into the Lexsynergy control panel. You must be the account owner or have the administrator privileges to access your API settings.

Requests to your webhook need be signed with the following headers using the HTTP HMAC specification below:

X-Signature-Timestamp: Unix_Timestamp
X-Signature: Base64( HMACSHA256 ( Webhook_Secret_Key, X-Signature-Timestamp + "\n" + Webhook_URL + "\n" + Request_Body + "\n" ) )

A web request with Content-Type "application/json" will be made to the provided URL with the request body in the format as below:

Request
{
    "event": "domain.status.update",
    "id": "406f74e0-d49e-11e5-b23d-a45e60c22f39",
    "time": "2016-02-16T11:13:05+00:00",
    "data": {
        "name": "domain.tld",
        "status": {
            "old": "Registered",
            "new": "Expired"
        }
    }
}

Responses should be signed with the following headers using the HTTP HMAC specficiation below:

X-Signature-Timestamp: Unix_Timestamp
X-Signature: Base64( HMACSHA256 ( Webhook_Secret_Key, X-Signature-Timestamp + "\n" + Response_Body + "\n" ) )

You must respond with Content-Type "application/json" with the JSON body containing the acknowledge property set to true, and the message ID you wish to acknowledge.

Response
{
    "acknowledge": true,
    "id": "406f74e0-d49e-11e5-b23d-a45e60c22f39"
}