API Reference
Complete reference for the Phishivox REST API. All endpoints use JSON and require authentication unless noted otherwise.
Authentication
All API requests require a Bearer token in the Authorization header. Obtain a token by authenticating via POST /api/v1/auth/login.
Login
/api/v1/auth/loginAuthenticate with email and password. Returns a JWT access token.
curl -X POST https://api.phishivox.com/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@company.com", "password": "your-password"}'
# Response:
{
"access_token": "eyJhbGciOi...",
"token_type": "bearer"
}Using the token
Include the token in all subsequent requests:
curl https://api.phishivox.com/api/v1/scan/history \
-H "Authorization: Bearer eyJhbGciOi..."Enterprise API keys
Scan Endpoints
Scan email from JSON payload
/api/v1/scanAnalyze an email by providing sender, subject, body, and optional headers.
curl -X POST https://api.phishivox.com/api/v1/scan \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from_address": "sender@example.com",
"from_display_name": "Example Sender",
"subject": "Verify your account",
"body_text": "Click here to verify...",
"headers": {
"Authentication-Results": "spf=pass; dkim=pass; dmarc=pass"
},
"use_ai": true
}'Upload .eml file
/api/v1/scan/uploadUpload and scan a .eml file. Headers and body are parsed server-side.
curl -X POST https://api.phishivox.com/api/v1/scan/upload \
-H "Authorization: Bearer TOKEN" \
-F "file=@suspicious-email.eml" \
-F "use_ai=true"Scan from connected mailbox
/api/v1/scan/mailboxScan an email from your connected Gmail or M365 account by message ID.
Get scan result
/api/v1/scan/{scan_id}Retrieve the full scan result including all layer scores and findings.
Rescan
/api/v1/scan/{scan_id}/rescanRe-run detection on a previously scanned email. Pass {use_ai: true/false} in the body to choose between AI and non-AI scan.
Batch mailbox scan
/api/v1/scan/mailbox/batchScan up to 100 emails from a connected mailbox in one request. Emails are fetched in parallel.
Bulk scan (Enterprise)
/api/v1/scan/bulkScan up to 50 pre-parsed emails in one request. Enterprise tier only. Returns array of results.
Scan history
/api/v1/scan/historyPaginated scan history with verdict filter. Respects tier retention (7d free, 90d pro, 365d enterprise). Params: limit, offset, verdict.
Scan stats
/api/v1/scan/statsMonthly scan statistics broken down by verdict.
Quota
/api/v1/scan/quotaCurrent scan and AI quota usage for the authenticated user.
Response format
All scan endpoints return the same result structure:
{
"id": "uuid",
"verdict": "safe | spam | suspicious | phishing",
"score": 0.0 - 1.0,
"confidence": 0.0 - 1.0,
"sender_trust": 0.0 - 1.0,
"reasons": ["Finding 1", "Finding 2"],
"layer_scores": {
"rules": 0.0,
"url": 0.0,
"headers": 0.0,
"attachments": 0.0,
"ml": 0.0,
"ai": 0.0
},
"ai_brands": [],
"ai_findings": [],
"ai_recommendations": []
}Mailbox Endpoints
Connect, browse, and manage email provider integrations.
Gmail
/api/v1/mailbox/gmail/connectStart Gmail OAuth flow. Returns the authorization URL.
/api/v1/mailbox/gmail/foldersList Gmail labels/folders with message counts.
/api/v1/mailbox/gmail/emailsList emails in a folder. Supports pagination (page_token) and search (q parameter).
/api/v1/mailbox/gmail/disconnectRevoke Gmail access and remove stored tokens.
Microsoft 365
/api/v1/mailbox/m365/connectStart M365 OAuth flow. Returns the authorization URL.
/api/v1/mailbox/m365/foldersList M365 mail folders with message counts.
/api/v1/mailbox/m365/emailsList emails in a folder. Supports pagination (top/skip) and search (search parameter).
/api/v1/mailbox/m365/disconnectRemove M365 access tokens.
Status
/api/v1/mailbox/statusConnection status for all providers.
Gateway Endpoints
Enterprise gateway management. Requires org admin role.
Connections
/api/v1/gateway/connectionsList active gateway connections for the organization.
/api/v1/gateway/connections/m365Start M365 admin consent OAuth flow for gateway integration.
/api/v1/gateway/connections/{id}Disconnect a gateway connection.
/api/v1/gateway/connections/{id}/settingsUpdate gateway settings (quarantine threshold, URL rewriting scope, etc.).
Events
/api/v1/gateway/eventsPaginated list of all emails processed by the gateway.
/api/v1/gateway/events/{id}Detailed view of a single email event including scan results.
Quarantine
/api/v1/gateway/quarantineList quarantined emails with filters (date, recipient, verdict).
/api/v1/gateway/quarantine/{id}/releaseRelease a quarantined email back to the recipient's inbox.
/api/v1/gateway/quarantine/{id}/deletePermanently delete a quarantined email.
Click audit
/api/v1/gateway/clicksURL click audit log for the organization.
/api/v1/gateway/clicks/{id}Detailed click event including justification text.
Dashboard
/api/v1/gateway/dashboardOrganization-wide email security metrics and trends.
URL Proxy (Public)
/shield/r/{token}URL proxy endpoint. Redirects safe URLs, shows warning for suspicious, blocks malicious. No authentication required.
/shield/r/{token}/proceedSubmit justification and proceed to the destination URL.
Simulation Endpoints
Enterprise only
Templates
/api/v1/simulation/templatesList all simulation templates (built-in + custom for your org).
/api/v1/simulation/templatesCreate a custom phishing simulation template.
/api/v1/simulation/templates/{id}Delete a custom template (built-in templates cannot be deleted).
Campaigns
/api/v1/simulation/campaignsCreate a new simulation campaign with template and recipient list.
/api/v1/simulation/campaignsList all simulation campaigns for your organization.
/api/v1/simulation/campaigns/{id}Campaign detail with real-time stats (sent, opened, clicked).
/api/v1/simulation/campaigns/{id}/testSend a test simulation email to one address before launching.
/api/v1/simulation/campaigns/{id}/launchLaunch campaign -- sends simulation emails to all recipients.
/api/v1/simulation/campaigns/{id}/cancelCancel a running or scheduled campaign.
/api/v1/simulation/campaigns/{id}/recipientsList all recipients with send/open/click status and timestamps.
/api/v1/simulation/campaigns/{id}/exportCSV export of recipients who clicked, for training assignment.
Click Tracking (Public)
/sim/t/{token}Track link click and redirect to educational landing page. No authentication.
/sim/t/{token}/pixel.png1x1 transparent pixel for open tracking. No authentication.
API Keys
Enterprise only
API keys allow programmatic access without JWT tokens. Pass the key in the X-API-Key header instead of Authorization: Bearer.
/api/v1/api-keysGenerate a new API key. The raw key is returned only once.
/api/v1/api-keysList all API keys (shows prefix, name, last used, scopes -- not the full key).
/api/v1/api-keys/{id}Revoke an API key.
/api/v1/api-keys/{id}Update API key name or scopes.
Webhooks
Inbound (from email providers)
/webhooks/m365/notificationsMicrosoft Graph change notification receiver. Validated by client state token.
Graph notifications are validated by verifying the clientState token included in the subscription. Invalid notifications are rejected with HTTP 403.
Outbound (SIEM/SOAR integration)
Enterprise customers can configure outbound webhooks to push security events to Splunk, Microsoft Sentinel, or any SOAR platform.
Event types
email.scanned— Fired for every email processed by the gatewayemail.quarantined— Fired when an email is moved to quarantineemail.released— Fired when an admin releases a quarantined emailurl.clicked— Fired for every URL click through the proxyurl.blocked— Fired when a malicious URL is blockedurl.warned— Fired when a warning page is shown
Payload format
{
"event": "email.quarantined",
"timestamp": "2026-04-10T14:30:00Z",
"org_id": "uuid",
"data": {
"email_event_id": "uuid",
"recipient": "user@company.com",
"sender": "phisher@fake-domain.xyz",
"subject": "Verify your account immediately",
"verdict": "phishing",
"score": 0.87,
"action": "quarantined"
}
}Rate Limits & Quotas
| Tier | Scans/Month | AI Scans/Month | API Rate Limit |
|---|---|---|---|
| Community | 10 | 5 | 60 req/min |
| Professional | 2,000 | 200 | 60 req/min |
| Enterprise | 10,000+ | 10,000+ | 300 req/min |
Rate limits are per-IP. Exceeding the rate limit returns HTTP 429 with aRetry-After header. Scan quotas reset on the 1st of every month.
Error Codes
| Code | Meaning | Common Cause |
|---|---|---|
| 400 | Bad Request | Missing required fields, invalid JSON |
| 401 | Unauthorized | Missing or expired token |
| 403 | Forbidden | Scan quota exceeded, email not verified, account suspended |
| 404 | Not Found | Invalid scan ID, resource doesn't exist |
| 429 | Rate Limited | Too many requests. Check Retry-After header |
| 502 | Bad Gateway | Email provider API error (Gmail/M365) |
