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

FieldTypeDescription
phone_numberstringPhone number with country code (max 50 characters, will be normalized to E.164)

Optional Fields

Language

Specify the language for the call. Supported languages:

LanguageValue
Englishenglish
Arabicarabic
Polishpolish
Hindihindi
{
  "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:

PriorityValue
Lowlow
Mediummedium
Highhigh

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:

FieldTypeMax LengthDescription
first_namestring100Lead's first name
last_namestring100Lead's last name
emailstring255Lead'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
  • 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

Last updated on