API Reference
Full programmatic access to email intelligence, funnel tracking, DNS probing, variant detection, and ESP profiling. API access is restricted to Agency plan subscribers.
🔐 Agency-Only API Access
API key creation and programmatic access to all endpoints marked Agency require an active Agency plan. Starter, Growth, Pro, and Business plans use the dashboard only. Contact us to upgrade at any time.
Authentication
All API requests require a JWT in the Authorization header for dashboard-based calls, or an API secret key in X-API-Key for programmatic access.
Dashboard (JWT)
curl /intelligence/alerts \ -H "Authorization: Bearer eyJhbGc…"
Programmatic (API Key)
curl /competitors \ -H "X-API-Key: sk_live_…"
Base URL
https://app.competitorinbox.com
All endpoints are relative to this base. No /api/v1/ prefix — paths are rooted directly (e.g. /competitors, /intelligence/alerts).
Rate Limits
| Plan | Req / min | Req / day | API Keys |
|---|---|---|---|
| Starter / Growth | — | — | None |
| Pro | 60 | 10,000 | None |
| Business | 300 | 100,000 | None |
| Agency | Unlimited | Unlimited | Up to 10 |
Evidence Classification
Every AI-generated claim in intelligence responses is labeled with one of three evidence tiers:
Directly observed from email headers, DNS records, or HTML content. Zero inference.
Logically deduced from multiple corroborating data points. High probability.
Plausible interpretation not directly evidenced. Should be investigated further.
DNS probe responses are always tagged [FACT] — no AI is involved. Fabricated open rates, click rates, or revenue figures are never returned.
Authentication
Register, log in, and manage passwords. JWT tokens are returned on login and must be passed as a Bearer token.
/auth/registerCreate a new workspace account.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | string | required | Account email address | |
| password | body | string | required | Min 8 characters |
| workspaceName | body | string | required | Workspace display name |
cURL Example
curl -X POST /auth/register \
-H "Content-Type: application/json" \
-d '{"email":"you@agency.com","password":"s3cr3t!","workspaceName":"My Agency"}'/auth/loginLog in and receive a signed JWT.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | string | required | Account email | |
| password | body | string | required | Account password |
cURL Example
curl -X POST /auth/login \
-d '{"email":"you@agency.com","password":"s3cr3t!"}'Response
Returns { token, userId, email, workspaceId, workspaceName, plan, role }/auth/forgot-passwordRequest a password-reset email.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | string | required | Registered email |
/auth/reset-passwordSet a new password using a reset token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| token | body | string | required | Token from reset email |
| newPassword | body | string | required | New password |
/auth/verify-emailConfirm email address using the verification link token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| token | body | string | required | Token from verification email |
API Keys
Programmatic API access is available to Agency plan subscribers only. Each workspace can hold up to 10 active API key pairs. Pass your secret key as X-API-Key header.
/api-keysAgencyList all active API keys for the authenticated workspace.
Response
Returns array of { id, name, publicKey (pk_live_…), lastUsedAt, createdAt }. Secret key is only shown once on creation./api-keysAgencyCreate a new API key pair.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | body | string | required | Friendly key name, e.g. "Production" |
Response
Returns { publicKey: "pk_live_…", secretKey: "sk_live_…" }. Store the secret key — it cannot be retrieved again./api-keys/{id}AgencyRevoke and permanently delete an API key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string (uuid) | required | API key ID |
Competitors
Manage the list of competitor brands being monitored. Each competitor gets a unique inbound email address (e.g. brand123@in.competitorinbox.com) to subscribe to their lists.
/competitorsList all tracked competitors for the workspace.
Response
Returns { competitors: Competitor[], total }/competitors/{id}Get a single competitor with metadata and email count.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
/competitorsAdd a new competitor to track.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | body | string | required | Brand name |
| websiteUrl | body | string | optional | Competitor website URL |
| brandTags | body | string[] | optional | Custom classification tags |
/competitors/{id}Update competitor metadata.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
| name | body | string | optional | Updated name |
| isActive | body | boolean | optional | Enable/disable tracking |
/competitors/{id}Remove a competitor and all associated emails and intelligence.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
/competitors/{id}/campaignsList UTM-attributed campaign clusters detected for a competitor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Email Messages
Access captured emails, re-trigger analysis, and retrieve raw content. Emails are captured via the unique inbound address assigned to each competitor.
/emailsPaginated email list with filtering support.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| competitorId | query | uuid | optional | Filter by competitor |
| page | query | int | optional | Page number (default 1) |
| pageSize | query | int | optional | Items per page (default 50, max 200) |
| sortBy | query | string | optional | Field to sort by: receivedAt | subject |
| dateFrom | query | ISO date | optional | Filter: start date |
| dateTo | query | ISO date | optional | Filter: end date |
cURL Example
curl /emails?competitorId=uuid&page=1&pageSize=50&dateFrom=2025-01-01 \
-H "Authorization: Bearer {token}"Response
Returns { emails: EmailMessage[], total, page, pageSize }/emails/{id}Get full email with HTML content, insight block, links, and AI analysis.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
/emails/{id}/analyzeForce re-analysis of a stored email (re-runs AI enrichment and ESP fingerprinting).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
/emails/{id}/headersReturn parsed authentication headers: SPF, DKIM, DMARC results from the received email.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
Response
Returns { spfStatus, dkimStatus, dmarcStatus, receivedHeaders[], listId }/emails/{id}/screenshotReturn the stored screenshot URL for an email (if rendered).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
Analytics
Aggregate send-frequency data, CTAs, heatmaps, and per-competitor performance reports.
/analytics/overviewWorkspace-wide summary: total emails, unique competitors, CTA rate, top sender.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| competitorId | query | uuid | optional | Scope to competitor |
| dateFrom | query | ISO date | optional | Start date |
| dateTo | query | ISO date | optional | End date |
/analytics/heatmapSend-time heatmap (day × hour × count) for all tracked emails.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| dateFrom | query | ISO date | optional | Start date |
| dateTo | query | ISO date | optional | End date |
Response
Returns { heatmapData: [{ dayOfWeek, hour, count }] }/analytics/cta-domainsTop CTA link domains with click counts across all captured emails.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| limit | query | int | optional | Max results (default 20) |
/analytics/competitor/{id}/reportFull per-competitor performance report: volume, send timing, word counts, link stats, UTM usage.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
| dateFrom | query | ISO date | optional | Start date |
| dateTo | query | ISO date | optional | End date |
Brand Intelligence
AI-powered competitive intelligence: brand summaries, subject line grading, campaign pattern detection, and workspace-wide alerts. All AI claims are labeled [FACT], [INFERENCE], or [HYPOTHESIS].
/intelligence/competitor/{id}/summaryFull brand intelligence summary: strategy, promo cadence, subject patterns, and recommendations. AI narrative is returned with evidence tags.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Response
Returns BrandIntelligenceSummary { narrativeSummary (tagged), frequencyTrend, discountPattern, subjectPattern, keyInsights[], actionableRecommendations[] }/intelligence/competitor/{id}/subject-scoresScore recent subject lines for urgency, emotion, clarity, and length. Returns AI verdict per subject.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
| max | query | int | optional | Max subjects to score (5–100, default 50) |
/intelligence/alertsWorkspace-wide competitive alerts: frequency spikes, promotional surges, deep discounts, new campaign detection.
Response
Returns { alerts: AlertItem[] } sorted by severity (high → low)/intelligence/competitor/{id}/patternsDetect campaign sequences, promotional calendar, and send cadence patterns.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Sender Intelligence
Build persistent ESP and infrastructure profiles for competitor sending domains. Aggregates email header signals, DNS facts, company size estimates, and benchmark comparisons. Three intelligence tiers: email-only → raw headers → sample set (more = higher confidence).
/intelligence/competitor/{id}/sender-profileCached 24hReturn the cached sender profile (or build one if none exists). Includes ESP detection, auth signals, company size estimate, industry benchmarks, and DNS facts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Response
Returns SenderDomainProfile { espDetected, espConfidence, spfPass, dkimPass, dmarcPass, spfRecord, dmarcRecord, dkimSelectorsJson, dnsEvidenceJson, industry, businessModel, companySize, estimatedRevenueLabel, senderIntelligenceScore, narrativeSummary, authRiskScore }/intelligence/competitor/{id}/sender-profile/refreshForce a full re-analysis of the sender profile, ignoring cache. Re-runs ESP detection, DNS probe, and benchmark calculations.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
/intelligence/sender-profilesList all sender profiles visible to the workspace (Agency = workspace-scoped, superadmin = all).
/intelligence/dns-probeFACT onlyLive DNS probe for any domain. Returns SPF, DMARC, DKIM, MX, and BIMI records with an authentication risk scorecard. All results are tagged [FACT] — no AI inference.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| domain | query | string | required | Domain to probe, e.g. klaviyo.com |
| selectors | query | string | optional | Comma-separated DKIM selectors to try (defaults to 30+ common patterns) |
cURL Example
curl "/intelligence/dns-probe?domain=klaviyo.com" \
-H "Authorization: Bearer {token}"Response
Returns {
spf: { found, record, policy, hard_fail, soft_fail, includes[], ips[] },
dmarc: { found, record, policy, spf_alignment, dkim_alignment, rua, pct },
dkim: { selectors_found[], records[{ selector, key_type, key_bits }] },
mx: { records[], mailbox_provider },
bimi: { found, record },
auth_risk: { score, level, factors[] },
evidence_tag: "FACT — live DNS"
}/intelligence/competitor/{id}/dns-probeFACT onlyRun a DNS probe for a competitor's sender domain and return a structured evidence object.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Funnel Intelligence
Discover lead capture forms, track email nurture funnels, attribute emails to opt-in sources, and run AI flow analysis. Sessions track real subscriber journeys through competitor funnels.
/funnel/competitors/{id}/scanCrawl all discover-able pages on the competitor site to detect opt-in forms, popup triggers, and ESP provider scripts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Response
Returns { assetsFound, assetsNew, duration_ms }/funnel/competitors/{id}/assetsList all detected lead assets (forms, popups, exit-intent triggers) for a competitor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Response
Each asset: { id, url, leadMagnetType, triggerType, provider, isActive, copyPreview, lastSeenAt }/funnel/assets/{id}Get a single lead asset with full HTML snippet and provider detection evidence.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Asset ID |
/funnel/assets/{id}/refreshRe-crawl a specific page to check for copy changes or new form structure.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Asset ID |
Response
Returns { copyChanged: bool, changesDetected: string[] }/funnel/assets/{id}Update asset state: mark as ignored or re-enable tracking.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Asset ID |
| isIgnored | body | boolean | optional | Hide from funnel feed |
| isActive | body | boolean | optional | Mark as active/inactive |
/funnel/assets/{id}/subscribeStart a funnel session by subscribing to the opt-in form attached to this asset.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Asset ID |
| emailToUse | body | string | optional | Override inbox email to subscribe with |
Response
Creates a FunnelSession record and returns { sessionId, assetId, startedAt }/funnel/competitors/{id}/sessionsList all funnel sessions for a competitor with attribution and flow analysis data.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
/funnel/sessions/{id}Get a single session including all attributed emails in sequence order.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Session ID |
/funnel/sessions/{id}/attributeRe-run email attribution for a session. Uses time-proximity decay + header signals to attribute received emails.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Session ID |
Response
Returns { emailsAttributed, avgConfidence }/funnel/sessions/{id}/analyseRun AI flow analysis on an attributed session. Classifies flow type, detects urgency escalation, discount evolution, and dynamic content patterns.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Session ID |
Response
Returns { flowType, flowLabel, urgencyEscalation, dynamicContent, discountEvolution, aiUsed }/funnel/competitors/{id}/timelineIntelligence timeline: events log for copy changes, new assets, urgency escalations, and flow changes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
| limit | query | int | optional | Max events (default 50) |
/funnel/timeline/{id}/readMark an intelligence timeline event as read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Timeline event ID |
/funnel/competitors/{id}/comparisonCross-funnel comparison: compares all sessions for a competitor by email volume, urgency, attribution, and flow type.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Email Client Risk
Analyse HTML rendering compatibility across 10+ email clients (Gmail, Outlook 2016–2021, Apple Mail, Samsung, etc.). Returns per-client issues and a risk score.
/emails/{id}/client-riskReturn stored client risk analysis for an email.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
Response
Returns { overallRisk, clients: [{ client, severity, issues[] }] }/emails/{id}/client-risk/analyzeForce re-analysis of client compatibility for a stored email.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Email ID |
/emails/client-risk/previewAgencyAnalyse raw HTML without saving. Pass HTML + subject, get back a risk report immediately.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| htmlContent | body | string | required | Raw HTML email content |
| subject | body | string | optional | Subject line for analysis context |
Variant Detection
Cluster detected A/B subject line and content variants. Uses semantic similarity + UTM signals to group emails into campaign sequences.
/competitors/{id}/campaignsAll detected A/B variant clusters for a competitor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Response
Returns Campaign[] { utmCampaign, emailCount, linkCount, firstSeenAt, lastSeenAt, recentEmails[] }/competitors/{id}/cluster-variantsAgencyRe-run the variant clustering algorithm for a competitor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Competitor ID |
Embeddable Widgets
White-label intelligence widgets that can be embedded in client dashboards. Each widget is scoped to a competitor and can display metrics, send timings, or subject grade summaries.
/widgetsAgencyList all widgets configured for this workspace.
/widgetsAgencyCreate a new embeddable widget.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| slug | body | string | required | URL-safe identifier |
| competitorId | body | uuid | optional | Scope widget to a competitor |
| allowedDomains | body | string[] | optional | Domains allowed to embed this widget |
/widgets/{id}AgencyDelete a widget configuration.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Widget ID |
Billing
Manage subscriptions via Stripe. Use these endpoints to initiate checkout sessions and access the customer portal.
/billing/checkoutCreate a Stripe Checkout session for plan upgrade.
Response
Returns { url } — redirect user to this URL to complete payment./billing/portalCreate a Stripe Customer Portal session for subscription management.
Response
Returns { url } — redirect user to manage their plan.Notifications
In-app notification feed for intelligence alerts, new email detection, and system events.
/notificationsList recent notifications for the authenticated user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| unreadOnly | query | boolean | optional | Filter to unread only |
/notifications/{id}/readMark a notification as read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | required | Notification ID |
/notifications/read-allMark all notifications as read.
Webhooks
Inbound webhook endpoints used by Mailgun to deliver captured emails. These are infrastructure endpoints — not intended for direct API use.
/webhooks/mailgunMailgun MIME message delivery endpoint. Processes inbound emails, runs ESP fingerprinting, AI enrichment, and stores to database.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| X-Mailgun-Signature | body | string | required | Mailgun HMAC signature (auto-verified) |
Response
Internal use only — must be configured in Mailgun Routes.
Blog (Public)
Public blog endpoints. No authentication required.
/blog/postsList published blog posts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page | query | int | optional | Page number |
| pageSize | query | int | optional | Items per page |
| tag | query | string | optional | Filter by tag |
/blog/posts/{slug}Get a single blog post by slug.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| slug | path | string | required | URL slug |
Quick Start
Node.js / TypeScript
const res = await fetch(
'https://app.competitorinbox.com/competitors',
{ headers: { 'X-API-Key': process.env.CI_SECRET_KEY } }
)
const { competitors } = await res.json()Python
import httpx, os
r = httpx.get(
"https://app.competitorinbox.com/intelligence/dns-probe",
params={"domain": "klaviyo.com"},
headers={"X-API-Key": os.environ["CI_SECRET_KEY"]}
)
print(r.json()["spf"]["record"])PHP
$ch = curl_init('https://app.competitorinbox.com/competitors');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('CI_SECRET_KEY'),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);cURL — DNS Probe
curl "https://app.competitorinbox.com/intelligence/dns-probe?domain=klaviyo.com" \ -H "X-API-Key: sk_live_your_key" \ | jq '.auth_risk'