Domains (v2)

The base URL for this API is: https://api.leaseweb.com/hosting/v2

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The response will be JSON. Most APIs use the following format:

{
"errorCode" : "APP00800",
"errorMessage" : "The connection with the DB cannot be established.",
"correlationId" : "550e8400-e29b-41d4-a716-446655440000",
"userMessage" : "Cannot handle your request at the moment. Please try again later.",
"reference" : "http://developer.leaseweb.com/errors/APP00800"
}

Authentication

Authentication for the APIs is required. To authenticate your call, you will need to sent your API key as X-LSW-Auth header.

You can generate API keys in the Customer Portal.

Domains

List domains

Authorizations:
query Parameters
limit
integer
Default: 10
Example: limit=10

Limit the number of results returned

offset
integer
Default: 0

Return results starting from the given offset

type
string
Enum: "dns" "email" "overview"
Example: type=overview

Supplement the domain listing with statistics about either DNS and Email

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/hosting/v2/domains?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&type=overview' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
{
  • "domains": [
    ],
  • "_links": {
    },
  • "_metadata": {
    }
}

Inspect a domain

Authorizations:
path Parameters
domainName
required
string
Example: example.com

Domain name

Responses

Request samples