Skip to content

Lead Post API

Insert leads with criteria-based validation.

Endpoints

Lead Post API

Insert lead with criteria validation using criteria_key.

Endpoint: POST /lead-post-validation/insert

Authentication: Required (auth_token)

Parameters

NameTypeRequiredDescription
auth_tokenstringYesAuthentication token
criteria_keystringYesCriteria key for validation
phone_numberstringYesPhone number to validate and insert
phone_codestringNoCountry phone code
statusstringNoLead status code
created_bystringNoCreator identifier
emailstringNoEmail address
last_modified_bystringNoLast modifier identifier
owner_idstringNoOwner user ID
first_namestringNoFirst name
last_namestringNoLast name
alt_phone_1stringNoAlternate phone 1
alt_phone_2stringNoAlternate phone 2
address1stringNoStreet address
address2stringNoAddress line 2
citystringNoCity
statestringNoState/Province
provincestringNoProvince
postal_codestringNoPostal code
countrystringNoCountry code
genderstringNoGender
date_of_birthstringNoDate of birth (YYYY-MM-DD)
std_company_namestringNoStandard company name
std_consumer_numberstringNoStandard consumer number
std_account_numberstringNoStandard account number
notesstringNoLead notes
monthly_revenuestringNoMonthly revenue amount
annual_revenuestringNoAnnual revenue amount
titlestringNoContact title
business_namestringNoBusiness name
dbastringNoDoing Business As name
industrystringNoIndustry classification
start_datestringNoStart date
[custom_fields]stringNoCustomer-defined fields as per criteria

Request Example

POST https://api.convoso.com/v1/lead-post-validation/insert
Content-Type: application/x-www-form-urlencoded

auth_token=abc123&criteria_key=sales_leads&phone_number=5551234567&first_name=John&last_name=Doe&email=john@example.com

Response Example - Accepted

json
{
  "result": true,
  "lead_id": "12345"
}

Response Example - Rejected

json
{
  "result": false,
  "error_description": "Lead does not meet age criteria"
}

Response Fields

FieldTypeDescription
resultbooleantrue if lead accepted, false if rejected
lead_idstringID of created lead (if accepted)
error_descriptionstringReason for rejection (if rejected)

Criteria Keys

Criteria keys are pre-configured validation rules set up in your Convoso account. Common examples:

KeyPurposeCommon Rules
sales_leadsSales campaign validationAge, location, income
support_leadsSupport inquiry validationContact info, issue type
survey_leadsSurvey participant validationDemographics, availability
retention_leadsCustomer retention validationAccount status, tenure

Contact your Convoso account manager for available criteria keys.

Validation Rules

When you POST a lead, the system:

  1. Validates the phone number format and DNC status
  2. Checks criteria against the criteria_key rules
  3. Accepts or rejects based on criteria match
  4. Creates lead only if accepted
  5. Returns result with lead_id or error reason

Acceptance Criteria Examples

Example 1: Geography Filter

  • Criteria Key: "us_only"
  • Rules: State must be CA, TX, FL, or NY
  • Result:
    • ✓ Phone from CA → Accepted
    • ✗ Phone from WA → Rejected

Example 2: Age and Income

  • Criteria Key: "premium_leads"
  • Rules: Age 25-65, Income $50k+, Not in DNC
  • Result:
    • ✓ 45 years old, $75k income → Accepted
    • ✗ 18 years old, $30k income → Rejected

Example 3: Telecom Type

  • Criteria Key: "wireless_only"
  • Rules: Must be wireless carrier
  • Result:
    • ✓ Verizon wireless number → Accepted
    • ✗ Landline number → Rejected

Common Rejection Reasons

ReasonDescription
Invalid phone numberPhone format invalid or empty
Number in DNCPhone is on Do-Not-Call list
State not allowedState outside allowed criteria
Age requirement not metAge outside required range
Income requirement not metIncome below minimum threshold
Incomplete informationRequired fields missing
Geographic restrictionCountry/region not allowed
Carrier restrictionPhone carrier doesn't meet criteria
Duplicate leadLead already exists in system

Custom Fields

The criteria_key may require custom fields. For example:

POST /lead-post-validation/insert
- criteria_key: extended_profile
- phone_number: 5551234567
- first_name: John
- last_name: Doe
- annual_income: 75000
- home_value: 350000
- credit_score: 750

Custom field names and requirements vary by criteria_key. Contact your account manager for specifications.

Use Cases

  1. Lead Validation: Ensure leads meet campaign requirements before insertion
  2. Quality Control: Filter leads client-side before bulk import
  3. Compliance: Enforce regulatory requirements per criteria
  4. Cost Optimization: Avoid importing non-matching leads
  5. Real-time Ingestion: Validate and insert leads from external sources
  6. Third-party Integration: Accept leads from partners with validation

Workflow Example

API-based lead acquisition flow:

1. Third-party source submits lead
2. POST /lead-post-validation/insert with criteria_key
3. System validates against criteria
4. If accepted: Lead added to campaign queue
5. If rejected: Return rejection reason to source
6. Source can resubmit or retry with different data

Batch Processing Pattern

python
import requests

leads = [
    {'phone': '5551234567', 'first_name': 'John', 'last_name': 'Doe'},
    {'phone': '5551234568', 'first_name': 'Jane', 'last_name': 'Smith'},
    {'phone': '5551234569', 'first_name': 'Bob', 'last_name': 'Jones'},
]

accepted = []
rejected = []

for lead in leads:
    response = requests.post(
        'https://api.convoso.com/v1/lead-post-validation/insert',
        data={
            'auth_token': token,
            'criteria_key': 'sales_leads',
            'phone_number': lead['phone'],
            'first_name': lead['first_name'],
            'last_name': lead['last_name']
        }
    ).json()

    if response['result']:
        accepted.append(response['lead_id'])
    else:
        rejected.append({
            'phone': lead['phone'],
            'reason': response['error_description']
        })

print(f"Accepted: {len(accepted)}, Rejected: {len(rejected)}")

Comparison with Standard Lead Insert

FeaturePost APIInsert API
ValidationRequired (via criteria_key)Optional
Return accepted/rejectedYesNo
Error descriptionDetailedLimited
Best forSelective insertionBulk import
ProcessingSlower (validation)Faster (direct)

Performance Considerations

  • Each request validates against criteria rules
  • Validation adds latency (100-500ms typical)
  • Batch multiple leads sequentially (not parallel initially)
  • Consider rate limits when bulk importing
  • Test with small batches first

Error Handling

IssueResponse
Invalid criteria_key{"result": false, "error_description": "Invalid criteria key"}
Invalid phone format{"result": false, "error_description": "Invalid phone number"}
Missing required field{"result": false, "error_description": "Missing required field: [field]"}
Phone in DNC{"result": false, "error_description": "Number in DNC list"}
Criteria not met{"result": false, "error_description": "Lead does not meet criteria"}

Notes

  • Criteria keys must be configured in your account first
  • Contact Convoso support to set up custom criteria
  • Accepted leads are inserted into configured destination
  • Validation rules enforced by criteria_key
  • Results returned immediately (no async processing)
  • Each criteria_key has specific required/optional fields


Last Updated: 2026-03-03

Community project — not affiliated with or endorsed by Convoso.