Safe API Documentation
Integrate our security tools into your applications.
You get 3 free checks per month per IP address.
SDKs
This documentation is for the HTTP API. If you're looking for an SDK, you can find it in our GitHub:
Authentication
All API endpoints support optional authentication via Key Code in the request body.
Safe Link Checker API
Check if a URL is safe to visit.
Endpoint
POST /safe-link-checker
Request Headers
Content-Type: application/json
Accept: application/json
Request Body
{
"link": "https://example.com",
"key_code": "optional-key-code" // Optional
}
Response
{
"url": "https://example.com",
"result": 8, // -2 = no checks left, -1 = error, 0-3 = dangerous, 4-7 = warning, 8-10 = safe
"result_text": "This link looks safe to click. Nevertheless, always be careful.",
"date": "2025-01-01T00:00:00.000Z",
"analysis": {
"domain_reputation": "Domain has good reputation",
"source_code": "No malicious code detected",
"anti_virus": "No threats detected"
},
"checks_remaining": 2
}
Example Usage
curl -X POST https://safelyx.com/safe-link-checker \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"link": "https://example.com", "key_code": "your-key-code"}'
Safe Email Checker API
Check if an email address is legitimate.
Endpoint
POST /safe-email-checker
Request Headers
Content-Type: application/json
Accept: application/json
Request Body
{
"email": "user@example.com",
"key_code": "optional-key-code" // Optional
}
Response
{
"email": "user@example.com",
"result": 8, // -2 = no checks left, -1 = error, 0-3 = dangerous, 4-7 = warning, 8-10 = safe
"result_text": "This email address looks legitimate. Nevertheless, always be careful.",
"date": "2025-01-01T00:00:00.000Z",
"analysis": {
"address": "The email address is valid",
"domain_reputation": "Domain has good reputation",
"mx_records": "Valid MX records found"
},
"checks_remaining": 2
}
Example Usage
curl -X POST https://safelyx.com/safe-email-checker \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email": "user@example.com", "key_code": "your-key-code"}'
Safe Message Checker API
Check if a message is safe to send.
Endpoint
POST /safe-message-checker
Request Headers
Content-Type: application/json
Accept: application/json
Request Body
{
"message": "Hello, world!",
"key_code": "optional-key-code", // Optional
"skip_link_and_email_checks": false // Optional
}
Response
{
"message": "Hello, world!",
"result": 8, // -2 = no checks left, -1 = error, 0-3 = dangerous, 4-7 = warning, 8-10 = safe
"result_text": "This message is safe to send.",
"date": "2025-01-01T00:00:00.000Z",
"analysis": {
"content": "This message is safe to send.",
"sentiment": "neutral",
"links": [], // If there are any links in the message, each result will be the same as the response from the safe-link-checker endpoint, here
"emails": [] // If there are any emails in the message, each result will be the same as the response from the safe-email-checker endpoint, here
},
"checks_remaining": 2
}
Example Usage
curl -X POST https://safelyx.com/safe-message-checker \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"message": "Hello, world!", "key_code": "your-key-code", "skip_link_and_email_checks": false}'
Safe Image Checker API
Check if an image is safe to display.
Endpoint
POST /safe-image-checker
Request Headers
Content-Type: application/json
Accept: application/json
Request Body
{
"image_url": "https://example.com/image.jpg",
"key_code": "optional-key-code", // Optional
}
Response
{
"image_url": "https://example.com/image.jpg",
"result": 8, // -2 = no checks left, -1 = error, 0-3 = dangerous, 4-7 = warning, 8-10 = safe
"result_text": "This image is safe to display.",
"date": "2025-01-01T00:00:00.000Z",
"analysis": {
"description": "This image is a picture of a cat.",
"link": { // This is the result of the safe-link-checker endpoint
"url": "https://example.com/image.jpg",
"result": 8, // -2 = no checks left, -1 = error, 0-3 = dangerous, 4-7 = warning, 8-10 = safe
"result_text": "This link is safe to visit.",
"date": "2025-01-01T00:00:00.000Z",
"analysis": {
"domain_reputation": "Domain has good reputation.",
"source_code": "N/A",
"anti_virus": "No threats detected."
}
}
},
"checks_remaining": 2
}
Example Usage
curl -X POST https://safelyx.com/safe-image-checker \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"image_url": "https://example.com/image.jpg", "key_code": "your-key-code"}'
Need Help?
If you need assistance integrating our API or have any questions, please contact our support team.
Frequently asked questions
Have a different question and can't find the answer you're looking for? Reach out to our support team by sending us an email and we'll get back to you as soon as we can.
- Is it free?
- You can perform up to 3 checks per month for free. Note this is a limit enforced per IP address. Purchase a key code to perform additional checks.
- Do you keep any logs?
- According to our privacy policy, we only keep track of how many checks a given key code or IP has used, and we cache a check's results for less than a day.
- How do these tools work?
- Safe Link and Safe Email analyze the shared URL and check it against multiple databases of known phishing and malicious websites and email addresses. If it's not present in any of them, additional checks are performed (anti-virus, source code analysis with AI, etc.).
Safe Message analyzes the message content with AI (checking for potentially harmful content, sentiment analysis, etc.), plus any links and emails present in the message will be checked with Safe Link and Safe Email as well.
Safe Image analyzes the image URL with Safe Link and then uses AI to analyze the image content (checking for potentially illicit or harmful content, etc.).