Abuse API v1

This API provides ways to manage the abuse reports you might receive from Leaseweb.

GEThttps://api.leaseweb.com/abuse/v1/reports
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "reports": [
    {
      "id": "000000",
      "subject": "Report title",
      "status": "OPEN",
      "reportedAt": "2015-01-01T00:00:00+00:00",
      "updatedAt": "2015-01-01T00:00:00+00:00",
      "notifier": "notifier@email.com",
      "customerId": "10000001",
      "legalEntityId": "2000",
      "deadline": "2015-01-01T00:00:00+00:00"
    },
    {
      "id": "000001",
      "subject": "Report title",
      "status": "CLOSED",
      "reportedAt": "2015-01-01T00:00:00+00:00",
      "updatedAt": "2015-01-01T00:00:00+00:00",
      "notifier": "notifier@email.com",
      "customerId": "10000001",
      "legalEntityId": "2600",
      "deadline": "2015-01-01T00:00:00+00:00"
    }
  ],
  "_metadata": {
    "totalCount": 2,
    "limit": 10,
    "offset": 0
  }
}

GETList all reports

This endpoint provides a list of all abuse reports you received.


The following query string parameters are available:

Name Example Description
limit 10 about limits
offset 3 offset
status Comma separated list of report statuses to filter on. (Allowed values: OPEN,WAITING,CLOSED)

The following properties describe the response:

Name Type Description
reports array An array of abuse reports.
id string The ID of the report.
subject string The subject of the report.
status string The current status of the report. (Allowed values: OPEN,WAITING,CLOSED)
reportedAt string The date and time the report was reported at.
updatedAt string The date and time the report was last updated.
notifier string The emailaddress of the notifier who reported the abuse.
customerId string The customer ID of your account.
legalEntityId string The legal entity ID of the customer account.
deadline string The deadline before when the report needs to be resolved.
_metadata object Metadata about the collection.
totalCount integer Total amount of message in this report.
limit integer The limit used to generate this response.
offset integer The offset used to generate this response.
GEThttps://api.leaseweb.com/abuse/v1/reports/abc123
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123 \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports/abc123", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "id": "000005",
  "subject": "Report Title",
  "status": "CLOSED",
  "reopened": false,
  "reportedAt": "2015-01-01T00:00:00+0100",
  "updatedAt": "2015-01-01T00:00:00+0100",
  "notifier": "notifier@email.com",
  "customerId": "10000001",
  "legalEntityId": "2000",
  "body": "string with content",
  "deadline": "2015-01-01T00:00:00+0100",
  "detectedIpAddresses": ["127.0.0.1"],
  "detectedDomainNames": [
    {
      "name":"example.com",
      "ipAddresses": [
        "93.184.216.34"
      ]
    }
  ],
  "attachments":[
    {
      "id":"1abd8e7f-0fdf-453c-b1f5-8fef436acbbe",
      "mimeType":"part/xml",
      "filename":"000001.xml"
    }
  ],
  "totalMessagesCount": 2,
  "latestMessages":[
    {
      "postedBy":"CUSTOMER",
      "postedAt":"2015-09-30T06:23:40+00:00",
      "body":"Hello, this is my first message!"
    },
    {
      "postedBy":"ABUSE_AGENT",
      "postedAt":"2015-10-08T08:25:29+00:00",
      "body":"Hi, this is our first reply.",
      "attachment": {
        "id":"436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
        "mimeType":"image/png",
        "filename":"notification.png"
      }
    }
  ]
}

GETRetrieve an abuse report

Retrieve information about an abuse report you received.


The following properties describe the response:

Name Type Description
id string The ID of the abuse report.
subject string The subject of the report.
status string The current status of the report. (Allowed values: OPEN,WAITING,CLOSED)
reopened boolean When the report status is open, this indicates if the report was reopened.
reportedAt string The date and time the report was reported at.
updatedAt string When the report was updated last.
notifier string The emailaddress of the notifier who reported the abuse.
customerId string The customer ID of your account.
legalEntityId string The legal entity ID of the customer account.
body string The report body content.
deadline string The Deadline before when the report needs to be resolved.
detectedIpAddresses array The IP-addresses detected in the report body.
detectedDomainNames array The domainnames detected in the report body.
name string The domainname.
ipAddresses array The IP-addresses the domainname resolves to.
attachments array All the files attached to the report.
id string The file ID of the attachment.
mimeType string The MIME type of the attachment.
filename string The filename of the attachment.
totalMessagesCount integer Total amount of messages in the report.
latestMessages array Array of the last 5 messages in the report.
postedBy string A string to indicating if the message was posted by the customer or the abuse agent. (Allowed values: CUSTOMER,ABUSE_AGENT)
postedAt string The timestamp when the message was posted.
body string The posted message.
attachment object A possible file attachment to the message.
id string The file ID of the attachment.
mimeType string The MIME type of the attachment.
filename string The filename of the attachment.
GEThttps://api.leaseweb.com/abuse/v1/reports/abc123/messages
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/messages \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/messages",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports/abc123/messages", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "messages":[
    {
      "postedBy":"CUSTOMER",
      "postedAt":"2015-09-30T06:23:40+00:00",
      "body":"Hello, this is my first message!"
    },
    {
      "postedBy":"ABUSE_AGENT",
      "postedAt":"2015-10-08T08:25:29+00:00",
      "body":"Hi, this is our first reply.",
      "attachment": {
        "id":"436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
        "mimeType":"image/png",
        "filename":"notification.png"
      }
    }
  ],
  "_metadata": {
    "totalCount": 2,
    "limit": 10,
    "offset": 0
  }
}

