API Quick Start

Authorization

Requests are authenticated using API keys. While API keys are not a requirement for using the API, any request that doesn't include an API key will suffer lower rate limits. Please contact us via email or discord to obtain an API key.

You can provide your API key in the form of the Authorization header or the token url parameter.

https://api.safelink.gg/v1/check?token=YOUR_API_TOKEN
Authorization: YOUR_API_KEY

Identification

While we love that you are using our API, we would like to know who you are. If you do not have an API key, you must provide an identity to make requests.

You can provide your identity using the User-Agent or X-Identity headers. We would like your identity to follow this schema:

$ApplicationName ($url, $version)

For example:

User-Agent: SafeLinkBot (https://safelink.gg, 2.0)

By far the simplest way to scan links is to just send a POST request with the links you would like scanned. You will receive a list of Scan objects with flags and other metadata you can use to classify the links.

POST https://api.safelink.gg/v1/check

Submits links to scan. The connection will be kept open until the links are done scanning. No polling is necessary. For more information on scans refer to the Scan object

Request Body

Name
Type
Description

urls*

Array

An array of link strings.

timeout

float

Time in seconds until cutting the request short and returning whatever data was gathered.

Take a look at how you might call this method:

curl https://api.safelink.gg/v1/check
    -H "Authorization: YOUR_API_KEY"  
    -d "urls[]=https://example.com"  

Reporting

If you detect or think that a link or domain should be flagged, but isn't, you can submit it with the proper flags here to be looked over by the SafeLink team.

POST https://api.safelink.gg/v1/report

Submits links for review.

Request Body

Name
Type
Description

reports*

Array

An array of Report objects.

{
    "status": 200,
    "data": {}
}

Last updated

Was this helpful?