LeaseWeb API for Abuse Handling (v1)

The base URL for this API is: https://api.leaseweb.com/abuse/v1/

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

LIMITED ACCESS
To use this API, please request access via your account manager and/or compliance officer.

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.

Abuse reports

List reports

Authorizations:
query Parameters
limit
integer
Default: 10

Limit the number of results returned

offset
integer
Default: 0

Return results starting from the given offset

status
string
Default: "OPEN,WAITING,CLOSED"
Example: status=OPEN,WAITING,CLOSED

Comma separated list of report statuses to filter on.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/abuse/v1/reports?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

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

Inspect a report

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123 \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "id": "000005",
  • "subject": "Report description",
  • "status": "CLOSED",
  • "abuseType": "MALWARE",
  • "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": [
    ],
  • "detectedDomainNames": [
    ],
  • "attachments": [
    ],
  • "totalMessagesCount": 2,
  • "latestMessages": [
    ]
}

List report messages

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

query Parameters
limit
integer
Default: 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/abuse/v1/reports/abc123/messages?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

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

Create new message

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

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

Request Body schema: application/json
body
required
string

Plain text body of the message, for newlines use ' '.

Responses

Request samples

Content type
application/json
{
  • "body": "Hello, this is my first message."
}

Response samples

Content type
application/json
[
  • "To make sure the request has been processed please see if the message is added to the list."
]

Inspect a 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.

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

fileId
required
string
Example: sdfa73-adsfs-4fadf-sdfasdfa

File Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/sdfa73-adsfs-4fadf-sdfasdfa \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorCode": "ACCESS_DENIED",
  • "errorMessage": "The access token is expired or invalid."
}

Inspect a 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.

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

fileId
required
string
Example: sdfa73-adsfs-4fadf-sdfasdfa

File Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/sdfa73-adsfs-4fadf-sdfasdfa \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "errorCode": "ACCESS_DENIED",
  • "errorMessage": "The access token is expired or invalid."
}

List 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 for this report.

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions \
  --header 'x-lsw-auth: REPLACE_KEY_VALUE'

Response samples

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

Resolve a report

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

Request Body schema: application/json
resolutions
required
Array of strings

List of selected resolution ID's to explain how the report is resolved.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "errorCode": "BAD_REQUEST",
  • "errorMessage": "Resolutions are required."
}