Developer docs
Documentation
Guides and API reference for running AntiBait analysis from the web app or from your own code.
API request headers
Required headers for authenticating and formatting API requests to AntiBait.
Required headers
| Header name | Value | Description |
|---|---|---|
Content-Type | application/json | Specifies that the request body contains JSON data |
Authorization | Bearer {token} | Your API key for authentication and authorization |
Example request with headers
curl -X POST https://antibait.io/api/analysis/advanced \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"email": "From: sender@example.com..."
}'fetch('https://antibait.io/api/analysis/advanced', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
email: 'From: sender@example.com...'
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
}
data = {
'email': 'From: sender@example.com...'
}
response = requests.post(
'https://antibait.io/api/analysis/advanced',
headers=headers,
json=data
)
print(response.json())Getting your API key
01
Create an account
Sign up for a free AntiBait account at antibait.io
02
Navigate to API settings
Go to your Account page and select the API tab
03
Generate API key
Click "Generate New API Key" and copy the key immediately (it won't be shown again)
Security best practices
Never expose your API key
Don't commit API keys to version control or expose them in client-side code
Rotate keys regularly
Generate new API keys periodically and revoke old ones
Use environment variables
Store API keys in environment variables or secure secret management systems
Server-side only
Make API requests from your backend server, never directly from browser JavaScript
Need help integrating the API? The support team replies within 24 hours on business days.