Skip to main content

FoxReach Python SDK

Official Python SDK for the FoxReach cold email outreach API.

Installation

pip install foxreach

Quick Start

from foxreach import FoxReach, LeadCreate

client = FoxReach(api_key="otr_your_api_key")

# Create a lead
lead = client.leads.create(LeadCreate(
    email="jane@example.com",
    first_name="Jane",
    last_name="Smith",
    company="Acme Corp",
))

# List leads with pagination
page = client.leads.list(search="jane", page_size=25)
for lead in page:
    print(lead.email)

# Auto-paginate through all results
for lead in client.leads.list().auto_paging_iter():
    print(lead.email)

Async Support

from foxreach import AsyncFoxReach, LeadCreate

async with AsyncFoxReach(api_key="otr_your_api_key") as client:
    lead = await client.leads.create(LeadCreate(email="jane@example.com"))

    async for lead in (await client.leads.list()).auto_paging_iter():
        print(lead.email)

Resources

Leads

client.leads.list(page=1, page_size=50, search="...", status="active", tags="...")
client.leads.get("cld_...")
client.leads.create(LeadCreate(email="..."))
client.leads.update("cld_...", LeadUpdate(company="New Co"))
client.leads.delete("cld_...")

Campaigns

client.campaigns.list(status="active")
client.campaigns.get("cmp_...")
client.campaigns.create(CampaignCreate(name="Q1 Outreach"))
client.campaigns.update("cmp_...", CampaignUpdate(daily_limit=100))
client.campaigns.delete("cmp_...")
client.campaigns.start("cmp_...")
client.campaigns.pause("cmp_...")
client.campaigns.add_leads("cmp_...", ["cld_1", "cld_2"])
client.campaigns.add_accounts("cmp_...", ["acc_1"])

Sequences

client.campaigns.sequences.list("cmp_...")
client.campaigns.sequences.create("cmp_...", SequenceCreate(body="Hi {{firstName}}"))
client.campaigns.sequences.update("cmp_...", "seq_...", SequenceUpdate(delay_days=3))
client.campaigns.sequences.delete("cmp_...", "seq_...")

Templates

client.templates.list()
client.templates.get("tpl_...")
client.templates.create(TemplateCreate(name="Follow-up", body="Hi {{firstName}}"))
client.templates.update("tpl_...", TemplateUpdate(name="New name"))
client.templates.delete("tpl_...")

Email Accounts

client.email_accounts.list()
client.email_accounts.get("acc_...")
client.email_accounts.delete("acc_...")

Inbox

client.inbox.list_threads(category="interested", is_read=False)
client.inbox.get("rpl_...")
client.inbox.update("rpl_...", ThreadUpdate(is_read=True))

Analytics

overview = client.analytics.overview()
print(f"Reply rate: {overview.reply_rate}%")

stats = client.analytics.campaign("cmp_...")
print(f"Sent: {stats.sent}, Replied: {stats.replied}")

Error Handling

from foxreach import FoxReach, NotFoundError, RateLimitError, AuthenticationError

client = FoxReach(api_key="otr_...")

try:
    lead = client.leads.get("cld_nonexistent")
except NotFoundError:
    print("Lead not found")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")
except AuthenticationError:
    print("Invalid API key")

Configuration

client = FoxReach(
    api_key="otr_...",
    base_url="https://api.foxreach.io/api/v1",  # default
    timeout=30.0,       # seconds
    max_retries=3,       # retries on 429
)

Requirements

  • Python 3.9+
  • httpx

Release files for foxreach 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foxreach 0.2.0
File Size Uploaded
foxreach-0.2.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for foxreach 0.2.0
File Interpreter ABI Platform
foxreach-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / foxreach-0.2.0.tar.gz

Download URL foxreach-0.2.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e5b67dfafb2514f31cbdf0248216eef36388c16c62e0200fbb547e5af26fd112
BLAKE2b-256 checksum
How to use checksums
c30eb711057b5e903766b3f8e91c3672d8d44d8dd266669b8749e74cc208fd7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / foxreach-0.2.0-py3-none-any.whl

Download URL foxreach-0.2.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d64a9d7f82fe78f85d86e88f8a10b9206b873f79a8f480f1caed75177423d51e
BLAKE2b-256 checksum
How to use checksums
4a62d3800913e5734ad02f9279d48da424f4ba83555670f0e032e2c1e6bd3607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page