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

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "domainName": "example.com",
  • "suspended": true,
  • "dnsOnly": true,
  • "status": "SUSPENDED",
  • "contractStartDate": "2017-04-01T00:00:00+02:00",
  • "contractEndDate": "2018-04-01T00:00:00+02:00",
  • "_links": {
    }
}

Check availability

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

Domain name

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/available \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "domainName": "example.com",
  • "available": true,
  • "_links": {
    }
}

List nameservers

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

Domain name

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/nameservers \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "nameservers": [
    ],
  • "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
  • "_links": {
    },
  • "_metadata": {
    }
}

Update nameservers

Full replacement of all nameservers for a domain.

Please note that the request body should contain at least two nameservers.

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

Domain name

Request Body schema: application/json
required
Array of objects

Array of nameservers

Responses

Request samples

Content type
application/json
{
  • "nameservers": [
    ]
}

Response samples

Content type
application/json
{
  • "nameservers": [
    ],
  • "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
  • "_links": {
    },
  • "_metadata": {
    }
}

Inspect DNS Security (DNSSEC)

Retrieve the DNSSEC status for your domain.

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

Domain name

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/dnssec \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
Example
{
  • "status": "ENABLED",
  • "nsec3": {
    },
  • "keyRollover": {
    },
  • "_links": {
    }
}

Update DNS Security (DNSSEC)

Enable or Disable DNSSEC for your domain.

Please note : If you are using Leaseweb nameservers we will add DNSSEC keys automatically when enabling DNSSEC. If you are managing your own nameservers (non-leaseweb nameservers) then you can add your own keys as shown in example.

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

Domain name

Request Body schema: application/json
status
required
string
Enum: "ENABLED" "DISABLED"

Domain DNSSEC status

object

NSEC3 is an extension to DNSSEC and it requires DNSSEC to be enabled.

Array of objects

Add DNSSEC keys only when you have non-leaseweb nameservers.

Responses

Request samples

Content type
application/json
Example
{
  • "status": "ENABLED",
  • "nsec3": {
    }
}

Response samples

Content type
application/json
Example
{
  • "infoMessage": "DNSSEC enabled successfully. It may take up to 25 hours to reflect."
}

Availability for all TLDs

To get the list of available tlds for a domain.

Authorizations:
query Parameters
domain
required
string^[a-zA-Z0-9-]+
Example: domain=leaseweb

Name of the domain without tld.

tlds
string^[a-zA-Z0-9,.]+
Example: tlds=.ac,.am,.amsterdam

Provide list of tlds for which you want to check availability.

limit
integer^[0-9]+
Example: limit=30

Limit the number of results returned.Maximum 30.

offset
integer^[0-9]+
Example: offset=0

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/hosting/v2/domains/available?domain=leaseweb&tlds=.ac%2C.am%2C.amsterdam&limit=30&offset=0' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "requested": [
    ],
  • "suggested": [
    ],
  • "_metadata": {
    }
}

DNS

List resource record sets

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

Domain name

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
{
  • "infoMessage": "EXAMPLE: Sorry, but your domain is not yet listed on our nameservers. Please create a DNS record first so we can add your domain.",
  • "resourceRecordSets": [
    ],
  • "_links": {
    }
}

Create a resource record set

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

Domain name

Request Body schema:
name
required
string

Name of the resource record set

type
required
string
Enum: "A" "AAAA" "CAA" "CNAME" "MX" "NS" "SRV" "TXT" "DS" "TLSA"

Type of the resource record set

content
required
Array of strings

Array of resource record set content entries

ttl
required
integer
Enum: 60 300 1800 3600 14400 28800 43200 86400

Time to live of the resource record set

Responses

Request samples

Content type
{
  • "name": "example.com.",
  • "type": "A",
  • "content": [
    ],
  • "ttl": 3600
}

Response samples

Content type
{
  • "name": "example.com.",
  • "type": "A",
  • "content": [
    ],
  • "ttl": 3600,
  • "editable": true,
  • "_links": {
    }
}

Update resource record sets

This is a full replacement of all editable resource records sets for a domain.

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

Domain name

Request Body schema:
required
Array of objects

Array of resource record sets

Responses

Request samples

Content type
{
  • "resourceRecordSets": [
    ]
}

Response samples

Content type
{
  • "infoMessage": "EXAMPLE: Sorry, but your domain is not yet listed on our nameservers. Please create a DNS record first so we can add your domain.",
  • "resourceRecordSets": [
    ],
  • "_links": {
    }
}

Delete resource record sets

Delete all editable resource record sets for a domain.

Please note that this action will keep the domain's zone in place.

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

Domain name

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

Inspect resource record set

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

Domain name

name
required
string
Example: example.com.

Record name

type
required
string
Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS"
Example: A

Record type

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
{
  • "name": "example.com.",
  • "type": "A",
  • "content": [
    ],
  • "ttl": 3600,
  • "editable": true,
  • "_links": {
    }
}

Update a resource record set

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

Domain name

name
required
string
Example: example.com.

Record name

type
required
string
Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS"
Example: A

Record type