GETList abuse report messages

List all communication messages related to a specific abuse report.


The following query string parameters are available:

Name Example Description
limit 10 about limits
offset 3 offset

The following properties describe the response:

Name Type Description
messages array An array of the posted messages.
postedBy string A string to indicating if the message was posted by the customer or the abuse agent. (Allowed values: CUSTOMER,ABUSE_AGENT)
postedAt string The timestamp when the message was posted.
body string The posted message.
attachment object A possible file attachment to the message.
id string The file ID of the attachment.
mimeType string The MIME type of the attachment.
filename string The filename of the attachment.
_metadata object Metadata about the collection.
totalCount integer Total amount of message in this report.
limit integer The limit used to generate this response.
offset integer The offset used to generate this response.
POSThttps://api.leaseweb.com/abuse/v1/reports/abc123/messages
REQUEST EXAMPLE
curl --request POST \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/messages \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424' \
  --header 'content-type: application/json' \
  --data '{
  "body":"Hello, this is my first message."
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/messages",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{  \"body\":\"Hello, this is my first message.\"}",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

payload = "{  \"body\":\"Hello, this is my first message.\"}"

headers = {
    'X-LSW-Auth': "213423-2134234-234234-23424",
    'content-type': "application/json"
    }

conn.request("POST", "/abuse/v1/reports/abc123/messages", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'
request["content-type"] = 'application/json'
request.body = "{  \"body\":\"Hello, this is my first message.\"}"

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
202 Accepted
[
  "To make sure the request has been processed please see if the message is added to the list."
]

POSTCreate new message

Sent a new message to the Leaseweb compliance team related to an abuse report.


The following properties should be part of the request:

Name Type Required Description
body string true Plain text body of the message, for newlines use ' '.

The following properties describe the response:

Name Type Description
GEThttps://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/213423-2134234-234234-23424
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/213423-2134234-234234-23424 \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/213423-2134234-234234-23424",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports/abc123/messageAttachments/213423-2134234-234234-23424", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/213423-2134234-234234-23424")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK

Media type can be different per file because of its contents.

GETGet message attachment

The compliance team sometimes add an attachment to a message. You can use this endpoint to get the attachment. The content-type of the response depends on the content of the attachment.

GEThttps://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/213423-2134234-234234-23424
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/213423-2134234-234234-23424 \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/213423-2134234-234234-23424",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports/abc123/reportAttachments/213423-2134234-234234-23424", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/213423-2134234-234234-23424")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK

Media type can be different per file because of its contents.

GETGet report attachment

Use this endpoint to get an attachment which was created with the abuse report. The content-type of the response depends on the content of the attachment.

GEThttps://api.leaseweb.com/abuse/v1/reports/abc123/resolutions
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-LSW-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/abuse/v1/reports/abc123/resolutions", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "resolutions": [
    {
        "id": "CONTENT_REMOVED",
        "description": "The mentioned content has been removed."
    },
    {
        "id": "DOMAINS_REMOVED",
        "description": "The mentioned domain(s) has/have been removed from the LeaseWeb network."
    },
    {
        "id": "SUSPENDED",
        "description": "The end customer (or responsible user) has been suspended."
    },
    {
        "id": "DUPLICATE",
        "description": "This is either a duplicate or old notification and has already been resolved."
    }
  ]
}

GETList resolution options

In order to resolve a report, you need to specify a resolution. Use this endpoint to retrieve a list of all possible resolution options.


The following properties describe the response:

Name Type Description
resolutions array Possible resolutions to resolve this report with.
id string The resolution ID to be used when calling /resolve.
description string The actual text the report will be resolved with when resolving with this resolution.
POSThttps://api.leaseweb.com/abuse/v1/reports/abc123/resolve
REQUEST EXAMPLE
curl --request POST \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/resolve \
  --header 'X-LSW-Auth: 213423-2134234-234234-23424' \
  --header 'content-type: application/json' \
  --data '{
  "resolutions": [
    "CONTENT_REMOVED",
    "SUSPENDED"
  ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/abuse/v1/reports/abc123/resolve",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{  \"resolutions\": [    \"CONTENT_REMOVED\",    \"SUSPENDED\"  ]}",
  CURLOPT_HTTPHEADER => array(
    "X-LSW-Auth: 213423-2134234-234234-23424",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

payload = "{  \"resolutions\": [    \"CONTENT_REMOVED\",    \"SUSPENDED\"  ]}"

headers = {
    'X-LSW-Auth': "213423-2134234-234234-23424",
    'content-type': "application/json"
    }

conn.request("POST", "/abuse/v1/reports/abc123/resolve", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/abuse/v1/reports/abc123/resolve")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["X-LSW-Auth"] = '213423-2134234-234234-23424'
request["content-type"] = 'application/json'
request.body = "{  \"resolutions\": [    \"CONTENT_REMOVED\",    \"SUSPENDED\"  ]}"

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
204 No Content

Accepted, no content

POSTResolve an abuse report

To resolve a report, do a POST call to do this endpoint and add at least one of the resolutions possible. To retrieve the possible resolutions, do a GET call to resolutions.


The following properties should be part of the request:

Name Type Required Description
resolutions array true List of selected resolution ID's to explain how the report is resolved.