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

Runtime SDK - API Key

The SDK uses a per-app snk_live_... runtime API key to authenticate telemetry ingestion and firewall sync. npx securenow app connect writes it to.securenow/runtime.json; admin login is separate.

javascript
import { SecureNow } from "securenow";

const securenow = new SecureNow({
  apiKey: "snk_live_replace_me",
});

Base URLs

EnvironmentURLUse
Production APIhttps://api.securenow.aiAll API requests
Dashboardhttps://app.securenow.aiUser login, settings
OTLP Endpointhttps://ingest.securenow.aiTrace 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@latest
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, body capture, firewall), CLI binary, MCP server, and framework integrations. Install the latest package, then connect with the credentials-first login flow.

Project dependency

npm install securenow@latest

Global CLI

npm install -g securenow@latest

Connect

npx securenow login
Current flow: npx securenow login picks or creates the app, enables the firewall, and writes runtime app config plus the runtime API key to .securenow/runtime.json. Admin/control-plane auth lives separately in .securenow/admin.json. Environment variables are not required for SDK runtime setup.
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
# Connect once. This writes .securenow/runtime.json.
npx securenow login

# Then 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',
  }],
};

Runtime Configuration

SecureNow boots from .securenow/runtime.json locally, then legacy/generated runtime credential files. Production should mount the tokenless runtime export as .securenow/credentials.json or .securenow/credentials.<env>.json.

VariableDefaultDescription
.securenow/runtime.jsonlocal SDK runtimeGenerated by `npx securenow login` or `npx securenow app connect`. Stores app identity, runtime API key, ingest routing, and SDK defaults.
.securenow/admin.jsonadmin CLI/MCPGenerated by `npx securenow admin login` or the friendly login flow. Stores admin/control-plane auth only.
.securenow/credentials.jsonlegacy/prod mountLegacy combined credentials are still read. Production should mount the tokenless runtime export here when needed.
.securenow/credentials.<env>.jsonproduction exportGenerated by `npx securenow credentials runtime --env production`; accepted directly when credentials.json is absent.

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 SecureNow AI IPDB 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
securenowIpdbobjectSecureNow AI IPDB data: confidenceScore, countryCode, isp, domain, totalReports, recentReports
sourcesstring[]Data sources used (SecureNow AI IPDB, 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 SecureNow AI IPDB confidence score (95%)",
    "Known Tor exit node",
    "Over 500 community abuse reports"
  ],
  "botVsHumanAnalysis": "Traffic patterns are consistent with automated scanning tools...",
  "securenowIpdb": {
    "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": ["securenow-ipdb", "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, SecureNow AI IPDB-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: "snk_live_replace_me",
});

// 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.