Request Body schema:
content
required
Array of strings

Array of resource record set content entries

ttl
required
integer
Enum: 60 300 1800 3600 14400 28800 43200 86400

Time to live of the resource record set

Responses

Request samples

Content type
{
  • "content": [
    ],
  • "ttl": 3600
}

Response samples

Content type
{
  • "name": "example.com.",
  • "type": "A",
  • "content": [
    ],
  • "ttl": 3600,
  • "editable": true,
  • "_links": {
    }
}

Delete a resource record set

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

Domain name

name
required
string
Example: example.com.

Record name

type
required
string
Enum: "A" "AAA" "CAA" "CNAME" "MX" "TLSA" "NS" "SRV" "TXT" "SOA" "DS"
Example: A

Record type

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

Validate a resource record set

This endpoint may be used to validate whether a resource record set is valid, without actually creating it.

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

Domain name

Request Body schema:
name
required
string

Name of the resource record set

type
required
string
Enum: "A" "AAAA" "CAA" "CNAME" "MX" "NS" "SRV" "TXT" "DS" "TLSA"

Type of the resource record set

content
required
Array of strings

Array of resource record set content entries

ttl
required
integer
Enum: 60 300 1800 3600 14400 28800 43200 86400

Time to live of the resource record set

Responses

Request samples

Content type
{
  • "name": "example.com.",
  • "type": "A",
  • "content": [
    ],
  • "ttl": 3600
}

Response samples

Content type
application/json
{
  • "infoMessage": "Resource record set is valid."
}

Import dns records from bind file content

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

Domain name

Request Body schema: application/json
content
required
string

Dns bind file content as string

Responses

Request samples

Content type
application/json
{
  • "content": "$ORIGIN example.com. \r\n$TTL 86400 \r\n\tIN\tMX\t10\tmail.example.com. \r\n\r\n\t\r\ndns1\tIN\tA\t10.0.1.1"
}

Response samples

Content type
application/json
{
  • "resourceRecordSets": [
    ]
}

Validate zone

This endpoint may be used to validate whether a collection of resource record sets constitute a valid zone, withoutcreating them.

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

Domain name

Request Body schema: application/json
required
Array of objects

Array of resource record sets

Responses

Request samples

Content type
application/json
{
  • "resourceRecordSets": [
    ]
}

Response samples

Content type
application/json
{
  • "infoMessage": "Zone example.com is valid."
}

Email

List mailboxes

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

Domain name

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "mailboxes": [
    ],
  • "catchAll": false,
  • "_links": {
    },
  • "nameservers": "LEASEWEB",
  • "_metadata": {
    }
}

Create a mailbox

Please note that it is only possible to create mailboxes when you have a web hosting pack with Leaseweb. Per web hosting pack it is possible to have up to 250 mailboxes.

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

Domain name

Request Body schema: application/json
emailAddress
required
string

The email address of the mailbox

active
required
boolean

Boolean indicating whether the mailbox is active

password
required
string

The password of the mailbox

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

localDelivery
required
boolean

Boolean indicating whether email to be stored as a local copy when there is a forward

setMxRecord
boolean

Boolean indicating whether MX record needs to be updated for mailbox

Responses

Request samples

Content type
application/json
{
  • "emailAddress": "mailbox@example.com",
  • "active": true,
  • "password": "CHANGETHIS",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": false,
  • "localDelivery": true,
  • "setMxRecord": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "currentSize": 123456789,
  • "emailAddress": "mailbox@example.com",
  • "maximumSize": 5368709120,
  • "spamChecksEnabled": true,
  • "suspended": false,
  • "virusChecksEnabled": false,
  • "localDelivery": true,
  • "_embedded": {
    },
  • "_links": {
    }
}

Inspect a mailbox

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

Domain name

emailAddress
required
string

Email address

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "active": true,
  • "currentSize": 123456789,
  • "emailAddress": "mailbox@example.com",
  • "maximumSize": 5368709120,
  • "spamChecksEnabled": true,
  • "suspended": false,
  • "virusChecksEnabled": false,
  • "localDelivery": false,
  • "createdAt": "2023-05-08T10:01:25+00:00",
  • "modifiedAt": "2023-05-08T10:01:25+00:00",
  • "_embedded": {
    },
  • "_links": {
    }
}

Update a mailbox

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

Domain name

emailAddress
required
string

Email address

Request Body schema: application/json
active
required
boolean

Boolean indicating whether the mailbox is active

password
string

The password of the mailbox

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

localDelivery
required
boolean

Boolean indicating whether email to be stored as a local copy when there is a forward

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "password": "CHANGETHIS",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": false,
  • "localDelivery": false
}

Response samples

Content type
application/json
{
  • "active": true,
  • "currentSize": 123456789,
  • "emailAddress": "mailbox@example.com",
  • "maximumSize": 5368709120,
  • "spamChecksEnabled": true,
  • "suspended": false,
  • "virusChecksEnabled": false,
  • "localDelivery": false,
  • "_embedded": {
    },
  • "_links": {
    }
}

Delete a mailbox

