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 mananager 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

200
401

Authentication is required.

403
500
503
get/reports
https://api.leaseweb.com/abuse/v1/reports

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "reports":
    [
    ],
  • "_metadata":
    {
    }
}

Inspect a report

Authorizations:
path Parameters
reportId
required
string
Example: abc123

Report Id

Responses

200
401

Authentication is required.

403
404

Resource not found.

500
503
get/reports/{reportId}
https://api.leaseweb.com/abuse/v1/reports/{reportId}

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "id": "000005",
  • "subject": "Report description",
  • "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":
    [
    ],
  • "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

200
401

Authentication is required.

403
404

Resource not found.

500
503
get/reports/{reportId}/messages
https://api.leaseweb.com/abuse/v1/reports/{reportId}/messages

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "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

202
401

Authentication is required.

403
404

Resource not found.

500
503
post/reports/{reportId}/messages
https://api.leaseweb.com/abuse/v1/reports/{reportId}/messages

Request samples

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

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • "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

200

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

401

Authentication is required.

403
404

Resource not found.

500
503
get/reports/{reportId}/messageAttachments/{fileId}
https://api.leaseweb.com/abuse/v1/reports/{reportId}/messageAttachments/{fileId}

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "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

200

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

401

Authentication is required.

403
404

Resource not found.

500
503
get/reports/{reportId}/reportAttachments/{fileId}
https://api.leaseweb.com/abuse/v1/reports/{reportId}/reportAttachments/{fileId}

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "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

200
401

Authentication is required.

403
404

Resource not found.

500
503
get/reports/{reportId}/resolutions
https://api.leaseweb.com/abuse/v1/reports/{reportId}/resolutions

Request samples

Copy
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
Copy
Expand all Collapse all
{
  • "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

204

Accepted, no content

400

Bad request

401

Authentication is required.

403
404

Resource not found.

500
503
post/reports/{reportId}/resolve
https://api.leaseweb.com/abuse/v1/reports/{reportId}/resolve

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "resolutions":
    [
    ]
}