Leads
Configure lead properties and information
Introduction
Leads represent the people you want to call. You can create leads when creating calls, or reference existing leads by ID. Understanding lead configuration helps ensure calls are made with the right settings and information.
Required Fields
| Field | Type | Description |
|---|---|---|
phone_number | string | Phone number with country code (max 50 characters, will be normalized to E.164) |
Optional Fields
Language
Specify the language for the call. Supported languages:
| Language | Value |
|---|---|
| English | english |
| Arabic | arabic |
| Polish | polish |
| Hindi | hindi |
{
"lead": {
"phone_number": "+15551234567",
"language": "english"
}
}If not specified, the default language from your account settings will be used.
Priority
Set lead priority to help prioritize call scheduling:
| Priority | Value |
|---|---|
| Low | low |
| Medium | medium |
| High | high |
Higher priority leads may be called before lower priority leads when scheduling conflicts occur.
{
"lead": {
"phone_number": "+15551234567",
"priority": "high"
}
}Country
Where the lead is from, provide the ISO 3166-1 alpha-2 country code:
{
"lead": {
"phone_number": "+15551234567",
"country": "US"
}
}If this isn't provided, Kejue will automatically determine the country from the phone number.
Contact Information
Provide additional contact details:
| Field | Type | Max Length | Description |
|---|---|---|---|
first_name | string | 100 | Lead's first name |
last_name | string | 100 | Lead's last name |
email | string | 255 | Lead's email address |
{
"lead": {
"phone_number": "+15551234567",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}
}Notes
Add additional information about the lead:
{
"lead": {
"phone_number": "+15551234567",
"notes": "Customer requested callback after business hours. Interested in enterprise plan."
}
}Notes are stored with the lead and can be referenced in future calls. This is useful for:
- Recording previous interactions
- Storing important preferences
- Tracking lead status
- Providing context for assistants
Phone Number Format
Phone numbers should include the country code. Kejue will automatically normalize them to E.164 format:
+15551234567(US number with country code)+442071234567(UK number with country code)+33123456789(France number with country code)
The system will:
- Normalize formatting
- Validate the number
- Determine the country and timezone automatically
Creating Leads with Calls
You can create a lead when creating a call:
{
"lead": {
"phone_number": "+15551234567",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"country": "US",
"language": "english",
"priority": "medium",
"notes": "Initial contact from website form"
},
"call": {
"assistant_group_id": "grp_abc123"
}
}Using Existing Leads
If a lead already exists, reference it by lead_id:
{
"lead_id": 123,
"call": {
"assistant_group_id": "grp_abc123"
}
}Examples
Minimal Lead (Phone Only)
{
"lead": {
"phone_number": "+15551234567"
},
"call": {
"assistant_group_id": "grp_abc123"
}
}Complete Lead Information
{
"lead": {
"phone_number": "+15551234567",
"first_name": "Alice",
"last_name": "Johnson",
"email": "alice@example.com",
"country": "US",
"language": "english",
"priority": "high",
"notes": "VIP customer, previous purchase history, interested in enterprise upgrade"
},
"call": {
"assistant_group_id": "grp_abc123",
"context": "VIP customer with previous purchase"
}
}Campaign with Multiple Leads
{
"leads": [
{
"phone_number": "+15551234567",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"country": "US",
"language": "english"
},
{
"phone_number": "+442071234567",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"country": "GB",
"language": "english"
}
],
"schedule": {
"name": "International Campaign"
}
}Best Practices
- Always include country code: Ensures accurate timezone and routing
- Provide language when known: Helps route to the right assistant
- Use notes for context: Store important information for future calls
- Set priority appropriately: Helps with scheduling and resource allocation
- Include contact information: Enables better personalization and follow-up
Related Guides
- Calls - Learn about creating individual calls
- Campaigns - Learn about batch campaigns
- Call Context - Provide additional context to assistants
- Assistants - Configure assistant language matching
API Reference
- Create Call - Full API documentation
- Create Campaign - Campaign lead options
Last updated on

