The base URL for this API is: https://api.leaseweb.com/hosting/v2
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 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.
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 |
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'
{- "domains": [
- {
- "domainName": "example.com",
- "suspended": true,
- "dnsOnly": false,
- "status": "SUSPENDED",
- "contractStartDate": "2017-04-01T00:00:00+02:00",
- "contractEndDate": "2018-04-01T00:00:00+02:00",
- "_links": {
- "self": {
- "href": "/domains/example.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.com/emailAliases"
}, - "forwards": {
- "href": "/domains/example.com/forwards"
}, - "mailboxes": {
- "href": "/domains/example.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.com/validateZone"
}
}
}, - {
- "domainName": "example.org",
- "suspended": false,
- "dnsOnly": true,
- "status": "ACTIVE",
- "contractStartDate": "2015-01-01T00:00:00+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.org"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.org/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.org/emailAliases"
}, - "forwards": {
- "href": "/domains/example.org/forwards"
}, - "mailboxes": {
- "href": "/domains/example.org/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.org/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.org/validateZone"
}
}
}, - {
- "domainName": "example.nl",
- "suspended": false,
- "dnsOnly": false,
- "status": "PENDING",
- "contractStartDate": "2017-08-01T00:00:00+02:00",
- "contractEndDate": "2019-08-01T00:00:00+02:00",
- "_links": {
- "self": {
- "href": "/domains/example.nl"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.nl/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.nl/emailAliases"
}, - "forwards": {
- "href": "/domains/example.nl/forwards"
}, - "mailboxes": {
- "href": "/domains/example.nl/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.nl/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.nl/validateZone"
}
}
}, - {
- "domainName": "no-email-services-configured.com",
- "suspended": true,
- "dnsOnly": false,
- "status": "SUSPENDED",
- "contractStartDate": "2012-11-01T00:00:00+01:00",
- "_links": {
- "self": {
- "href": "/domains/no-email-services-configured.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/no-email-services-configured.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/no-email-services-configured.com/emailAliases"
}, - "forwards": {
- "href": "/domains/no-email-services-configured.com/forwards"
}, - "mailboxes": {
- "href": "/domains/no-email-services-configured.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/no-email-services-configured.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/no-email-services-configured.com/validateZone"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains"
}, - "dns": {
- "href": "/domains?type=dns"
}, - "email": {
- "href": "/domains?type=email"
}
}, - "_metadata": {
- "totalCount": 4,
- "limit": 10,
- "offset": 0
}
}
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": {
- "self": {
- "href": "/domains/example.com"
}, - "collection": {
- "href": "/domains"
}, - "catchAll": {
- "href": "/domains/example.com/catchAll"
}, - "contacts": {
- "href": "/domains/example.com/contacts"
}, - "nameservers": {
- "href": "/domains/example.com/nameservers"
}, - "emailAliases": {
- "href": "/domains/example.com/emailAliases"
}, - "forwards": {
- "href": "/domains/example.com/forwards"
}, - "mailboxes": {
- "href": "/domains/example.com/mailboxes"
}, - "resourceRecordSets": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "validateZone": {
- "href": "/domains/example.com/validateZone"
}
}
}
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/available \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "domainName": "example.com",
- "available": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/available"
}
}
}
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/nameservers \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
], - "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
- "_links": {
- "self": {
- "href": "/domains/{domainName}/nameservers"
}
}, - "_metadata": {
- "totalCount": 4
}
}
Full replacement of all nameservers for a domain.
Please note that the request body should contain at least two nameservers.
domainName required | string Example: example.com Domain name |
required | Array of objects Array of nameservers |
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
]
}
{- "nameservers": [
- {
- "name": "ns1.example.com"
}, - {
- "name": "ns2.example.net"
}
], - "status": "Nameservers update request is accepted. This request will be processed after 24 hours.",
- "_links": {
- "self": {
- "href": "/domains/{domainName}/nameservers"
}
}, - "_metadata": {
- "totalCount": 4
}
}
Retrieve the DNSSEC status for your domain.
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/dnssec \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "status": "ENABLED",
- "nsec3": {
- "active": true
}, - "keyRollover": {
- "status": "INITIALIZED",
- "type": "KSK",
- "message": "It would take 25 hours to complete the process from the time its been initialized"
}, - "_links": {
- "self": {
- "href": "/domains/example.com/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.
domainName required | string Example: example.com Domain name |
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. |
{- "status": "DISABLED"
}
{- "infoMessage": "DNSSEC disabled successfully. It may take up to 25 hours to reflect."
}
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/some.example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./CAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/anotherurl.example.com./CNAME"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./MX"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./NS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SRV"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./TXT"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "SOA",
- "content": [
- "ns0.example.com. postmaster.example.com. 2020021901 10800 3600 604800 300"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SOA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/ds.example.com./DS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_443._tcp.example.com.",
- "type": "TLSA",
- "content": [
- "3 1 1 9141610c47dab44af34daa405017f576c6d2beb5a083a16ba83a52ce27d91988"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/_443._tcp.example.com./TLSA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "parent": {
- "href": "/domains/example.com"
}, - "validateSet": {
- "href": "/domains/example.com/resourceRecordSets/validateSet"
}
}
}
domainName required | string Example: example.com Domain name |
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 |
{- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600
}
{- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
This is a full replacement of all editable resource records sets for a domain.
domainName required | string Example: example.com Domain name |
required | Array of objects Array of resource record sets |
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300
}, - {
- "name": "*.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 60
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./NS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600
}, - {
- "name": "example.com.",
- "type": "SOA",
- "ttl": 3600
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 14400
}
]
}
{- "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": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/some.example.com./AAAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./CAA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/anotherurl.example.com./CNAME"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./MX"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/subdomain.example.com./NS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SRV"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./TXT"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "SOA",
- "content": [
- "ns0.example.com. postmaster.example.com. 2020021901 10800 3600 604800 300"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./SOA"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/ds.example.com./DS"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets"
}, - "parent": {
- "href": "/domains/example.com"
}, - "validateSet": {
- "href": "/domains/example.com/resourceRecordSets/validateSet"
}
}
}
Delete all editable resource record sets for a domain.
Please note that this action will keep the domain's zone in place.
domainName required | string Example: example.com Domain name |
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "value": {
- "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"
}
}
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 |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
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 |
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 |
{- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600
}
{- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
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 |
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/resourceRecordSets/example.com./A \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "value": {
- "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"
}
}
This endpoint may be used to validate whether a resource record set is valid, without actually creating it.
domainName required | string Example: example.com Domain name |
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 |
{- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.51",
- "85.17.150.52",
- "85.17.150.53"
], - "ttl": 3600
}
{- "infoMessage": "Resource record set is valid."
}
domainName required | string Example: example.com Domain name |
content required | string Dns bind file content as string |
{- "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"
}
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "10.0.1.1"
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./A"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com."
], - "ttl": 3600,
- "editable": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/resourceRecordSets/example.com./MX"
}, - "collection": {
- "href": "/domains/example.com/resourceRecordSets"
}
}
}
]
}
This endpoint may be used to validate whether a collection of resource record sets constitute a valid zone, withoutcreating them.
domainName required | string Example: example.com Domain name |
required | Array of objects Array of resource record sets |
{- "resourceRecordSets": [
- {
- "name": "example.com.",
- "type": "A",
- "content": [
- "85.17.150.50",
- "85.17.150.50",
- "85.17.150.53"
], - "ttl": 300
}, - {
- "name": "*.example.com.",
- "type": "A",
- "content": [
- "85.17.150.54"
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 28800
}, - {
- "name": "some.example.com.",
- "type": "AAAA",
- "content": [
- "2a02:2770:8:0:216:3eff:fead:8c93"
], - "ttl": 60
}, - {
- "name": "example.com.",
- "type": "CAA",
- "content": [
- "0 issue \"comodoca.com\""
], - "ttl": 300
}, - {
- "name": "anotherurl.example.com.",
- "type": "CNAME",
- "content": [
- "example.com."
], - "ttl": 86400
}, - {
- "name": "example.com.",
- "type": "MX",
- "content": [
- "10 mail.example.com.",
- "20 mailfilter.leaseweb.com."
], - "ttl": 3600
}, - {
- "name": "subdomain.example.com.",
- "type": "NS",
- "content": [
- "other.nameserver.com",
- "yet-another.nameserver.com"
], - "ttl": 3600
}, - {
- "name": "_service._protocol.example.com.",
- "type": "SRV",
- "content": [
- "10 5 5060 sipserver.example.com."
], - "ttl": 14400
}, - {
- "name": "example.com.",
- "type": "TXT",
- "content": [
- "\"google-site-verification=Kkalsdhl8a9792342lksdo9bSER233\"",
- "\"v=spf1 a mx -all\""
], - "ttl": 3600
}, - {
- "name": "example.com.",
- "type": "SOA",
- "ttl": 3600
}, - {
- "name": "ds.example.com.",
- "type": "DS",
- "content": [
- "63708 13 2 ce46cb792d263081fe23c7245a1ccce4d59e3e501db22932edf59d858c03fd6e"
], - "ttl": 14400
}
]
}
{- "infoMessage": "Zone example.com is valid."
}
domainName required | string Example: example.com Domain name |
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
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'
{- "mailboxes": [
- {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": true,
- "suspended": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": false,
- "currentSize": 1234,
- "emailAddress": "info@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": false,
- "suspended": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/info%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/info%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/info%40example.com/forwards"
}
}
}, - {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "admin@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": false,
- "suspended": false,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/admin%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/admin%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/admin%40example.com/forwards"
}
}
}, - {
- "active": true,
- "currentSize": 1234,
- "emailAddress": "user@example.com",
- "maximumSize": 4321,
- "spamChecksEnabled": true,
- "suspended": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/user%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/user%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/user%40example.com/forwards"
}
}
}
], - "catchAll": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "nameservers": "LEASEWEB",
- "_metadata": {
- "totalCount": 4,
- "allowedMailboxes": 250,
- "limit": 25,
- "offset": 0
}
}
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.
domainName required | string Example: example.com Domain name |
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 |
{- "emailAddress": "mailbox@example.com",
- "active": true,
- "password": "CHANGETHIS",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "localDelivery": true,
- "setMxRecord": true
}
{- "active": true,
- "currentSize": 123456789,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 5368709120,
- "spamChecksEnabled": true,
- "suspended": false,
- "virusChecksEnabled": false,
- "localDelivery": true,
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
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 |
{- "active": true,
- "password": "CHANGETHIS",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "localDelivery": false
}
{- "active": true,
- "currentSize": 123456789,
- "emailAddress": "mailbox@example.com",
- "maximumSize": 5368709120,
- "spamChecksEnabled": true,
- "suspended": false,
- "virusChecksEnabled": false,
- "localDelivery": false,
- "_embedded": {
- "autoResponder": {
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}
}
}
}, - "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes"
}, - "autoResponder": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "forwards": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
Please note that deleting a mailbox also removes all associated alias and forwards
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "value": {
- "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"
}
}
domainName required | string Example: example.com Domain name |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/catchAll"
}, - "parent": {
- "href": "/domains/example.com"
}
}
}
domainName required | string Example: example.com Domain name |
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 |
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false
}
{- "destination": "destination@example.org",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "_links": {
- "self": {
- "href": "/domains/example.com/catchAll"
}, - "parent": {
- "href": "/domains/example.com"
}
}
}
domainName required | string Example: example.com Domain name |
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/catchAll \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "value": {
- "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"
}
}
domainName required | string Example: example.com Domain name |
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
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'
{- "emailAliases": [
- {
- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "source@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}, - {
- "active": true,
- "destination": "mailbox@example.org",
- "source": "not-a-mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00"
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/emailAliases"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "nameserver": "EXTERNAL",
- "_metadata": {
- "totalCount": 3,
- "limit": 25,
- "offset": 0
}
}
Please note that the source address should always be part of the domain it is created for.
domainName required | string Example: example.com Domain name |
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 |
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@test.example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "setMxRecord": true
}
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/emailAliases/source%40example.com/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/emailAliases"
}
}
}
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
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'
{- "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"
}
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
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 |
{- "active": true,
- "spamChecksEnabled": true,
- "virusChecksEnabled": true
}
{- "active": true,
- "destination": "destination@example.com",
- "source": "source@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true
}
domainName required | string Example: example.com Domain name |
source required | string |
destination required | string |
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'
{- "value": {
- "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"
}
}
domainName required | string Example: example.com Domain name |
limit | integer Default: 10 Example: limit=10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
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'
{- "forwards": [
- {
- "active": true,
- "destination": "destination@example.com",
- "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": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40email.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.com",
- "source": "originating@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.org",
- "source": "originating@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": false,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/originating%40example.com/forwards"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/forwards"
}, - "parent": {
- "href": "/domains/example.com"
}
}, - "_metadata": {
- "totalCount": 4,
- "limit": 25,
- "offset": 0
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/forwards \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "forwards": [
- {
- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": true,
- "virusChecksEnabled": true,
- "createdAt": "2023-05-08T10:01:25+00:00",
- "modifiedAt": "2023-05-08T10:01:25+00:00",
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}, - {
- "active": true,
- "destination": "destination@example.com",
- "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": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.com"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
], - "_links": {
- "self": {
- "href": "/domains/example.com/mailbox%40example.com/forwards"
}, - "parent": {
- "href": "/domains/example.com/mailbox%40example.com"
}
}, - "_metadata": {
- "totalCount": 2,
- "limit": 25,
- "offset": 0
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
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 |
{- "active": true,
- "destination": "destination@example.org",
- "source": "originating@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true
}
{- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
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'
{- "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": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
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 |
{- "active": true,
- "spamChecksEnabled": false,
- "virusChecksEnabled": true
}
{- "active": true,
- "destination": "destination@example.org",
- "source": "mailbox@example.com",
- "spamChecksEnabled": false,
- "virusChecksEnabled": true,
- "_links": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards/destination%40example.org"
}, - "collection": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/forwards"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
destination required | string |
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'
{- "value": {
- "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"
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
curl --request GET \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "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": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "parent": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
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 |
{- "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"
}
{- "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": {
- "self": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com/autoResponder"
}, - "parent": {
- "href": "/domains/example.com/mailboxes/mailbox%40example.com"
}
}
}
domainName required | string Example: example.com Domain name |
emailAddress required | string Email address |
curl --request DELETE \ --url https://api.leaseweb.com/hosting/v2/domains/example.com/mailboxes/%7BemailAddress%7D/autoResponder \ --header 'X-LSW-Auth: REPLACE_KEY_VALUE'
{- "value": {
- "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"
}
}