SecureNow API Docs

SecureNow API Documentation

The SecureNow API provides AI-powered threat intelligence, IP reputation scoring, and security automation for your applications. Public endpoints require no authentication.

🔓

Free Public API

No API key needed. Query IP intelligence instantly.

🤖

AI-Powered

Threat verdicts, bot detection, and attack classification.

Real-Time

Sub-second responses with 24h intelligent caching.

Authentication

Public API — No Auth Required

All endpoints under /api/public/* are free and require no authentication. Just send a request and get results.

Authenticated API — Bearer Token

Platform endpoints require a Bearer token. Obtain one by signing into the SecureNow dashboard or by using the CLI.

bash
# CLI login (generates a session token)
npx securenow login

# Use the token in requests
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.securenow.ai/api/applications

Firewall SDK — API Key

The firewall integration uses your application's API key (found in the dashboard) passed as a Bearer token. This is a per-app key, not a user session.

javascript
import { SecureNow } from "securenow";

const securenow = new SecureNow({
  apiKey: process.env.SECURENOW_API_KEY,
});

Base URLs

EnvironmentURLUse
Production APIhttps://api.securenow.aiAll API requests
Dashboardhttps://app.securenow.aiUser login, settings
OTLP Endpointhttps://freetrial.securenow.ai:4318Trace ingestion (OpenTelemetry)

Rate Limits

Rate limits are applied per client IP address. Exceeding the limit returns a 429 status with a retryAfter field indicating seconds to wait.

EndpointLimitCache
/api/public/ip-intel/:ip10 req/min1 hour (public), 24h (server)
/api/public/ip-intel/recent-ips2 req/min24 hours
/api/public/ip/:ip10 req/min1 hour
Authenticated endpointsVaries by plan

Error Handling

All errors return a JSON body with an error field. HTTP status codes follow standard conventions.

StatusMeaningExample
400Bad Request{ "error": "Only IPv4 addresses are currently supported" }
401Unauthorized{ "error": "Authentication required" }
404Not Found{ "error": "Resource not found" }
429Rate Limited{ "error": "Rate limit exceeded. Max 10 requests per minute.", "retryAfter": 60 }
500Server Error{ "error": "Failed to fetch IP intelligence" }

SDKs & Collections

📦

npm Package

CLI + SDK for Node.js, Next.js, Nuxt, and Express.

bash
npm install securenow
View on npm →
🟠

Postman Collection

Import into Postman or Insomnia. All endpoints pre-configured.

📄

OpenAPI Spec

OpenAPI 3.1 spec for code generation and tooling.

View openapi.json

SDK Setup

Install the npm package and integrate with your framework. See also: CLI Reference | Download SKILL.md files

Installation

The securenow package includes the SDK (tracing, logging, firewall), CLI binary, and all framework integrations.

Project dependency

npm install securenow

Global CLI

npm install -g securenow

One-off

npx securenow help
Requires: Node.js 18+. CommonJS package, works on macOS, Linux, and Windows.

Framework Integration

Pick your framework below. Most need zero code changes — just a preload flag or one config line.

Express / Node

0 lines changed
bash
# Just add the preload flag — zero code changes
node -r securenow/register src/index.js

# Or use the CLI
npx securenow run src/index.js

# PM2 ecosystem.config.cjs
module.exports = {
  apps: [{
    script: './app.js',
    node_args: '-r securenow/register',
    env: {
      SECURENOW_APPID: 'my-app',
      SECURENOW_INSTANCE: 'https://your-collector:4318',
    },
  }],
};

Environment Variables

Every variable the securenow npm package reads at runtime. Set in .env, .env.local, or your hosting provider.

VariableDefaultDescription
SECURENOW_APPID(auto)Application / service name. Without SECURENOW_NO_UUID=1, a UUID suffix is appended.
SECURENOW_INSTANCEfreetrial.securenow.ai:4318OTLP collector base URL. Traces → /v1/traces, Logs → /v1/logs.

Public API Reference

Free endpoints — no authentication required.

Get IP Intelligence

GEThttps://api.securenow.ai/api/public/ip-intel/{ip}

Returns a comprehensive AI-powered threat report for any IPv4 address. Combines SecureNow's proprietary scoring, AI analysis, bot detection, attack classification, and AbuseIPDB community data into a single response.

Path Parameters

NameTypeRequiredDescription
ipstringREQUIREDIPv4 address to analyze (e.g. "185.220.101.1")

Response Fields

FieldTypeDescription
ipstringThe queried IP address
securenowScoreintegerComposite threat score (0 = clean, 100 = highly malicious)
verdictstringAI-generated threat verdict (e.g. "Malicious - Automated Scanner", "Clean")
isMaliciousbooleanWhether the IP is classified as malicious
isBotboolean | nullWhether traffic is bot/automated (null if unknown)
activityTypestringType of activity observed (e.g. "Automated Scanning")
attackTypesstring[]Array of attack categories (Port Scan, Brute Force, etc.)
summarystringHuman-readable AI analysis summary
riskFactorsstring[]List of risk factors contributing to the score
botVsHumanAnalysisstringDetailed bot vs human classification reasoning
abuseipdbobjectAbuseIPDB data: confidenceScore, countryCode, isp, domain, totalReports, recentReports
sourcesstring[]Data sources used (abuseipdb, securenow-internal, securenow-ai)
lastUpdatedAtstring (ISO 8601)Timestamp of last data refresh

Code Examples

bash
curl -s "https://api.securenow.ai/api/public/ip-intel/185.220.101.1" | jq .

Example Response

json
{
  "ip": "185.220.101.1",
  "securenowScore": 87,
  "verdict": "Malicious - Automated Scanner",
  "isMalicious": true,
  "isBot": true,
  "activityType": "Automated Scanning",
  "attackTypes": ["Port Scan", "Brute Force", "Web Application Attack"],
  "summary": "This IP has been widely reported for automated scanning and brute force attacks...",
  "riskFactors": [
    "High AbuseIPDB confidence score (95%)",
    "Known Tor exit node",
    "Over 500 community abuse reports"
  ],
  "botVsHumanAnalysis": "Traffic patterns are consistent with automated scanning tools...",
  "abuseipdb": {
    "abuseConfidenceScore": 95,
    "countryCode": "DE",
    "countryName": "Germany",
    "domain": "torproject.org",
    "isp": "Tor Exit Node",
    "usageType": "Hosting/Transit/CDN",
    "totalReports": 543,
    "lastReportedAt": "2026-03-13T10:30:00Z",
    "recentReports": [
      {
        "reportedAt": "2026-03-13T10:30:00Z",
        "categories": [14, 15],
        "comment": "Port scan and SSH brute force attempts"
      }
    ]
  },
  "sources": ["abuseipdb", "securenow-internal", "securenow-ai"],
  "lastUpdatedAt": "2026-03-13T12:00:00Z"
}

Get Recent IPs

GEThttps://api.securenow.ai/api/public/ip-intel/recent-ips

Returns a list of recently analyzed IP addresses. Useful for building sitemaps or discovering trending threat IPs. Heavily cached (24 hours) and more strictly rate-limited.

Rate limit: 2 requests per minute. Response is cached for 24 hours.

Example Response

json
{
  "ips": [
    "185.220.101.1",
    "45.33.32.156",
    "103.152.220.44",
    "192.42.116.16"
  ]
}
bash
curl -s "https://api.securenow.ai/api/public/ip-intel/recent-ips" | jq .

Get IP Data (Legacy)

GEThttps://api.securenow.ai/api/public/ip/{ip}
Deprecated: This endpoint returns a flatter, AbuseIPDB-compatible response shape. Use /api/public/ip-intel/{ip} instead for the full AI-powered analysis.

Returns basic IP reputation data in a simplified format compatible with older integrations.

Path Parameters

NameTypeRequiredDescription
ipstringREQUIREDIPv4 address to look up

Example Response

json
{
  "ip": "185.220.101.1",
  "abuseConfidenceScore": 95,
  "countryCode": "DE",
  "isp": "Tor Exit Node",
  "domain": "torproject.org",
  "totalReports": 543,
  "lastReportedAt": "2026-03-13T10:30:00Z"
}

Authenticated API Reference

These endpoints require a Bearer token. Obtain one through the dashboard or via npx securenow login.

Applications

GEThttps://api.securenow.ai/api/applications
Auth Required

Manage your monitored applications. Create, update, delete applications and retrieve their API keys for integration.

MethodPathDescription
GET/api/applicationsList all applications
POST/api/applicationsCreate a new application
GET/api/applications/:idGet application by ID
PUT/api/applications/:idUpdate an application
DELETE/api/applications/:idDelete an application
POST/api/applications/bulkBulk operations on applications
GET/api/applications/:id/ipsList IPs hitting this application
POST/api/applications/:id/detect-techDetect application tech stack

Traces

GEThttps://api.securenow.ai/api/traces
Auth Required

Access HTTP request traces collected by the SecureNow SDK. View individual traces, analyze suspicious requests with AI, and investigate incidents.

MethodPathDescription
GET/api/tracesList traces (supports filtering & pagination)
GET/api/traces/:traceIdGet a single trace by ID
POST/api/analyze-traceStart AI analysis on a trace
GET/api/analyze-trace/:analysisIdGet analysis results

Analytics

GEThttps://api.securenow.ai/api/analytics
Auth Required

Retrieve aggregated security analytics for your applications. Response codes, error rates, and traffic patterns broken down by status category.

MethodPathDescription
GET/api/analytics/2xx-responsesSuccessful responses over time
GET/api/analytics/3xx-responsesRedirect responses over time
GET/api/analytics/4xx-responsesClient error responses
GET/api/analytics/5xx-responsesServer error responses
GET/api/analytics/500-errorsDetailed 500-level errors

Forensics

POSThttps://api.securenow.ai/api/forensics/query
Auth Required

AI-powered security forensics. Ask questions in natural language and get structured results from your trace data. Supports chat-based investigations and saved query libraries.

MethodPathDescription
POST/api/forensics/queryExecute a natural language query
GET/api/forensics/query/status/:jobIdCheck query execution status
POST/api/forensics/chatStart or continue a chat investigation
GET/api/forensics/chat/status/:idGet chat response status
POST/api/forensics/chat/confirm/:idConfirm a suggested action
GET/api/forensics/conversationsList saved conversations
GET/api/forensics/conversations/:idGet conversation history
GET/api/forensics/query-libraryList saved query templates
POST/api/forensics/query-library/executeExecute a saved query

Example: Natural Language Query

bash
curl -X POST https://api.securenow.ai/api/forensics/query \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "Show me all suspicious IPs from the last 24 hours"}'

Alert Rules & Channels

GEThttps://api.securenow.ai/api/alert-rules
Auth Required

Configure security alert rules, notification channels (Slack, email, webhooks), and review alert history.

MethodPathDescription
GET/api/alert-rulesList alert rules
POST/api/alert-rulesCreate an alert rule
PUT/api/alert-rules/:idUpdate an alert rule
DELETE/api/alert-rules/:idDelete an alert rule
GET/api/alert-channelsList notification channels
POST/api/alert-channelsCreate a notification channel
GET/api/alert-historyList alert history
GET/api/alert-history/:idGet alert details
GET/api/notificationsList notifications
POST/api/notifications/read-allMark all notifications read

Blocklist & Allowlist

GEThttps://api.securenow.ai/api/blocklist
Auth Required

Manage IP blocklists and allowlists for your applications. Block known threats automatically or whitelist trusted IPs and services.

MethodPathDescription
GET/api/blocklistList blocked IPs
POST/api/blocklistAdd IP to blocklist
GET/api/allowlistList allowed IPs
POST/api/allowlistAdd IP to allowlist
GET/api/trusted-ipsList trusted IPs
POST/api/trusted-ipsAdd a trusted IP

Firewall

GEThttps://api.securenow.ai/api/firewall
Auth Required

Real-time firewall integration endpoints. Used by the SecureNow SDK to sync blocklists and allowlists with your application's firewall middleware.

MethodPathDescription
GET/api/v1/firewall/statusGet firewall status
GET/api/v1/firewall/check/:ipCheck if an IP is blocked
GET/api/v1/firewall/blocklistGet full blocklist
GET/api/v1/firewall/allowlistGet full allowlist
GET/api/v1/firewall/blocklist/versionGet blocklist version (for sync)
GET/api/v1/firewall/allowlist/versionGet allowlist version (for sync)

SDK Integration

javascript
// Next.js middleware integration
import { SecureNow } from "securenow";

const securenow = new SecureNow({
  apiKey: process.env.SECURENOW_API_KEY,
});

// In your middleware
export async function middleware(request) {
  const ip = request.headers.get("x-forwarded-for");
  const result = await securenow.checkIp(ip);

  if (result.blocked) {
    return new Response("Forbidden", { status: 403 });
  }
}

Need Help?

Join our community, check out the blog, or contact us for enterprise support and custom integrations.