Skip to main content
POST
/
v1
/
lexi
/
autoresearch
Autoresearch
curl --request POST \
  --url https://api.example.com/v1/lexi/autoresearch \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "contact_id": "<string>",
  "company_id": "<string>",
  "depth": "<string>",
  "sources": [
    {}
  ]
}
'
{
  "data": {
    "summary": "<string>",
    "key_findings": [
      {}
    ],
    "recent_news": [
      {}
    ],
    "people": [
      {}
    ],
    "competitors": [
      {}
    ],
    "talking_points": [
      {}
    ],
    "citations": [
      {}
    ],
    "credits_remaining": 123
  }
}
Autoresearch consumes 6 AI credits per call because it spawns multiple tool invocations and web searches. If the workspace balance is insufficient, the API returns 402 insufficient_credits.

Request

Autoresearch synthesizes LeadLex data (CRM, emails, meetings) with authorized web sources into a structured briefing you can render on a contact page or share with the team. Calls usually take 15 - 60 seconds.

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Idempotency-Key
string
Optional UUID to deduplicate retries within 24 hours. Credits are charged only on the first successful completion.

Body Parameters

query
string
Freeform research prompt. Required when neither contact_id nor company_id is provided.
contact_id
string
Optional contact UUID to research. Merged with query when both are present.
company_id
string
Optional company UUID to research.
depth
string
default:"standard"
quick (~15s, 3 credits), standard (~30s, 6 credits), or deep (~60s, 12 credits).
sources
array
Optional whitelist of sources: crm, emails, meetings, web, news, linkedin. Defaults to all authorized sources.

Response

data
object
Responses include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl -X POST \
  https://data.leadlex.com/functions/v1/api-gateway/v1/lexi/autoresearch \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_id": "123e4567-e89b-12d3-a456-426614174000",
    "depth": "standard"
  }'

Example Response

{
  "data": {
    "summary": "Jane Doe, General Counsel at Acme Corp, is leading the legal side of an upcoming Series B round (~EUR 40m). Acme recently expanded into Germany.",
    "key_findings": [
      "Series B led by a European fund (announced 2026-03-21)",
      "Hired two senior engineers in Berlin in the last 30 days",
      "Previously worked with US counsel for Series A"
    ],
    "recent_news": [
      {
        "title": "Acme Corp raises EUR 40m Series B",
        "url": "https://example.com/news/acme-series-b",
        "published_at": "2026-03-21",
        "source": "TechEU"
      }
    ],
    "people": [
      { "name": "Jane Doe", "role": "General Counsel" },
      { "name": "Kai Bauer", "role": "CFO" }
    ],
    "competitors": [{ "name": "Beta Legal Systems" }],
    "talking_points": [
      "Congratulate Jane on the raise",
      "Offer a local DE partner intro for employment law"
    ],
    "citations": [
      { "url": "https://example.com/news/acme-series-b", "title": "Acme raises Series B", "source_type": "news" }
    ],
    "credits_remaining": 4842
  }
}

Errors

StatusCodeDescription
400validation_errorMissing all of query, contact_id, company_id
401invalid_keyInvalid or expired API key
402insufficient_creditsWorkspace credit balance is exhausted
403insufficient_permissionsMissing write:ai permission
404not_foundSupplied contact or company does not exist
429rate_limitedRate limit exceeded
504research_timeoutUpstream sources failed to return within the time budget