Skip to main content

Official Python SDK for the FoxReach cold email outreach API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foxreach-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foxreach-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file foxreach-0.1.0.tar.gz.

File metadata

  • Download URL: foxreach-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foxreach-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da5461cd73d6005deaba4410d0df16a46bbf2440c7dcf58fa9ad985d3d1dbff4
MD5 00cf8fdedb268d6fc1d43556f14b7367
BLAKE2b-256 106a5578422bf059cade27f9dafa4b293ed870d043fcb8767b5d917031e8caf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for foxreach-0.1.0.tar.gz:

Publisher: publish.yml on foxreach/foxreach-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foxreach-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: foxreach-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for foxreach-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa6edce54c9a7a396be846b5948dcfbed3cdc49dd1221f55a917903e83d59066
MD5 5cff8f6db43ea5e7f52c5167e84b9a4a
BLAKE2b-256 880312168cb820fd408badc4f48c3bf7cd84148fbe43db51a48e24139b940cdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for foxreach-0.1.0-py3-none-any.whl:

Publisher: publish.yml on foxreach/foxreach-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page