Command-line examples for the Naturalead API
X-API-Key
YOUR_API_KEY
curl -s "https://api.naturalead.ai/api/leads" \ -H "X-API-Key: YOUR_API_KEY" | jq
curl -s "https://api.naturalead.ai/api/leads/search?q=john&limit=5" \ -H "X-API-Key: YOUR_API_KEY" | jq
curl -X POST "https://api.naturalead.ai/api/leads" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Jane Smith", "phone": "+14155551234", "email": "[email protected]", "tags": ["inbound", "demo"] }'
curl -X PATCH "https://api.naturalead.ai/api/leads/1" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"status": "contacted"}'
curl -X DELETE "https://api.naturalead.ai/api/leads/1" \ -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.naturalead.ai/api/leads/sync" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "leads": [ {"lead_id": "crm-001", "name": "Alice", "phone": "+1234567890", "email": "[email protected]"}, {"lead_id": "crm-002", "name": "Bob", "phone": "+0987654321"} ] }'
curl -X DELETE "https://api.naturalead.ai/api/leads/sync" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"lead_ids": ["crm-001", "crm-002"]}'
curl -X POST "https://api.naturalead.ai/api/conversations/start" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"leadId": 1, "channel": "whatsapp"}'
curl -X POST "https://api.naturalead.ai/api/conversations/CONVERSATION_ID/send" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message": "Hello, are you interested in our product?"}'
curl -s "https://api.naturalead.ai/api/conversations?status=active" \ -H "X-API-Key: YOUR_API_KEY" | jq
curl -X POST "https://api.naturalead.ai/api/campaigns" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Q1 Outreach", "agentConfigId": "AGENT_ID", "channel": "whatsapp", "leadFilter": {"statuses": ["new"], "tags": ["inbound"]}, "schedule": {"rateLimit": 10} }'
curl -X POST "https://api.naturalead.ai/api/campaigns/CAMPAIGN_ID/launch" \ -H "X-API-Key: YOUR_API_KEY"
curl -s "https://api.naturalead.ai/api/analytics/overview?range=30d" \ -H "X-API-Key: YOUR_API_KEY" | jq
curl -s "https://api.naturalead.ai/api/audit-logs?action=lead.created&limit=10" \ -H "X-API-Key: YOUR_API_KEY" | jq
curl -s "https://api.naturalead.ai/api/audit-logs/export?format=csv&from=2026-01-01" \ -H "X-API-Key: YOUR_API_KEY" \ -o audit-logs.csv