Supports exact, fuzzy, and AI-assisted matching with grouped boolean logic.
The Match API provides sophisticated matching capabilities for Account, Contact, and Lead objects. It supports multiple matching modes including simple field matching, grouped boolean logic, and AI-assisted matching with natural language explanations.
object: Object type to match (account, contact, lead)candidates: List of candidates to match against Salesforce recordsrules: Matching rules configurationcontext: Optional context information (Salesforce instance, org ID, etc.)max_credits: Maximum credits to spend on this request
Basic field-by-field matching with exact and fuzzy rules.
Advanced boolean logic with grouped rules:
groups: List of rule groupsall: Rules within a group that must all matchany: Whether any group needs to be truethreshold: Overall confidence cutoff
AI-assisted matching using LLM scoring:
- Natural language explanations
- Context-aware matching
- Use when structured rules fail
field:exact: Exact string matchfield:fuzzy0.x: Fuzzy match with 0.x thresholdfield:eq: Equality matchfield:contains: Contains match
success: Boolean indicating request successresults: List of candidate results with matchescredits_consumed: Number of credits usedcredits_remaining(approximate balance; use GET /v1/credits/remaining for precise value)processing_time_ms: Processing time in millisecondscached: Whether result was from cache
Match API consumes credits based on complexity:
- Simple Mode: 1 credit per candidate
- Grouped Mode: 2 credits per candidate
- AI Mode: 5 credits per candidate
Security
BearerAuth
- Lantern API serverhttps://api-gateway.agenthq.withlantern.com/v1/match
- Local API serverhttp://localhost:8000/v1/match
curl -i -X POST \
https://api-gateway.agenthq.withlantern.com/v1/match \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"object": "account",
"candidates": [
{
"company_name": "string",
"domain": "string",
"billing_street": "string",
"phone": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"title": "string"
}
],
"rules": {
"mode": "simple",
"groups": [
{
"all": [
"string"
]
}
],
"any": true,
"threshold": 1,
"effort": "low"
},
"context": {},
"max_credits": 1
}'Success Response
Any of:
Confidence score (0.0-1.0) or null if disabled/not found
[ 0 .. 1 ]
number
Any of:
Approximate remaining credit balance. Use GET /v1/credits/remaining for precise balance.
integer
Time taken to process the request in milliseconds
Response
{ "success": true, "results": [ { … } ], "confidence": 0.9, "credits_consumed": 1, "credits_remaining": 950, "processing_time_ms": 1200, "cached": true }