Endpoint Overview
This endpoint allows users to check whether a given domain, email, or TLD is blacklisted, greylisted, or whitelisted.
HTTP Method: GET
Route: /api/1.0/check/{type}/{list}/{value}
Path Parameters
Parameter | Type | Description |
---|---|---|
{type} |
String | The type of resource to check. Allowed values: domain , email , tld . |
{list} |
String | The list to check against. Allowed values: blacklist , greylist , whitelist . |
{value} |
String | The actual value to check (e.g., a domain name, email address, or TLD). |
Responses
Status Code | Description |
---|---|
200 | Success. The resource was found, and its status is included in the response. |
400 | Bad Request. The provided parameters are invalid (e.g., unsupported type or list). |
404 | Not Found. The resource (e.g., domain, email, or TLD) does not exist in the database. |
Response Format
The response is returned in JSON format. Below is an example:
{ "type": "domain", "value": "example.com", "status": true, "generated": "2024-12-01 12:00:00" }
Cache
The endpoint uses caching to improve performance. Results are cached for 1 hour.
Error Handling
The endpoint returns detailed error messages in the following scenarios:
- Invalid
type
: Returns a 400 status with a message specifying that the type is not allowed. - Invalid
list
: Returns a 400 status with a message specifying that the list is not allowed. - Empty
value
: Returns a 400 status with a message indicating that the value is empty. - Resource not found: Returns a 404 status with an appropriate error message.