SDKs

The Warm Deals SDKs are designed around the public OpenAPI spec, so method names match the REST endpoints one-to-one.

Python SDKpackage

Synchronous and async client. Python 3.10+.

Install

bash
pip install warmdeals

Authenticate

python
from warmdeals import WarmDealsClient

lf = WarmDealsClient(
    api_key="lf_your_key_here",
    base_url="https://warm.deals/api/v1",  # optional
)

Create & list leads

python
lead = lf.create_lead(
    name="Acme Corp",
    email="ceo@acme.com",
    industry="SaaS",
    country="US",
)

# Paginated listing with filters
page = lf.list_leads(page=1, page_size=50, industry="SaaS")
for company in page["items"]:
    print(company["name"], company["email"])

Launch a campaign

python
campaign = lf.create_campaign(
    name="Q4 Outreach",
    campaign_type="email",
    template_subject="Quick question about {{company_name}}",
    template_html="<p>Hi {{first_name}}, ...</p>",
    language="en",
)

Enrich a lead

python
result = lf.enrich_lead(lead["id"])
print(result["provider"], result["fields_updated"])

# History
log = lf.get_enrichment_log(lead["id"])

Async usage

python
import asyncio
from warmdeals import WarmDealsClient

async def main():
    async with WarmDealsClient(api_key="lf_your_key") as lf:
        page = await lf.alist_leads(page_size=10)
        return page["items"]

asyncio.run(main())

Error handling

python
from warmdeals import WarmDealsClient
from warmdeals.exceptions import (
    AuthenticationError,
    RateLimitError,
    ValidationError,
)

lf = WarmDealsClient(api_key="lf_...")

try:
    lf.create_lead(name="Acme")
except AuthenticationError:
    # 401 — invalid API key
    ...
except RateLimitError:
    # 429 — back off and retry
    ...
except ValidationError as e:
    # 422 — fix payload
    print(e)

TypeScript SDKpackage

Node 18+ and browser client built on the standard fetch API.

Install

bash
npm install @warmdeals/sdk

Create & list leads

typescript
import { WarmDealsClient } from "@warmdeals/sdk"

const lf = new WarmDealsClient({
  apiKey: process.env.WARMDEALS_API_KEY!,
  baseUrl: "https://warm.deals/api/v1",
})

const lead = await lf.createLead({
  name: "Acme Corp",
  email: "ceo@acme.com",
  industry: "SaaS",
})

const page = await lf.listLeads({ page: 1, page_size: 50, industry: "SaaS" })

Generate a client

bash
npx @openapitools/openapi-generator-cli generate \
  -i https://warm.deals/api/openapi.json \
  -g typescript-fetch \
  -o ./warmdeals-client

curl examples

Every endpoint accepts an X-API-Key header. API keys are prefixed lf_.

Create a lead

bash
curl -X POST https://warm.deals/api/v1/companies/ \
  -H "X-API-Key: lf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme Corp","email":"ceo@acme.com","industry":"SaaS"}'

List campaigns

bash
curl https://warm.deals/api/v1/campaigns/?page=1&page_size=20 \
  -H "X-API-Key: lf_your_key_here"

Trigger enrichment

bash
curl -X POST https://warm.deals/api/v1/enrich/company/<lead_id> \
  -H "X-API-Key: lf_your_key_here"

Inbox / unified threads

bash
curl https://warm.deals/api/v1/inbox/threads \
  -H "X-API-Key: lf_your_key_here"

Need more?

The full reference (every endpoint, every field) is in the API Reference. Webhook events and signature verification are documented in Webhooks.