External Data API
Read-only REST API for pulling leads, conversations, tickets, visitors, and analytics into your CRM or internal systems.
Overview
The External Data API lets you pull your organization's data — leads, conversations, tickets, visitors, and analytics — into your own CRM or internal systems. Data retrieval endpoints are read-only (GET). Management endpoints (e.g. webhooks) support POST/DELETE. All endpoints are authenticated via secret API keys and scoped to your organization.
Authentication
Create a Data API key from Settings → API Keys in your dashboard. Select data as the scope. The key will have a sk_live_ prefix.
Pass the key in the X-Api-Key header or as a Bearer token:
# Option 1: X-Api-Key headercurl -H "X-Api-Key: sk_live_YOUR_KEY" https://api.nextcap.ai/api/v1/external/leads# Option 2: Authorization Bearercurl -H "Authorization: Bearer sk_live_YOUR_KEY" https://api.nextcap.ai/api/v1/external/leads
sk_live_ key in frontend code.Pagination & Filtering
All list endpoints support pagination and date filtering:
pageintegerPage number (default: 1).
per_pageintegerItems per page, 1–100 (default: 20).
created_afterISO 8601Filter items created after this date.
created_beforeISO 8601Filter items created before this date.
{"data": [ ... ],"meta": {"page": 1,"per_page": 20,"total": 142,"total_pages": 8}}
Rate Limits
Each API key has a per-minute rate limit (default: 60 rpm). Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Exceeding the limit returns 429 Too Many Requests.
Leads
curl -H "X-Api-Key: sk_live_YOUR_KEY" \"https://api.nextcap.ai/api/v1/external/leads?per_page=10&created_after=2026-01-01"