Please note that deleting a mailbox also removes all associated alias and forwards

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

Domain name

emailAddress
required
string

Email address

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

Retrieve catch all information

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

Domain name

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "destination": "destination@example.org",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": false,
  • "_links": {
    }
}

Change/create catch all

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

Domain name

Request Body schema: application/json
destination
required
string

The email address to which email messages will be delivered for the catch all

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

Responses

Request samples

Content type
application/json
{
  • "destination": "destination@example.org",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": false
}

Response samples

Content type
application/json
{
  • "destination": "destination@example.org",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": false,
  • "_links": {
    }
}

Delete a catch all

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

Domain name

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

List email aliases

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

Domain name

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "emailAliases": [
    ],
  • "_links": {
    },
  • "nameserver": "EXTERNAL",
  • "_metadata": {
    }
}

Create an email alias

Please note that the source address should always be part of the domain it is created for.

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

Domain name

Request Body schema: application/json
active
required
boolean

Boolean indicating whether the email alias is active

destination
required
string

The email address to which email messages will be delivered

source
required
string

The email address for which email messages will be forwarded

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

setMxRecord
boolean

Boolean indicating whether MX record needs to be created for email alias

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.com",
  • "source": "source@test.example.com",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": true,
  • "setMxRecord": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.com",
  • "source": "source@example.com",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": true,
  • "_links": {
    }
}

Inspect email alias

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

Domain name

source
required
string
destination
required
string

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/emailAliases/%7Bsource%7D/%7Bdestination%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.com",
  • "source": "source@example.com",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": true,
  • "createdAt": "2023-05-08T10:01:11+00:00",
  • "modifiedAt": "2023-05-08T10:01:11+00:00"
}

Update an email alias

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

Domain name

source
required
string
destination
required
string
Request Body schema: application/json
active
required
boolean

Boolean indicating whether the email alias is active

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.com",
  • "source": "source@example.com",
  • "spamChecksEnabled": true,
  • "virusChecksEnabled": true
}

Delete an email alias

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

Domain name

source
required
string
destination
required
string

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/emailAliases/%7Bsource%7D/%7Bdestination%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

List domain forwards

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

Domain name

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

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "forwards": [
    ],
  • "_links": {
    },
  • "_metadata": {
    }
}

List forwards

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

Domain name

emailAddress
required
string

Email address

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "forwards": [
    ],
  • "_links": {
    },
  • "_metadata": {
    }
}

Create a forward

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

Domain name

emailAddress
required
string

Email address

Request Body schema: application/json
active
required
boolean

Boolean indicating whether the forward is active

destination
required
string

The email address to which email messages will be forwarded

source
required
string

The email address of the mailbox for which email messages will be forwarded

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.org",
  • "source": "originating@example.com",
  • "spamChecksEnabled": false,
  • "virusChecksEnabled": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.org",
  • "source": "mailbox@example.com",
  • "spamChecksEnabled": false,
  • "virusChecksEnabled": true,
  • "_links": {
    }
}

Inspect a forward

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

Domain name

emailAddress
required
string

Email address

destination
required
string

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards/%7Bdestination%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.org",
  • "source": "mailbox@example.com",
  • "spamChecksEnabled": false,
  • "virusChecksEnabled": true,
  • "createdAt": "2023-05-08T10:01:25+00:00",
  • "modifiedAt": "2023-05-08T10:01:25+00:00",
  • "_links": {
    }
}

Update a forward

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

Domain name

emailAddress
required
string

Email address

destination
required
string
Request Body schema: application/json
active
required
boolean

Boolean indicating whether the forward is active

spamChecksEnabled
required
boolean

Boolean indicating whether spam checks are enabled

virusChecksEnabled
required
boolean

Boolean indicating whether virus checks are enabled

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "spamChecksEnabled": false,
  • "virusChecksEnabled": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "destination": "destination@example.org",
  • "source": "mailbox@example.com",
  • "spamChecksEnabled": false,
  • "virusChecksEnabled": true,
  • "_links": {
    }
}

Delete a forward

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

Domain name

emailAddress
required
string

Email address

destination
required
string

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards/%7Bdestination%7D \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}

Inspect an auto responder

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

Domain name

emailAddress
required
string

Email address

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "active": true,
  • "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
  • "subject": "Out of office",
  • "_links": {
    }
}

Change an auto responder

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

Domain name

emailAddress
required
string

Email address

Request Body schema: application/json
active
required
boolean

Boolean indicating whether the auto responder is active

body
required
string

The body of the auto responder email message

subject
required
string

The subject of the auto responder email message

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
  • "subject": "Out of office"
}

Response samples

Content type
application/json
{
  • "active": true,
  • "body": "I will be out of office until 14-12-2020. Please contact the reception desk for urgent matters.",
  • "subject": "Out of office",
  • "_links": {
    }
}

Delete an auto responder

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

Domain name

emailAddress
required
string

Email address

Responses

Request samples

curl --request DELETE \
  --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorMessage": "Access to the requested resource is forbidden.",
  • "userMessage": "Sorry, but you do not have access at the moment.",
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be"
}