Skip to main content
This recipe takes a list of prospects you already have, saves them to OutReign, fills in verified data, ranks them against your ICP and writes a draft email for the best ones. Nothing is sent.
1

Import in batches of 100

POST /leads/bulk saves valid entries and reports invalid ones by array position. A partial import still returns 201.
2

Enrich each lead

Enrichment uses your plan’s enrichment credits. Check noMatch: a successful call can still find nothing new.
3

Score against your ICP

Scoring compares the lead with your saved ICP profile and returns fit, intent and a suggested angle.
4

Draft emails for the top leads

Send the lead object, a tone and a goal. Supply accurate sender/business context rather than relying on a fallback. Read the JSON error even on HTTP 200.

Python version

Production checklist

  • Keep the key in a secret manager, never in client code.
  • prospects is your reviewed input array, with each item containing at least contact_name and company_name; the examples do not supply real prospects.
  • Budget requests: each enrich, score and draft call counts against your per-minute and daily allowance, and enrichment uses credits.
  • Writes are not idempotent. After a timeout, GET the record before retrying a create.
  • Store OutReign lead IDs next to your own IDs so you can update instead of duplicating.
  • To send the drafts, enroll leads in a sequence from the app or over MCP (enroll_lead_in_sequence).