API Keys
Learn how to generate and manage your API keys
Getting Your API Key
API keys authenticate feature-scoped requests to NextSet APIs. Each key belongs to a business and can be limited to features such as CRM, demo creation, documents, and analytics.
- Log in to your NextSet AI dashboard
- Navigate to Settings → API Keys
- Choose a key name, environment, and feature access
- Click "Create API Key"
- Copy the key immediately (it won't be shown again)
- Store it securely in your configuration
Using Your API Key
Send API keys in the `x-api-key` header. Feature-scoped endpoints reject keys that do not include the required feature.
fetch("https://www.nextset.ai/api/v1/crm/leads/create", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "ns_live_your_key_here"
},
body: JSON.stringify({
customer_name: "Jane Customer",
customer_phone: "+15555550123",
customer_email: "jane@example.com",
service_requested: "Consultation",
outreach_events: [],
replies: []
})
});External API Routes
These routes are designed for server-to-server use. The base URL is your deployed web app origin plus `/api`.
GET /api/v1/crm/leads POST /api/v1/crm/leads POST /api/v1/crm/leads/create GET /api/v1/crm/appointments POST /api/v1/crm/appointments POST /api/v1/crm/appointments/create POST /api/v1/demo/create # Optional CRM query parameters: # business_id, status, service, search, limit # date_from and date_to are also supported for appointments. # Optional lead create fields: # outreach_events: [] # replies: []
Security Best Practices
- ✅ Never commit API keys to version control
- ✅ Use environment variables in production
- ✅ Rotate keys regularly
- ✅ Use different keys for development and production
- ✅ Revoke compromised keys immediately
Key Permissions
API keys use explicit feature scopes:
CRM
Required for lead and appointment list/create routes under `/api/v1/crm`. Prefer the `/create` paths for writes.
Create Demo
Required for `/api/v1/demo/create` to create or refresh a demo bot for the key's business.
Documents & Analytics
Enable document-processing or analytics integrations independently as needed.