{"openapi":"3.1.0","info":{"title":"Leads API","version":"1","description":"Run campaigns from your own scripts or CRM: find companies and people, approve emails, and read replies and results.\n\n## Authentication\n\n- Send an API key from the API keys page as a Bearer token: `Authorization: Bearer splee_…`. Keys belong to the organization and see all of its projects.\n- Base URL: `https://track.seokora.com/api/v1`\n- Requests and responses are JSON. Errors return a status code and `{ \"error\": \"message\" }`. Paginated lists return `{ \"items\": [...], \"total\": n }`.\n\n## Retries\n\n- Send an `Idempotency-Key` with a POST, PATCH or DELETE and retrying it after a timeout is safe: Leads runs it once and answers every repeat with the first response for 24 hours.\n- Use a new key, up to 255 characters, for each new request. A replayed response carries `Idempotent-Replayed: true`. The same key with a different method, path or body is 422, and a repeat while the first request still runs is 409. Server errors aren't kept, so a retry after a 5xx runs again.\n\n## Rate limits\n\n- Each organization gets 10,000 requests an hour and 150 at once, across the API and the MCP server.\n- Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, the seconds until the hour starts again. Past either limit the answer is 429 with `Retry-After` in seconds.\n\n## Subscriptions for Zapier, Make and n8n\n\nSubscribe a URL to a lead event and Leads posts each one to it as it happens, with the same JSON and signature as the webhooks on the Integrations page. A post that gets 410 Gone turns the subscription off, and revoking the key stops all of its subscriptions."},"servers":[{"url":"https://track.seokora.com/api/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from the API keys page, like splee_…"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Makes a retry safe: Leads runs the request once and answers every repeat with the first response for 24 hours.","schema":{"type":"string","maxLength":255}}},"responses":{"Error":{"description":"An error, with a status code like 400, 401, 404, 409, 422 or 429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"paths":{"/projects":{"get":{"operationId":"get_projects","summary":"Projects in your organization","description":"Projects in your organization.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"}}}},"example":[{"id":"{project_id}","name":"Acme","domain":"acme.com","status":"active","created_at":"2026-11-01T12:00:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_projects","summary":"Start a project for a business, like New project in the app","description":"Start a project for a business, like New project in the app. Leads researches the business from its website or description, which takes a few minutes, so poll run_id with GET /runs/{id}.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"run_id":{"type":"string"}}},"example":{"project_id":"{project_id}","run_id":"9b4f…"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"the business's website"},"description":{"description":"what it sells and to whom, when there's no website"}}},"example":{"domain":"acme.com"}}}}}},"/projects/{project_id}":{"get":{"operationId":"get_projects_project_id","summary":"One project as the list shows it, with what Leads learned about the business in company, and its controls as PATCH below returns them","description":"One project as the list shows it, with what Leads learned about the business in company, and its controls as PATCH below returns them.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string"},"company":{"type":"object","properties":{"name":{"type":"string"}}},"controls":{"type":"object","properties":{"sending":{"type":"boolean"},"daily_email_limit":{"type":"number"},"sender_name":{"type":"string"}}}}},"example":{"id":"{project_id}","name":"Acme","domain":"acme.com","status":"active","company":{"name":"Acme"},"controls":{"sending":true,"daily_email_limit":80,"sender_name":"Maya Patel"}}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_projects_project_id","summary":"The project's sending controls","description":"The project's sending controls. Send only what changes, or {} to read them. sending is the project's Start and Pause sending, and turning it on without an active mailbox is a 409 that saves nothing. Any other field is a 422.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"sending":{"type":"boolean"},"daily_email_limit":{"type":"number"},"daily_text_limit":{"type":"number"},"timezone":{"type":"string"},"send_days":{"type":"array","items":{"type":"number"}},"send_start_hour":{"type":"number"},"send_end_hour":{"type":"number"},"autopilot":{"type":"boolean"},"autopilot_budget_micros":{"type":"number"},"autopilot_lead_cap":{"type":"number"},"autopilot_auto_send":{"type":"boolean"},"review_window_hours":{},"monthly_cap_micros":{},"sender_name":{"type":"string"}}},"example":{"project_id":"{project_id}","sending":true,"daily_email_limit":80,"daily_text_limit":50,"timezone":"America/New_York","send_days":[1,2,3,4,5],"send_start_hour":9,"send_end_hour":17,"autopilot":true,"autopilot_budget_micros":50000000,"autopilot_lead_cap":500,"autopilot_auto_send":false,"review_window_hours":null,"monthly_cap_micros":null,"sender_name":"Maya Patel"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"daily_email_limit":{"type":"number","description":"1 to 5,000 emails and 1 to 1,000 texts a day"},"autopilot":{"type":"boolean","description":"autopilot on or off, its monthly Claude budget and new-lead cap, and whether its emails skip approval"},"autopilot_budget_micros":{"type":"number","description":"autopilot on or off, its monthly Claude budget and new-lead cap, and whether its emails skip approval"},"sending":{"description":"true or false"},"daily_text_limit":{"description":"1 to 5,000 emails and 1 to 1,000 texts a day"},"timezone":{"description":"the send window, days 1 (Monday) to 7 (Sunday)"},"send_days":{"description":"the send window, days 1 (Monday) to 7 (Sunday)"},"send_start_hour":{"description":"the send window, days 1 (Monday) to 7 (Sunday)"},"send_end_hour":{"description":"the send window, days 1 (Monday) to 7 (Sunday)"},"autopilot_lead_cap":{"description":"autopilot on or off, its monthly Claude budget and new-lead cap, and whether its emails skip approval"},"autopilot_auto_send":{"description":"autopilot on or off, its monthly Claude budget and new-lead cap, and whether its emails skip approval"},"review_window_hours":{"description":"1 to 72, or null so drafts wait for a person"},"monthly_cap_micros":{"description":"$1 to $1,000,000 of email spend a month, or null for no cap"},"sender_name":{"description":"the name the agent signs emails with, up to 100 characters and not an address, or empty for the team"}}},"example":{"daily_email_limit":80,"autopilot":true,"autopilot_budget_micros":50000000}}}}}},"/projects/{project_id}/campaigns":{"get":{"operationId":"get_projects_project_id_campaigns","summary":"Campaigns of a project with their funnel","description":"Campaigns of a project with their funnel. spend_micros is in micro-dollars (1,000,000 = $1). language is what the campaign writes in: lead for each lead's own, the default, or a language code like en or de. Archived campaigns are left out unless you ask for them.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"archived","in":"query","description":"true to list archived campaigns too. archived_at says when each was archived, null for the rest.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"language":{"type":"string"},"companies":{"type":"number"},"leads":{"type":"number"},"sent":{"type":"number"},"contacted":{"type":"number"},"replies":{"type":"number"},"bounced":{"type":"number"},"hot":{"type":"number"},"spend_micros":{"type":"number"},"created_at":{"type":"string"},"archived_at":{}}}},"example":[{"id":"5d0a…","name":"Design studios","description":"Independent design studios in the US","status":"working","language":"lead","companies":40,"leads":72,"sent":150,"contacted":70,"replies":6,"bounced":1,"hot":2,"spend_micros":4210000,"created_at":"2026-11-01T12:05:00Z","archived_at":null}]}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_projects_project_id_campaigns","summary":"Create a campaign from a description of who to reach, like describing one in the app","description":"Create a campaign from a description of who to reach, like describing one in the app. The agent names it and sets its targeting in a run you can follow with GET /runs below. language is optional and each lead's own by default.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"run_id":{"type":"string"}}},"example":{"campaign_id":"5d0a…","run_id":"9b4f…"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"language":{"type":"string"}}},"example":{"prompt":"Dental clinics in Leeds","language":"lead"}}}}}},"/campaigns/{campaign_id}":{"patch":{"operationId":"patch_campaigns_campaign_id","summary":"Change a campaign's definition, as its page does","description":"Change a campaign's definition, as its page does. Send only what changes. Each targeting list you send replaces that list, and the others stay. Emails already written keep their brief and language until they're rewritten. A field it doesn't take, like schedule, is a 422. Returns the campaign like GET below.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"language":{"type":"string"},"targeting":{"type":"object","properties":{"industries":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"string"}}}},"angle":{"type":"string"}}},"example":{"id":"5d0a…","language":"de","targeting":{"industries":["Design"],"countries":["US"],"roles":["Founder","Studio manager"]},"angle":"Get paid on time without awkward emails"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"angle":{"type":"string","description":"the brief its emails are written from"},"targeting":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}}},"description":"industries, roles, company_sizes, countries, exclude_countries, keywords or exclude_keywords, each a list"},"daily_limit":{"type":"number","description":"the most first emails and follow-ups it sends a day, 1 to 5,000, on top of the project's daily limit every campaign shares. null takes it off"},"name":{"description":"can't be empty"},"description":{"description":"who the campaign is for"},"pain_points":{"description":"the brief its emails are written from"},"language":{"description":"the language of its emails, follow-ups, texts and LinkedIn messages: lead, the default, writes to each lead in the language set on them, else their country's, else their company website's, else English. Or one of en, de, fr, es, pt, it, nl, sv, nb, da, fi, pl, cs, sk, ro, bg, hu, el, tr, ru, uk, ar, he, ja, ko, zh, zh-Hant, hi, id, ms, th, vi"},"track_clicks":{"description":"true or false"},"track_opens":{"description":"true or false"},"lead_pages":{"description":"true or false"}}},"example":{"angle":"Get paid on time without awkward emails","targeting":{"roles":["Founder","Studio manager"]},"daily_limit":25}}}}},"get":{"operationId":"get_campaigns_campaign_id","summary":"Everything the campaign's page shows: its funnel like the list above, why it has its status, who it targets, the brief its emails are written from, the project's schedule and follow-ups it sends on, and an imported campaign's emails","description":"Everything the campaign's page shows: its funnel like the list above, why it has its status, who it targets, the brief its emails are written from, the project's schedule and follow-ups it sends on, and an imported campaign's emails. read_only says what can't be changed and why.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"status_reason":{"type":"string"},"language":{"type":"string"},"targeting":{"type":"object","properties":{"industries":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"type":"string"}}}},"pain_points":{"type":"string"},"angle":{"type":"string"},"daily_limit":{"type":"number"},"schedule":{"type":"object","properties":{"sending":{"type":"boolean"},"timezone":{"type":"string"},"send_days":{"type":"array","items":{"type":"number"}},"send_start_hour":{"type":"number"},"send_end_hour":{"type":"number"},"daily_email_limit":{"type":"number"}}},"follow_ups":{"type":"array","items":{"type":"object","properties":{"delay_days":{"type":"number"},"enabled":{"type":"boolean"},"instructions":{"type":"string"}}}},"imported_from":{},"sequence":{"type":"array","items":{}},"read_only":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}}}}}},"example":{"id":"5d0a…","project_id":"{project_id}","name":"Design studios","status":"paused","status_reason":"Paused. Its unsent emails wait as drafts until it starts again","language":"lead","targeting":{"industries":["Design"],"countries":["US"]},"pain_points":"Chasing late invoices","angle":"Get paid on time without awkward emails","daily_limit":25,"schedule":{"sending":true,"timezone":"America/New_York","send_days":[1,2,3,4,5],"send_start_hour":9,"send_end_hour":17,"daily_email_limit":50},"follow_ups":[{"delay_days":3,"enabled":true,"instructions":""}],"imported_from":null,"sequence":[],"read_only":[{"field":"schedule","reason":"Every campaign in the project shares it. Change it with PATCH /v1/projects/{id}"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/send-state":{"get":{"operationId":"get_campaigns_campaign_id_send_state","summary":"Whether the campaign's emails go out now and, if not, the one thing holding them, checked in the order you'd fix them","description":"Whether the campaign's emails go out now and, if not, the one thing holding them, checked in the order you'd fix them. state is sending, scheduled, archived, not_started, paused, project_paused, no_mailbox, awaiting_approval, nothing_queued, monthly_cap_reached, lead_cap_reached, daily_limit_reached, campaign_limit_reached, mailboxes_full or outside_hours, and sending_now is true for the first two. next_action is the call that clears it, null when it only has to wait. today counts the campaign's first emails and follow-ups against its own campaign_limit, null when it has none, project_sent counts every email against the project's shared daily limit, and next_send_at says when the next one can go out. allowed_actions lists the calls below that change something now.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"state":{"type":"string"},"sending_now":{"type":"boolean"},"message":{"type":"string"},"next_action":{},"today":{"type":"object","properties":{"sent":{"type":"number"},"queued":{"type":"number"},"drafts":{"type":"number"},"project_sent":{"type":"number"},"daily_email_limit":{"type":"number"},"campaign_limit":{},"next_send_at":{"type":"string"}}},"allowed_actions":{"type":"array","items":{"type":"string"}}}},"example":{"campaign_id":"5d0a…","state":"outside_hours","sending_now":false,"message":"Outside sending hours. The next emails go out Mon Nov 23, 09:00 Europe/London","next_action":null,"today":{"sent":0,"queued":24,"drafts":0,"project_sent":0,"daily_email_limit":30,"campaign_limit":null,"next_send_at":"2026-11-23T09:00:00Z"},"allowed_actions":["stop","archive"]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/start":{"post":{"operationId":"post_campaigns_campaign_id_start","summary":"The campaign's Start button: it sends on the project's schedule, and its drafts are approved for sending","description":"The campaign's Start button: it sends on the project's schedule, and its drafts are approved for sending. A campaign that's already sending stays as it is, so a repeat is harmless.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"}}},"example":{"accepted":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/stop":{"post":{"operationId":"post_campaigns_campaign_id_stop","summary":"The campaign's Pause button: its unsent first emails and follow-ups go back to drafts until it starts again","description":"The campaign's Pause button: its unsent first emails and follow-ups go back to drafts until it starts again. Replies still come in. A campaign that isn't sending stays as it is.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"}}},"example":{"accepted":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/approve":{"post":{"operationId":"post_campaigns_campaign_id_approve","summary":"Leads has no review step for a whole campaign, so this approves each of its first emails and follow-ups waiting as drafts, like Approve on each one","description":"Leads has no review step for a whole campaign, so this approves each of its first emails and follow-ups waiting as drafts, like Approve on each one. A paused campaign holds them until it starts.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"approved":{"type":"number"}}},"example":{"accepted":true,"approved":12}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/archive":{"post":{"operationId":"post_campaigns_campaign_id_archive","summary":"Put away a campaign you're done with","description":"Put away a campaign you're done with. It stops like /stop and leaves the campaign list, autopilot and the review window. Its leads, emails and results stay, and replies still come in. A repeat changes nothing. Returns the campaign like the list above.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"archived_at":{"type":"string"}}},"example":{"id":"5d0a…","status":"paused","archived_at":"2026-11-21T09:30:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/unarchive":{"post":{"operationId":"post_campaigns_campaign_id_unarchive","summary":"Bring an archived campaign back to the list, paused","description":"Bring an archived campaign back to the list, paused. It sends again once you start it. A repeat changes nothing.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"archived_at":{}}},"example":{"id":"5d0a…","status":"paused","archived_at":null}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/{campaign_id}/my-copy":{"get":{"operationId":"get_campaigns_campaign_id_my_copy","summary":"The campaign's first email","description":"The campaign's first email. mode instructions has the agent write each one from the campaign's angle, returned as instructions. mode my_copy sends your own subject and body with each lead's details filled in to 9 leads in 10, and the AI email to the other tenth, so results can compare reply rates. Follow-ups are written as before. source project means the campaign sends the project's first email, and mode, subject and body are the project's.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"project_id":{"type":"string"},"source":{"type":"string"},"mode":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"instructions":{"type":"string"},"results":{"type":"object","properties":{"my_copy":{"type":"object","properties":{"sent":{"type":"number"},"replies":{"type":"number"}}},"ai":{"type":"object","properties":{"sent":{"type":"number"},"replies":{"type":"number"}}},"note":{"type":"string"}}}}},"example":{"campaign_id":"5d0a…","project_id":"{project_id}","source":"campaign","mode":"my_copy","subject":"{Quick|Short} question, {{first_name}}","body":"Hi {{first_name}},\n\n{{ai: one line about their clinic}}\n\nDoes {{company}} still book visits by phone?","instructions":"Get paid on time without awkward emails","results":{"my_copy":{"sent":212,"replies":19},"ai":{"sent":24,"replies":1},"note":"Not enough data yet. Each side needs at least 30 sends before the reply rates mean much."}}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_campaigns_campaign_id_my_copy","summary":"Change the campaign's own first email, or turn My copy on or off","description":"Change the campaign's own first email, or turn My copy on or off. Send only what changes. A text with a mistake is a 422 with the sentence to fix, and nothing is saved. A campaign that sends the project's first email is a 409: change the project's below, or switch its source first.\n\n- `{a|b}`: one option picked per lead, the same one every time\n\n- `{{ai: instruction}}`: up to 5 lines in the body the agent writes for each lead","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"source":{"type":"string"},"mode":{"type":"string"}}},"example":{"campaign_id":"5d0a…","source":"campaign","mode":"my_copy"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"instructions or my_copy, which needs a body"},"body":{"type":"string","description":"up to 3,000 characters"},"subject":{"description":"up to 300 characters. Empty sends “Your company x Their company”"},"variables":{"description":"{{first_name}}, {{company}}, {{job_title}}, {{company_city}}, {{sender_first_name}}, {{sender_name}}, {{sender_company}}, each with an optional fallback like {{company_city|your city}}. A lead missing one with no fallback gets the AI email"}}},"example":{"mode":"my_copy","body":"Hi {{first_name}},\n\nDoes {{company}} still book visits by phone?"}}}}}},"/campaigns/{campaign_id}/my-copy/source":{"put":{"operationId":"put_campaigns_campaign_id_my_copy_source","summary":"project sends the project's first email, campaign the campaign's own","description":"project sends the project's first email, campaign the campaign's own. Nothing is lost: switching back brings the other text back. A campaign's first own text starts as a copy of the project's.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string"},"source":{"type":"string"}}},"example":{"campaign_id":"5d0a…","source":"campaign"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"}}},"example":{"source":"campaign"}}}}}},"/campaigns/{campaign_id}/my-copy/preview":{"get":{"operationId":"get_campaigns_campaign_id_my_copy_preview","summary":"Your text as the campaign's first 3 leads get it, signed like the real email","description":"Your text as the campaign's first 3 leads get it, signed like the real email. An {{ai: …}} line shows its instruction, since the agent writes it with the email. gets is ai for a lead that gets the AI email instead, with why in note.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string"},"emails":{"type":"array","items":{"type":"object","properties":{"lead_id":{"type":"string"},"lead_name":{"type":"string"},"lead_company":{"type":"string"},"gets":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"sender_name":{"type":"string"},"note":{}}}}}},"example":{"mode":"my_copy","emails":[{"lead_id":"c42e…","lead_name":"Sarah Chen","lead_company":"Northwind Studio","gets":"my_copy","subject":"Quick question, Sarah","body":"Hi Sarah,\n\n[Written for each lead: one line about their clinic]\n\nDoes Northwind Studio still book visits by phone?\n\nAlex Morgan","sender_name":"Alex Morgan","note":null}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/my-copy":{"get":{"operationId":"get_projects_project_id_my_copy","summary":"The project's default first email, sent by every campaign in campaign_ids","description":"The project's default first email, sent by every campaign in campaign_ids. PATCH it with the same fields as a campaign's. instructions are the project's extra instructions for every AI email.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"mode":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"instructions":{"type":"string"},"campaign_ids":{"type":"array","items":{"type":"string"}}}},"example":{"project_id":"{project_id}","mode":"instructions","subject":"","body":"","instructions":"Never mention pricing.","campaign_ids":["5d0a…"]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/monthly-cap":{"get":{"operationId":"get_projects_project_id_monthly_cap","summary":"The monthly cap and what the project's sent emails cost since the 1st (UTC), at each mailbox's price per email","description":"The monthly cap and what the project's sent emails cost since the 1st (UTC), at each mailbox's price per email. Once spend reaches the cap, first emails and follow-ups wait until resumes_at, the 1st of next month, or a higher cap. Replies to leads still go out.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"monthly_cap_micros":{"type":"number"},"spent_this_month_micros":{"type":"number"},"reached":{"type":"boolean"},"resumes_at":{"type":"string"}}},"example":{"project_id":"{project_id}","monthly_cap_micros":200000000,"spent_this_month_micros":200450000,"reached":true,"resumes_at":"2026-12-01T00:00:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/companies":{"get":{"operationId":"get_companies","summary":"Search the company database, the most reliable listings first","description":"Search the company database, the most reliable listings first. q matches words at the start of words in the name or category. Companies on your dedup lists are left out. total stops counting at 10,000, and capped says there are more.","parameters":[{"name":"q","in":"query","description":"optional words in the name or category","schema":{"type":"string"},"example":"dental"},{"name":"city","in":"query","description":"optional city, any case","schema":{"type":"string"},"example":"Leeds"},{"name":"country","in":"query","description":"optional two-letter code, like GB","schema":{"type":"string"},"example":"GB"},{"name":"category","in":"query","description":"optional exact category, like dental_clinic","schema":{"type":"string"}},{"name":"has_email","in":"query","description":"optional true to keep only companies that list one","schema":{"type":"string"}},{"name":"has_phone","in":"query","description":"optional true to keep only companies that list one","schema":{"type":"string"}},{"name":"tech","in":"query","description":"optional tool, like HubSpot, or tool category, like crm","schema":{"type":"string"}},{"name":"project_id","in":"query","description":"optional project searching, so its dedup lists apply as well as the ones for every project","schema":{"type":"string"}},{"name":"include_hidden","in":"query","description":"optional true to include the companies on your dedup lists","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"category":{"type":"string"}}}},"total":{"type":"number"},"capped":{"type":"boolean"}}},"example":{"items":[{"domain":"smiledental.co.uk","name":"Smile Dental","website":"https://smiledental.co.uk","phone":"+44 113 000 0000","email":"hello@smiledental.co.uk","city":"Leeds","country_code":"GB","category":"dental_clinic"}],"total":125,"capped":false}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/companies/export":{"get":{"operationId":"get_companies_export","summary":"A company search as a file to take elsewhere, like the Companies page's Download CSV, up to 50,000 rows a page","description":"A company search as a file to take elsewhere, like the Companies page's Download CSV, up to 50,000 rows a page. It takes the same filters as GET /companies. The splee-rows header says how many rows the page holds, and splee-capped is true when there are more on the next page. An organization can download 20 times an hour, 3 at once.","parameters":[{"name":"q","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"},"example":"dental"},{"name":"country","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"},"example":"GB"},{"name":"format","in":"query","description":"optional csv or jsonl, default csv","schema":{"type":"string"},"example":"csv"},{"name":"city","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"category","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"has_email","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"has_phone","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"tech","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"project_id","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"include_hidden","in":"query","description":"the same filters as GET /companies","schema":{"type":"string"}},{"name":"domains","in":"query","description":"optional comma-separated domains, only these of the search's companies","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and up to 50,000 rows per page, the default","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and up to 50,000 rows per page, the default","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/csv":{"schema":{"type":"string"},"example":"name,domain,website,email,phone,address,city,region,postcode,country,category,confidence,source_id,source_release\nSmile Dental,smiledental.co.uk,https://smiledental.co.uk,hello@smiledental.co.uk,+44 113 496 0000,12 Park Row,Leeds,England,LS1 5HD,GB,dentist,0.94,…,…"}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/dedup/companies":{"post":{"operationId":"post_dedup_companies","summary":"Add up to 10,000 domains or website addresses to a named dedup list, like your CRM's accounts or a competitor's clients","description":"Add up to 10,000 domains or website addresses to a named dedup list, like your CRM's accounts or a competitor's clients. The list is made when your organization has none by that name. The company search, its downloads, saved searches and lookalikes leave those companies out in the projects it covers. It only hides search results and never stops an email, unlike do-not-contact. project_ids sets those projects, null or left out on a new list means all of them. skipped counts invalid domains and ones already on the list. 422 for an empty project_ids or a project outside your organization.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project_ids":{"type":"array","items":{"type":"string"}},"created_by":{},"created_at":{"type":"string"},"size":{"type":"number"}}},"added":{"type":"number"},"skipped":{"type":"number"}}},"example":{"list":{"id":"6e1b…","name":"CRM accounts","project_ids":["{project_id}"],"created_by":null,"created_at":"2026-11-21T09:00:00Z","size":2},"added":2,"skipped":0}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"project_ids":{"type":"array","items":{"type":"string"}}}},"example":{"name":"CRM accounts","domains":["northwind.studio","https://www.globex.com/"],"project_ids":["{project_id}"]}}}}},"get":{"operationId":"get_dedup_companies","summary":"Your organization's dedup lists, newest first, with how many domains each has","description":"Your organization's dedup lists, newest first, with how many domains each has. project_ids is null for a list that covers every project.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project_ids":{"type":"array","items":{"type":"string"}},"created_by":{},"created_at":{"type":"string"},"size":{"type":"number"}}}},"example":[{"id":"6e1b…","name":"CRM accounts","project_ids":["{project_id}"],"created_by":null,"created_at":"2026-11-21T09:00:00Z","size":2}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/dedup/companies/{dedup_list_id}":{"get":{"operationId":"get_dedup_companies_dedup_list_id","summary":"A dedup list with its domains in alphabetical order","description":"A dedup list with its domains in alphabetical order.","parameters":[{"name":"dedup_list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"1 to 1,000, default 100","schema":{"type":"string"},"example":"100"},{"name":"offset","in":"query","description":"how many to skip, default 0","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project_ids":{"type":"array","items":{"type":"string"}},"created_by":{},"created_at":{"type":"string"},"size":{"type":"number"},"domains":{"type":"array","items":{"type":"string"}}}},"example":{"id":"6e1b…","name":"CRM accounts","project_ids":["{project_id}"],"created_by":null,"created_at":"2026-11-21T09:00:00Z","size":2,"domains":["globex.com","northwind.studio"]}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_dedup_companies_dedup_list_id","summary":"Change the projects a dedup list covers","description":"Change the projects a dedup list covers. Send null for all projects.","parameters":[{"name":"dedup_list_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project_ids":{},"created_by":{},"created_at":{"type":"string"},"size":{"type":"number"}}},"example":{"id":"6e1b…","name":"CRM accounts","project_ids":null,"created_by":null,"created_at":"2026-11-21T09:00:00Z","size":2}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_ids":{}}},"example":{"project_ids":null}}}}},"delete":{"operationId":"delete_dedup_companies_dedup_list_id","summary":"Delete a dedup list and its domains","description":"Delete a dedup list and its domains. Those companies show up in searches again right away.","parameters":[{"name":"dedup_list_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/companies/filters":{"post":{"operationId":"post_companies_filters","summary":"Turn a description into the search's filters, to pass to GET /companies as they are","description":"Turn a description into the search's filters, to pass to GET /companies as they are. Leads only uses categories and countries the database has and tools it can detect, and note says what it couldn't turn into a filter, like company size. 30 an hour per organization, then 429 with Retry-After.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"q":{},"country":{"type":"string"},"city":{"type":"string"},"category":{"type":"string"},"has_email":{"type":"boolean"},"has_phone":{"type":"boolean"},"tech":{"type":"string"}}},"note":{"type":"string"}}},"example":{"filters":{"q":null,"country":"GB","city":"Leeds","category":"dental_clinic","has_email":true,"has_phone":false,"tech":"Shopify"},"note":"Company size isn't a filter."}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}},"example":{"query":"Dental clinics in Leeds that list an email and use Shopify, 10 to 50 staff"}}}}}},"/companies/by-domains":{"post":{"operationId":"post_companies_by_domains","summary":"Look up to 1,000 domains in the company database, like your CRM's accounts","description":"Look up to 1,000 domains in the company database, like your CRM's accounts. Addresses are cleaned up first, so https://www.globex.com/about finds globex.com. items keeps the order you sent, and not_found has the rest, including companies your dedup lists hide unless include_hidden is true.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"address":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postcode":{"type":"string"},"country_code":{"type":"string"},"category":{"type":"string"},"tech":{"type":"array","items":{"type":"string"}}}}},"not_found":{"type":"array","items":{"type":"string"}}}},"example":{"items":[{"domain":"smiledental.co.uk","name":"Smile Dental","website":"https://smiledental.co.uk","phone":"+44 113 496 0000","email":"hello@smiledental.co.uk","address":"12 Park Row","city":"Leeds","region":"West Yorkshire","postcode":"LS1 5HD","country_code":"GB","category":"dental_clinic","tech":["Google Workspace"]}],"not_found":["nowhere.example"]}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string"}}},"example":{"domains":["https://www.smiledental.co.uk/","nowhere.example"],"project_id":"{project_id}"}}}}}},"/projects/{project_id}/lookalikes":{"get":{"operationId":"get_projects_project_id_lookalikes","summary":"Companies in the company database like the project's customers, up to 200, best first, like the Companies page's Like your customers","description":"Companies in the company database like the project's customers, up to 200, best first, like the Companies page's Like your customers. The seeds are the customers from won deals plus the ones added on that page, and profile shows what they have in common. score is 0 to 100, and reasons says what earned it the most points. database_empty is true until the company database has companies.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"seeds","in":"query","description":"optional comma-separated domains to match instead of the saved seeds","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"seeds":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"won":{"type":"boolean"},"in_database":{"type":"boolean"},"known":{"type":"boolean"}}}},"parts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"on":{"type":"boolean"},"known":{"type":"number"},"values":{"type":"array","items":{}}}}}}},"results":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"country_code":{"type":"string"},"category":{"type":"string"},"score":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}}}},"database_empty":{"type":"boolean"},"settings":{"type":"object","properties":{"added":{"type":"array","items":{}},"removed":{"type":"array","items":{}},"off":{"type":"array","items":{}}}}}},"example":{"profile":{"seeds":[{"domain":"brightsmile.co.uk","name":"Bright Smile","won":true,"in_database":true,"known":true},{"domain":"parkdental.co.uk","name":"Park Dental","won":true,"in_database":true,"known":true},{"domain":"leedsortho.co.uk","name":"Leeds Orthodontics","won":true,"in_database":true,"known":true},{"domain":"corephysio.co.uk","name":"Core Physio","won":false,"in_database":true,"known":true}],"parts":[{"key":"category","label":"Industry","on":true,"known":4,"values":[{"value":"dentist","label":"Dentist","seeds":3}]},{"key":"tech","label":"Tools they use","on":false,"known":0,"values":[]}]},"results":[{"domain":"smiledental.co.uk","name":"Smile Dental","website":"https://smiledental.co.uk","city":"Leeds","region":"England","country_code":"GB","category":"dentist","score":72,"reasons":["Dentist, like 3 of your 4 customers"]}],"database_empty":false,"settings":{"added":[],"removed":[],"off":[]}}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_projects_project_id_lookalikes","summary":"Add matches to a campaign, each with its score and reasons as its fit","description":"Add matches to a campaign, each with its score and reasons as its fit. Name the domains to add, or pass top for the best few. A domain that's no longer among the matches, like one already in the project, is skipped.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"skipped":{"type":"number"}}},"example":{"added":24,"skipped":1}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"segment_id":{"type":"string","description":"the campaign"},"top":{"type":"number","description":"optional, the best this many when domains is left out, up to 200"},"domains":{"description":"optional domains from the matches"},"seeds":{"description":"optional domains to match instead of the saved seeds"}}},"example":{"segment_id":"5d0a…","top":25}}}}}},"/sending-domains/suggestions":{"get":{"operationId":"get_sending_domains_suggestions","summary":"Domains to send cold email from apart from your own, like getacme.com or acmehq.co, with whether your Porkbun account can buy each and its first-year price, buyable first","description":"Domains to send cold email from apart from your own, like getacme.com or acmehq.co, with whether your Porkbun account can buy each and its first-year price, buyable first. available is null when the registry didn't answer in time. Connect Porkbun on the Domains page first, and buy them there.","parameters":[{"name":"domain","in":"query","schema":{"type":"string"},"example":"acme.com"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":"boolean"},"price_micros":{"type":"number"},"renewal_micros":{"type":"number"},"premium":{"type":"boolean"}}}},"example":[{"domain":"getacme.com","available":true,"price_micros":11080000,"renewal_micros":11080000,"premium":false},{"domain":"acmehq.com","available":false,"price_micros":11080000,"renewal_micros":11080000,"premium":false}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/sending-domains/availability":{"get":{"operationId":"get_sending_domains_availability","summary":"The same check for up to 20 names of your own, separated by commas","description":"The same check for up to 20 names of your own, separated by commas.","parameters":[{"name":"domains","in":"query","schema":{"type":"string"},"example":"getacme.com,tryacme.io"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":"boolean"},"price_micros":{"type":"number"},"renewal_micros":{"type":"number"},"premium":{"type":"boolean"}}}},"example":[{"domain":"getacme.com","available":true,"price_micros":11080000,"renewal_micros":11080000,"premium":false}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/sending-domains":{"get":{"operationId":"get_sending_domains","summary":"The sending domains you bought on the Domains page, with their status, mail provider, DNS and how many mailboxes use each","description":"The sending domains you bought on the Domains page, with their status, mail provider, DNS and how many mailboxes use each.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string"},"provider":{"type":"string"},"dns_status":{"type":"string"},"mailboxes":{"type":"number"},"warming":{"type":"number"}}}},"example":[{"id":"a7c1…","domain":"getacme.com","status":"registered","provider":"google","dns_status":"set","mailboxes":2,"warming":1}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/segments/{segment_id}/companies":{"post":{"operationId":"post_segments_segment_id_companies","summary":"Add companies from the search above to a campaign by domain, up to 500 at a time","description":"Add companies from the search above to a campaign by domain, up to 500 at a time. Companies the project already has and ones on your do-not-contact list are skipped.","parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"skipped":{"type":"number"}}},"example":{"added":2,"skipped":0}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"}}}},"example":{"domains":["smiledental.co.uk","brightsmiles.co.uk"]}}}}}},"/projects/{project_id}/saved-searches":{"post":{"operationId":"post_projects_project_id_saved_searches","summary":"Save the search's filters under a name","description":"Save the search's filters under a name. Leads checks it every hour for companies that match and didn't when it was saved, like ones from a country loaded later. A search saved with a key has no owner, so only the project's chat hears about new ones, with chat_alerts.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"city":{"type":"string"},"chat_alerts":{"type":"boolean"},"add_to_segment_id":{},"too_broad":{"type":"boolean"},"new_matches":{"type":"number"}}},"example":{"id":"9b4e…","name":"Dentists in Leeds","category":"dental_clinic","city":"Leeds","chat_alerts":true,"add_to_segment_id":null,"too_broad":false,"new_matches":0}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"up to 120 characters"},"category":{"type":"string","description":"the search's filters, at least one"},"city":{"type":"string","description":"the search's filters, at least one"},"chat_alerts":{"type":"boolean","description":"optional true to post new companies to the project's chat"},"q":{"description":"the search's filters, at least one"},"country":{"description":"the search's filters, at least one"},"has_email":{"description":"the search's filters, at least one"},"has_phone":{"description":"the search's filters, at least one"},"tech":{"description":"the search's filters, at least one"},"segment_id":{"description":"optional campaign to add up to 200 new companies to each hour, skipping known and do-not-contact ones"}}},"example":{"name":"Dentists in Leeds","category":"dental_clinic","city":"Leeds","chat_alerts":true}}}}},"get":{"operationId":"get_projects_project_id_saved_searches","summary":"The project's saved searches, newest first","description":"The project's saved searches, newest first. too_broad means it matched over 10,000 companies, so it isn't checked.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"new_matches":{"type":"number"},"new_since":{"type":"string"}}}},"example":[{"id":"9b4e…","name":"Dentists in Leeds","new_matches":3,"new_since":"2026-11-21T09:00:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/saved-searches/{saved_search_id}/new":{"get":{"operationId":"get_saved_searches_saved_search_id_new","summary":"The companies a saved search found at or after since, newest first","description":"The companies a saved search found at or after since, newest first. Without since, the ones found since it was last opened in the app.","parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string"},"example":"2026-11-21T09:00:00Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"found_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"since":"2026-11-21T09:00:00Z","items":[{"domain":"brightsmiles.co.uk","name":"Bright Smiles","found_at":"2026-11-21T09:00:00Z"}],"total":3}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/saved-searches/{saved_search_id}":{"delete":{"operationId":"delete_saved_searches_saved_search_id","summary":"Delete a saved search","description":"Delete a saved search. Leads stops checking it, and companies it added stay in their campaign.","parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/enrich/email":{"post":{"operationId":"post_projects_project_id_enrich_email","summary":"Find a person's work email from their name and company with the project's email finders and verifier, the way Leads does for a lead without one","description":"Find a person's work email from their name and company with the project's email finders and verifier, the way Leads does for a lead without one. They don't become a lead. Each call is one of your organization's 200 email searches an hour, shared with the leads Leads searches, and past that it's a 429 with Retry-After. A project with no finder or verifier connected gets a 409.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"email":{"type":"string"},"email_status":{"type":"string"},"source":{"type":"string"},"note":{"type":"string"},"phone":{}}},"example":{"status":"found","email":"sarah@northwind.studio","email_status":"verified","source":"Hunter","note":"Found by Hunter.","phone":null}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","description":"required, the domain or the company's website"},"last_name":{"type":"string","description":"optional, and some finders match on the profile"},"company_domain":{"type":"string","description":"required, the domain or the company's website"},"linkedin_url":{"description":"optional, and some finders match on the profile"}}},"example":{"first_name":"Sarah","last_name":"Chen","company_domain":"northwind.studio"}}}}}},"/projects/{project_id}/enrich/email/batch":{"post":{"operationId":"post_projects_project_id_enrich_email_batch","summary":"The same search for up to 500 people, in the background and within the hourly limit, so a big batch takes a few hours","description":"The same search for up to 500 people, in the background and within the hourly limit, so a big batch takes a few hours. status is found, guessed (a common pattern the verifier accepted), catch_all, not_found, suppressed, duplicate (a lead in the project has the address, named in note) or failed. phone is filled only when the project finds phone numbers too.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"status":{"type":"string"},"total":{"type":"number"}}},"example":{"task_id":"e7c2…","status":"pending","total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"company_domain":{"type":"string"},"client_ref":{"type":"string"}}},"description":"first_name, company_domain, and optional last_name, linkedin_url and client_ref, your own id given back with the result"}}},"example":{"people":[{"first_name":"Sarah","last_name":"Chen","company_domain":"northwind.studio","client_ref":"crm-118"}]}}}}}},"/enrich/email/batch/{batch_id}":{"get":{"operationId":"get_enrich_email_batch_batch_id","summary":"A batch's results in the order you sent them, each pending until searched","description":"A batch's results in the order you sent them, each pending until searched. Poll until status is completed. Batches are kept for 30 days.","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"project_id":{"type":"string"},"status":{"type":"string"},"total":{"type":"number"},"searched":{"type":"number"},"created_at":{"type":"string"},"finished_at":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"client_ref":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"status":{"type":"string"},"email":{"type":"string"},"email_status":{"type":"string"},"source":{"type":"string"},"note":{"type":"string"},"phone":{}}}}}},"example":{"task_id":"e7c2…","project_id":"{project_id}","status":"completed","total":1,"searched":1,"created_at":"2026-11-21T09:00:00Z","finished_at":"2026-11-21T09:01:00Z","results":[{"client_ref":"crm-118","first_name":"Sarah","last_name":"Chen","company_domain":"northwind.studio","linkedin_url":"","status":"guessed","email":"sarah.chen@northwind.studio","email_status":"verified","source":"first.last","note":"Guessed from the first.last@ pattern, verified by MillionVerifier.","phone":null}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/enrich/phone":{"post":{"operationId":"post_projects_project_id_enrich_phone","summary":"Find the mobile of the person behind a LinkedIn profile with the project's finders that return mobiles, People Data Labs, RocketReach, Lusha and Prospeo, in the project's order","description":"Find the mobile of the person behind a LinkedIn profile with the project's finders that return mobiles, People Data Labs, RocketReach, Lusha and Prospeo, in the project's order. They don't become a lead. status is found, not_found, suppressed (on the do-not-contact list) or failed, and note says why when nothing was found. Each call is one of your 200 email searches an hour, and a project with none of those finders gets a 409.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"phone":{"type":"string"},"source":{"type":"string"},"note":{"type":"string"}}},"example":{"status":"found","phone":"+14155550134","source":"People Data Labs","note":""}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"linkedin_url":{"type":"string","description":"required, their profile"},"email":{"description":"optional, an address they're known by, which helps the finders match"}}},"example":{"linkedin_url":"https://www.linkedin.com/in/sarah-chen"}}}}}},"/local-businesses":{"get":{"operationId":"get_local_businesses","summary":"Search Google Maps for local businesses through your organization's Google Maps key, up to 60 a place","description":"Search Google Maps for local businesses through your organization's Google Maps key, up to 60 a place. Split a big area over up to 20 places with semicolons. A place searched in the last 30 days costs no Google calls, and the rest count against your monthly cap.","parameters":[{"name":"what","in":"query","description":"what to look for, and a city, area or ZIP code, or several split by semicolons","schema":{"type":"string"},"example":"dentists"},{"name":"where","in":"query","description":"what to look for, and a city, area or ZIP code, or several split by semicolons","schema":{"type":"string"},"example":"Austin, TX"},{"name":"min_rating","in":"query","description":"optional, only businesses rated or reviewed at least this much","schema":{"type":"string"},"example":"4"},{"name":"project_id","in":"query","description":"optional, marks the businesses that project already has in known","schema":{"type":"string"},"example":"{project_id}"},{"name":"min_reviews","in":"query","description":"optional, only businesses rated or reviewed at least this much","schema":{"type":"string"}},{"name":"with_website","in":"query","description":"optional true to keep only businesses with a website","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"place_id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"address":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"domain":{"type":"string"},"rating":{"type":"number"},"review_count":{"type":"number"},"known":{}}}},"found":{"type":"number"},"calls":{"type":"number"},"usage":{"type":"object","properties":{"calls":{"type":"number"},"cap":{"type":"number"},"cost_cents":{"type":"number"}}},"note":{}}},"example":{"items":[{"place_id":"ChIJ…","name":"Smile Dental","category":"Dentist","address":"100 Congress Ave, Austin, TX 78701, USA","phone":"+15125550100","website":"https://www.smiledental.example/","domain":"smiledental.example","rating":4.8,"review_count":212,"known":null}],"found":60,"calls":3,"usage":{"calls":312,"cap":2000,"cost_cents":1092},"note":null}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/segments/{segment_id}/local-businesses":{"post":{"operationId":"post_segments_segment_id_local_businesses","summary":"Add businesses from the search above to a campaign, up to 50 at a time","description":"Add businesses from the search above to a campaign, up to 50 at a time. Leads reads each one's website for a contact address at its own domain, a person's before a shared one, and checks it with your verifier. One without a website keeps its phone for calls and texts.","parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"email":{"type":"string"},"email_kind":{"type":"string"},"contact_name":{"type":"string"}}}},"skipped":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string"}}}}}},"example":{"added":[{"name":"Smile Dental","domain":"smiledental.example","email":"maria.lopez@smiledental.example","email_kind":"person","contact_name":"Maria Lopez"}],"skipped":[{"name":"Known Dental","reason":"Already in this project"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"place_ids":{"type":"array","items":{"type":"string"}}}},"example":{"place_ids":["ChIJ…"]}}}}}},"/projects/{project_id}/research/questions":{"post":{"operationId":"post_projects_project_id_research_questions","summary":"Add a question the agent answers about every company, like the Companies page's Research view","description":"Add a question the agent answers about every company, like the Companies page's Research view. A project has up to 10. label is the column's name, the question's first words when you leave it out. With use_in_emails, the writer uses the answers.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"label":{"type":"string"},"question":{"type":"string"},"answer_type":{"type":"string"},"use_in_emails":{"type":"boolean"},"position":{"type":"number"},"created_at":{"type":"string"}}},"example":{"id":"2c9c…","project_id":"{project_id}","label":"Sells to hospitals","question":"Do they sell to hospitals?","answer_type":"yes_no","use_in_emails":false,"position":0,"created_at":"2026-11-04T10:00:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","description":"up to 300 characters"},"label":{"type":"string","description":"optional, up to 40 characters"},"answer_type":{"description":"optional yes_no or text, default yes_no"},"use_in_emails":{"description":"optional, default false"}}},"example":{"question":"Do they sell to hospitals?","label":"Sells to hospitals"}}}}}},"/projects/{project_id}/research/run":{"post":{"operationId":"post_projects_project_id_research_run","summary":"Have the agent answer the project's questions for its companies, up to 200 per call","description":"Have the agent answer the project's questions for its companies, up to 200 per call. A company is only asked what it has no answer to yet, unless redo is true. more counts the companies past the 200, for another call. dry_run counts what it would queue without queueing it, and cost_per_company_micros is what one company cost in this project's research so far.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"companies":{"type":"number"},"answers":{"type":"number"},"more":{"type":"number"},"runs":{"type":"number"},"cost_per_company_micros":{"type":"number"}}},"example":{"companies":120,"answers":120,"more":0,"runs":0,"cost_per_company_micros":21000}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"optional, count without queueing"},"question_ids":{"description":"optional, every question without it"},"company_ids":{"description":"optional, every company that isn't excluded without it"},"segment_id":{"description":"optional, only this campaign's companies when company_ids is left out"},"redo":{"description":"optional, ask again where there's an answer"}}},"example":{"dry_run":true}}}}}},"/projects/{project_id}/research":{"get":{"operationId":"get_projects_project_id_research","summary":"The project's questions and its companies' answers, best score first","description":"The project's questions and its companies' answers, best score first. answers is keyed by question id, and status is queued, answered, unknown or failed. researching counts the answers being worked on across the project.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"question_id","in":"query","description":"optional, only companies whose answer to that question is yes, no, answered (any), unknown, or none yet","schema":{"type":"string"},"example":"2c9c…"},{"name":"answer","in":"query","description":"optional, only companies whose answer to that question is yes, no, answered (any), unknown, or none yet","schema":{"type":"string"},"example":"yes"},{"name":"segment_id","in":"query","description":"optional, one campaign's companies","schema":{"type":"string"}},{"name":"q","in":"query","description":"optional text in the company's name or domain","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"question":{"type":"string"},"answer_type":{"type":"string"}}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"score":{"type":"number"},"score_fit":{"type":"number"},"score_intent":{"type":"number"},"status":{"type":"string"},"segment_name":{"type":"string"},"answers":{"type":"object","properties":{"2c9c…":{"type":"object","properties":{"question_id":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string"},"answer":{"type":"string"},"evidence":{"type":"string"},"source_url":{"type":"string"},"updated_at":{"type":"string"}}}}}}}},"total":{"type":"number"},"researching":{"type":"number"}}},"example":{"questions":[{"id":"2c9c…","label":"Sells to hospitals","question":"Do they sell to hospitals?","answer_type":"yes_no"}],"items":[{"id":"e810…","domain":"northwind.studio","name":"Northwind Studio","score":82,"score_fit":50,"score_intent":32,"status":"new","segment_name":"Design studios","answers":{"2c9c…":{"question_id":"2c9c…","domain":"northwind.studio","status":"answered","answer":"yes","evidence":"Their case studies page lists three NHS trusts.","source_url":"https://northwind.studio/work","updated_at":"2026-11-04T10:20:00Z"}}}],"total":1,"researching":0}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/signals":{"get":{"operationId":"get_projects_project_id_signals","summary":"Funding filings and company news at the project's companies, newest first, like the Companies page's News tab, up to 1,000","description":"Funding filings and company news at the project's companies, newest first, like the Companies page's News tab, up to 1,000. source is sec for SEC filings or feed for news. amount is what a filing says was raised and offered what it set out to raise, in dollars. leads counts the project's leads at the company.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","description":"optional funding_filing, funding_post, launch, acquisition, expansion or leadership","schema":{"type":"string"},"example":"funding_filing"},{"name":"days","in":"query","description":"optional, only signals from the last this many days","schema":{"type":"string"},"example":"30"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"company_id":{"type":"string"},"company_name":{"type":"string"},"leads":{"type":"number"},"kind":{"type":"string"},"source":{"type":"string"},"happened_on":{"type":"string"},"title":{"type":"string"},"amount":{"type":"number"},"offered":{"type":"number"},"industry":{"type":"string"},"url":{"type":"string"},"first_seen":{"type":"string"},"checked_at":{"type":"string"},"headline":{"type":"string"}}}},"example":[{"id":"7f20…","domain":"northwind.studio","company_id":"e810…","company_name":"Northwind Studio","leads":2,"kind":"funding_filing","source":"sec","happened_on":"2026-11-02","title":"Northwind Studio Inc. Form D","amount":4200000,"offered":5000000,"industry":"Other Technology","url":"https://www.sec.gov/Archives/edgar/data/…","first_seen":"2026-11-03T06:00:00Z","checked_at":"2026-11-03T06:00:00Z","headline":"Raised $4.2M (SEC filing, Nov 2)"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/watch-list":{"post":{"operationId":"post_projects_project_id_watch_list","summary":"Add past customers or champions to the project's watch list, like the Job changes tab","description":"Add past customers or champions to the project's watch list, like the Job changes tab. Leads checks their LinkedIn and, when one moves to a new company, makes them a lead there. Each needs an email or a LinkedIn link. Someone already watched gets what was missing filled in and counts as updated.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"updated":{"type":"number"},"skipped":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"error":{"type":"string"}}}}}},"example":{"added":1,"updated":0,"skipped":0,"errors":[{"row":2,"error":"Needs an email or a LinkedIn link"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relationship":{"type":"string","description":"optional won (they bought), booked (a meeting) or hot (replied with interest), default won"},"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"linkedin_url":{"type":"string"},"company":{"type":"string"}}},"description":"a list of name, email, linkedin_url, company, company_domain and title"},"csv":{"description":"or a CSV with a header row, its columns in any order"}}},"example":{"relationship":"won","people":[{"name":"Dana Ruiz","linkedin_url":"https://www.linkedin.com/in/dana-ruiz","company":"Northwind Studio"},{"name":"Sam Lee"}]}}}}}},"/projects/{project_id}/job-changes":{"get":{"operationId":"get_projects_project_id_job_changes","summary":"Moves seen among the people the project watches, newest first and up to 500, with the lead Leads made at each new company","description":"Moves seen among the people the project watches, newest first and up to 500, with the lead Leads made at each new company. connected is whether the project has LinkedIn through Unipile, which the checks need, and watching counts the people on the list.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"segment_id":{"type":"string"},"watching":{"type":"number"},"last_checked_at":{"type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"full_name":{"type":"string"},"linkedin_url":{"type":"string"},"relationship":{"type":"string"},"old_company":{"type":"string"},"old_domain":{"type":"string"},"old_lead_id":{"type":"string"},"new_company":{"type":"string"},"new_domain":{"type":"string"},"new_title":{"type":"string"},"new_lead_id":{"type":"string"},"new_lead_email":{"type":"string"},"segment_id":{"type":"string"},"segment_name":{"type":"string"},"seen_at":{"type":"string"}}}}}},"example":{"connected":true,"segment_id":"5d0a…","watching":140,"last_checked_at":"2026-11-04T06:00:00Z","changes":[{"id":"b31d…","full_name":"Dana Ruiz","linkedin_url":"https://www.linkedin.com/in/dana-ruiz","relationship":"won","old_company":"Northwind Studio","old_domain":"northwind.studio","old_lead_id":"c42e…","new_company":"Harbor Health","new_domain":"harborhealth.com","new_title":"VP Operations","new_lead_id":"d09a…","new_lead_email":"dana@harborhealth.com","segment_id":"5d0a…","segment_name":"Design studios","seen_at":"2026-11-04T06:00:00Z"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/companies":{"get":{"operationId":"get_projects_project_id_companies","summary":"The project's own companies, best research fit first, with their hiring roles and tools","description":"The project's own companies, best research fit first, with their hiring roles and tools. A company's score is its best lead's, or its own while it has no leads.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"optional, score for the highest first, or newest","schema":{"type":"string"},"example":"score"},{"name":"min_score","in":"query","description":"optional, only scores of at least this, 0 to 100","schema":{"type":"string"},"example":"50"},{"name":"segment_id","in":"query","description":"optional campaign id","schema":{"type":"string"}},{"name":"q","in":"query","description":"optional text in the name or domain","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1 to 200, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"employees":{"type":"string"},"country_code":{"type":"string"},"status":{"type":"string"},"score":{"type":"number"},"score_fit":{"type":"number"},"score_intent":{"type":"number"},"score_reasons":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"kind":{"type":"string"}}}},"hiring":{"type":"array","items":{"type":"string"}},"tech":{"type":"array","items":{"type":"string"}}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"e810…","domain":"northwind.studio","name":"Northwind Studio","employees":"11-50","country_code":"US","status":"people_found","score":78,"score_fit":43,"score_intent":35,"score_reasons":[{"text":"Hiring 2 SDRs","kind":"intent"}],"hiring":["SDR"],"tech":["HubSpot","Stripe"]}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/segments/{segment_id}/find-people":{"post":{"operationId":"post_segments_segment_id_find_people","summary":"Have the agent find decision makers and their emails at the campaign's new companies, like Find people in the app, or at the companies you pick by id or domain","description":"Have the agent find decision makers and their emails at the campaign's new companies, like Find people in the app, or at the companies you pick by id or domain. Domains the project hasn't got are added to the campaign first, from the company database where they're in it. Excluded companies and ones on your do-not-contact list are left out.","parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string"}}},"example":{"run_id":"9b4f…"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"},"description":"optional, in place of company_ids: up to 100 company domains"},"titles":{"type":"array","items":{"type":"string"},"description":"optional, up to 20 job titles to look for in place of the campaign's roles, like Head of Sales"},"per_company":{"type":"number","description":"optional people to find at each company, 1 to 5, 2 by default"},"company_ids":{"description":"optional companies of the project to search, or leave both out for the campaign's new ones"}}},"example":{"domains":["smiledental.co.uk"],"titles":["Practice Manager"],"per_company":1}}}}}},"/projects/{project_id}/leads":{"get":{"operationId":"get_projects_project_id_leads","summary":"Leads of a project, newest first, with their campaign and the status of the last email to them","description":"Leads of a project, newest first, with their campaign and the status of the last email to them. score is 0-100: score_fit (0-50) is how well the company matches your targeting and score_intent (0-50) what it did lately, with the reasons strongest first.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"optional lead status: new, contacted, replied, hot, meeting_booked, …","schema":{"type":"string"},"example":"hot"},{"name":"page","in":"query","description":"1-based page number","schema":{"type":"string"},"example":"1"},{"name":"segment_id","in":"query","description":"optional campaign id","schema":{"type":"string"}},{"name":"q","in":"query","description":"optional text in the name, email, company or title","schema":{"type":"string"}},{"name":"min_score","in":"query","description":"optional, only scores of at least this, 0 to 100","schema":{"type":"string"}},{"name":"language","in":"query","description":"optional language code, matched against effective_language","schema":{"type":"string"}},{"name":"sort","in":"query","description":"optional, score for the highest first, or newest","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1 to 200, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"segment_id":{"type":"string"},"full_name":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"email":{"type":"string"},"email_status":{"type":"string"},"company_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"x_url":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"language":{"type":"string"},"effective_language":{"type":"string"},"effective_language_source":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"},"last_contacted_at":{"type":"string"},"created_at":{"type":"string"},"score":{"type":"number"},"score_fit":{"type":"number"},"score_intent":{"type":"number"},"score_reasons":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"kind":{"type":"string"}}}},"scored_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"c42e…","project_id":"9b1f…","segment_id":"5d0a…","full_name":"Sarah Chen","first_name":"Sarah","last_name":"Chen","title":"Founder","email":"sarah@northwind.studio","email_status":"found","company_name":"Northwind Studio","company_domain":"northwind.studio","linkedin_url":"https://www.linkedin.com/in/sarah-chen","x_url":"https://x.com/sarahchen","city":"Portland","country_code":"US","language":"","effective_language":"en","effective_language_source":"country","source":"agent","status":"contacted","notes":"","last_contacted_at":"2026-11-03T09:14:00Z","created_at":"2026-11-02T16:40:00Z","score":78,"score_fit":43,"score_intent":35,"score_reasons":[{"text":"Hiring 2 SDRs","kind":"intent"},{"text":"Read /pricing yesterday","kind":"intent"},{"text":"Uses a competitor: Outreach","kind":"against"}],"scored_at":"2026-11-11T08:20:00Z"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_projects_project_id_leads","summary":"Add up to 1,000 leads per request","description":"Add up to 1,000 leads per request. Suppressed, duplicate and invalid emails are skipped, and errors lists the first 200 of them with their zero-based index in leads.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"imported":{"type":"number"},"skipped":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"error":{"type":"string"}}}}}},"example":{"imported":1,"skipped":1,"errors":[{"row":1,"error":"Duplicate: sarah@northwind.studio"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"full_name":{"type":"string"},"title":{"type":"string"},"company_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"language":{"type":"string"},"segment_id":{"type":"string"}}}}}},"example":{"leads":[{"email":"sarah@northwind.studio","full_name":"Sarah Chen","title":"Founder","company_name":"Northwind Studio","company_domain":"northwind.studio","linkedin_url":"https://www.linkedin.com/in/…","language":"de","segment_id":"5d0a…"},{"email":"sarah@northwind.studio","full_name":"Sarah Chen"}]}}}}}},"/projects/{project_id}/leads/upsert":{"post":{"operationId":"post_projects_project_id_leads_upsert","summary":"Add one lead, or update the project's lead with that email","description":"Add one lead, or update the project's lead with that email. Fields you leave out or send empty keep what the lead has, and segment_id moves it into that campaign. created says which happened. 400 for a missing or invalid email, one on your do-not-contact list, or a campaign of another project.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"id":{"type":"string"},"email":{"type":"string"},"title":{"type":"string"}}},"example":{"created":false,"id":"c42e…","email":"sarah@northwind.studio","title":"CEO"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"title":{"type":"string"},"segment_id":{"type":"string"}}},"example":{"email":"sarah@northwind.studio","title":"CEO","segment_id":"5d0a…"}}}}}},"/campaigns/import":{"post":{"operationId":"post_campaigns_import","summary":"Start a new campaign from your own list of up to 30,000 leads","description":"Start a new campaign from your own list of up to 30,000 leads. It returns at once and imports in the background. Each lead needs email, first_name, last_name, company_domain and job_title, and one without them is skipped, not refused. Repeats in the list, addresses or domains on your do-not-contact list and people already in the project are deduped, so the campaign holds exactly the rest. instructions becomes the campaign's outreach angle for its first emails, and language works like it does on a campaign. Follow-ups are set per project, so followup_instructions is a 422. The campaign starts as a draft: write its emails with write-emails below, then start it. Send an Idempotency-Key to retry safely.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"campaign_id":{"type":"string"},"status":{"type":"string"}}},"example":{"task_id":"71c3…","campaign_id":"5d0a…","status":"pending"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"name":{"type":"string"},"leads":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company_domain":{"type":"string"},"job_title":{"type":"string"},"linkedin_url":{"type":"string"},"client_ref":{"type":"string"}}}},"instructions":{"type":"string"},"language":{"type":"string"}}},"example":{"project_id":"{project_id}","name":"Design studios, March list","leads":[{"email":"sarah@northwind.studio","first_name":"Sarah","last_name":"Chen","company_domain":"northwind.studio","job_title":"Founder","linkedin_url":"https://www.linkedin.com/in/…","client_ref":"crm-1042"}],"instructions":"Mention our case study with Figma","language":"en"}}}}}},"/campaigns/import/{import_id}":{"get":{"operationId":"get_campaigns_import_import_id","summary":"An import's progress","description":"An import's progress. status is pending, then completed with result, or failed with error. Tasks are kept for 30 days.","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"task_id":{"type":"string"},"status":{"type":"string"},"project_id":{"type":"string"},"campaign_id":{"type":"string"},"result":{"type":"object","properties":{"campaign_id":{"type":"string"},"imported":{"type":"number"},"skipped":{"type":"number"},"deduped":{"type":"number"}}},"error":{},"created_at":{"type":"string"},"completed_at":{"type":"string"}}},"example":{"task_id":"71c3…","status":"completed","project_id":"{project_id}","campaign_id":"5d0a…","result":{"campaign_id":"5d0a…","imported":1,"skipped":0,"deduped":0},"error":null,"created_at":"2026-03-02T09:14:00Z","completed_at":"2026-03-02T09:14:02Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/campaigns/import/{import_id}/rows":{"get":{"operationId":"get_campaigns_import_import_id_rows","summary":"What became of each lead you sent, in order, with row its zero-based index","description":"What became of each lead you sent, in order, with row its zero-based index. imported has person_id, the new lead's id. skipped has reason missing_email, invalid_email, missing_first_name, missing_last_name, missing_company_domain, invalid_company_domain or missing_job_title. deduped has duplicate_in_request, do_not_contact, already_contacted or already_in_project.","parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number","schema":{"type":"string"},"example":"1"},{"name":"per_page","in":"query","description":"1 to 200, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"email":{"type":"string"},"client_ref":{"type":"string"},"status":{"type":"string"},"reason":{},"person_id":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"row":0,"email":"sarah@northwind.studio","client_ref":"crm-1042","status":"imported","reason":null,"person_id":"c42e…"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/sheets":{"get":{"operationId":"get_projects_project_id_sheets","summary":"The project's Google Sheets tabs, imports first: the ones leads come in from and the ones lead events go to, with how each last went","description":"The project's Google Sheets tabs, imports first: the ones leads come in from and the ones lead events go to, with how each last went. mapping is an import's {field: column header}, and events the lead events an export writes.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"kind":{"type":"string"},"spreadsheet_id":{"type":"string"},"spreadsheet_name":{"type":"string"},"tab":{"type":"string"},"mapping":{"type":"object","properties":{"email":{"type":"string"},"full_name":{"type":"string"},"company_name":{"type":"string"}}},"segment_id":{"type":"string"},"keep_importing":{"type":"boolean"},"next_import_at":{"type":"string"},"events":{"type":"array","items":{}},"last_sync_at":{"type":"string"},"rows_added":{"type":"number"},"error":{},"failed_at":{},"created_at":{"type":"string"}}}},"example":[{"id":"a7c1…","project_id":"{project_id}","kind":"import","spreadsheet_id":"1Bx9…","spreadsheet_name":"Event leads","tab":"October","mapping":{"email":"Email","full_name":"Name","company_name":"Company"},"segment_id":"5d0a…","keep_importing":true,"next_import_at":"2026-11-04T11:00:00Z","events":[],"last_sync_at":"2026-11-04T10:00:00Z","rows_added":212,"error":null,"failed_at":null,"created_at":"2026-10-20T09:00:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/sheets/{sheet_id}/import":{"post":{"operationId":"post_projects_project_id_sheets_sheet_id_import","summary":"Read an import tab now and add its new rows as leads, like Import now on the Integrations page","description":"Read an import tab now and add its new rows as leads, like Import now on the Integrations page. import is null when the tab had no new rows. 400 for a tab that gets lead events.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"type":"object","properties":{"id":{"type":"string"},"segment_id":{"type":"string"},"filename":{"type":"string"},"total":{"type":"number"},"imported":{"type":"number"},"skipped":{"type":"number"},"errors":{"type":"array","items":{}}}},"connection":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"rows_added":{"type":"number"},"last_sync_at":{"type":"string"}}}}},"example":{"import":{"id":"f2e4…","segment_id":"5d0a…","filename":"Google Sheets: Event leads › October","total":14,"imported":12,"skipped":2,"errors":[]},"connection":{"id":"a7c1…","kind":"import","rows_added":224,"last_sync_at":"2026-11-04T10:20:00Z"}}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/segments/{segment_id}/write-emails":{"post":{"operationId":"post_segments_segment_id_write_emails","summary":"Have the agent write a first email for every lead in a campaign that doesn't have one yet, like Write emails in the app","description":"Have the agent write a first email for every lead in a campaign that doesn't have one yet, like Write emails in the app. Add leads with segment_id above, then call this. In a campaign that's sending, the new emails are approved straight away. 409 when every lead already has an email. The body is optional: lead_ids writes for just those leads, and instructions guides this batch.","parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string"}}},"example":{"run_id":"9b4f…"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string"}}},"example":{"instructions":"Mention our Leeds office"}}}}}},"/runs/{run_id}":{"get":{"operationId":"get_runs_run_id","summary":"A run's progress, for example one started by write-emails","description":"A run's progress, for example one started by write-emails. status goes from queued to running, then succeeded, failed or cancelled. message is its latest progress line, error says why a run failed, and cost_usd is what Claude Code reported for it.","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"error":{"type":"string"},"cost_usd":{"type":"number"},"created_at":{"type":"string"},"finished_at":{"type":"string"}}},"example":{"id":"9b4f…","kind":"write_emails","status":"succeeded","message":"Wrote 12 emails","error":"","cost_usd":0.42,"created_at":"2026-11-04T10:00:00Z","finished_at":"2026-11-04T10:03:12Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/tasks":{"get":{"operationId":"get_tasks","summary":"Everything still working in the background, or done, newest first: agent runs, find-email batches and campaign imports","description":"Everything still working in the background, or done, newest first: agent runs, find-email batches and campaign imports. A cancelled run counts as failed. Each has the url that follows it, so a lost run_id or task_id can be found again. kind filters runs, since every reply gets its own classify_reply run.","parameters":[{"name":"status","in":"query","description":"optional: pending, completed or failed","schema":{"type":"string"},"example":"pending"},{"name":"type","in":"query","description":"optional: run, email_batch or campaign_import","schema":{"type":"string"}},{"name":"kind","in":"query","description":"optional: a run's kind, like find_people","schema":{"type":"string"}},{"name":"project_id","in":"query","description":"optional: only this project's","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"kind":{"type":"string"},"project_id":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"finished_at":{},"url":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"9b4f…","type":"run","kind":"write_emails","project_id":"c1d2…","status":"pending","created_at":"2026-11-04T10:00:00Z","finished_at":null,"url":"/v1/runs/9b4f…"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads":{"get":{"operationId":"get_leads","summary":"Find leads by email across all your projects, for tools that only know the address, such as a calendar booking","description":"Find leads by email across all your projects, for tools that only know the address, such as a calendar booking. Newest first, up to 100. Then use the id with PATCH below.","parameters":[{"name":"email","in":"query","description":"the address to look up, any case","schema":{"type":"string"},"example":"sarah@northwind.studio"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"segment_id":{"type":"string"},"full_name":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"email":{"type":"string"},"email_status":{"type":"string"},"company_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"x_url":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"language":{"type":"string"},"effective_language":{"type":"string"},"effective_language_source":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"},"last_contacted_at":{"type":"string"},"created_at":{"type":"string"},"score":{"type":"number"},"score_fit":{"type":"number"},"score_intent":{"type":"number"},"score_reasons":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"kind":{"type":"string"}}}},"scored_at":{"type":"string"}}}},"example":[{"id":"c42e…","project_id":"9b1f…","segment_id":"5d0a…","full_name":"Sarah Chen","first_name":"Sarah","last_name":"Chen","title":"Founder","email":"sarah@northwind.studio","email_status":"found","company_name":"Northwind Studio","company_domain":"northwind.studio","linkedin_url":"https://www.linkedin.com/in/sarah-chen","x_url":"https://x.com/sarahchen","city":"Portland","country_code":"US","language":"","effective_language":"en","effective_language_source":"country","source":"agent","status":"contacted","notes":"","last_contacted_at":"2026-11-03T09:14:00Z","created_at":"2026-11-02T16:40:00Z","score":78,"score_fit":43,"score_intent":35,"score_reasons":[{"text":"Hiring 2 SDRs","kind":"intent"},{"text":"Read /pricing yesterday","kind":"intent"},{"text":"Uses a competitor: Outreach","kind":"against"}],"scored_at":"2026-11-11T08:20:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads/{lead_id}":{"get":{"operationId":"get_leads_lead_id","summary":"One lead with its campaign, company and every email in both directions, oldest first","description":"One lead with its campaign, company and every email in both directions, oldest first.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"segment_id":{"type":"string"},"full_name":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"email":{"type":"string"},"email_status":{"type":"string"},"company_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"x_url":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"language":{"type":"string"},"effective_language":{"type":"string"},"effective_language_source":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"},"last_contacted_at":{"type":"string"},"created_at":{"type":"string"},"score":{"type":"number"},"score_fit":{"type":"number"},"score_intent":{"type":"number"},"score_reasons":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"kind":{"type":"string"}}}},"scored_at":{"type":"string"},"segment_name":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"fit_score":{"type":"number"}}},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string"},"kind":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"}}}}}},"example":{"id":"c42e…","project_id":"9b1f…","segment_id":"5d0a…","full_name":"Sarah Chen","first_name":"Sarah","last_name":"Chen","title":"Founder","email":"sarah@northwind.studio","email_status":"found","company_name":"Northwind Studio","company_domain":"northwind.studio","linkedin_url":"https://www.linkedin.com/in/sarah-chen","x_url":"https://x.com/sarahchen","city":"Portland","country_code":"US","language":"","effective_language":"en","effective_language_source":"country","source":"agent","status":"contacted","notes":"","last_contacted_at":"2026-11-03T09:14:00Z","created_at":"2026-11-02T16:40:00Z","score":78,"score_fit":43,"score_intent":35,"score_reasons":[{"text":"Hiring 2 SDRs","kind":"intent"},{"text":"Read /pricing yesterday","kind":"intent"},{"text":"Uses a competitor: Outreach","kind":"against"}],"scored_at":"2026-11-11T08:20:00Z","segment_name":"Design studios","company":{"id":"e810…","domain":"northwind.studio","name":"Northwind Studio","fit_score":86},"emails":[{"id":"a19c…","direction":"outbound","kind":"initial","subject":"Northwind Studio x Acme","status":"sent"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_leads_lead_id","summary":"Set a lead's status, for example meeting_booked when your calendar books a call or not_interested from your CRM, replace its notes, the ones your team sees in the inbox, or set its language","description":"Set a lead's status, for example meeting_booked when your calendar books a call or not_interested from your CRM, replace its notes, the ones your team sees in the inbox, or set its language. Send any of them. Follow-ups only go to contacted leads, so any other status stops them. Returns the lead like GET.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"notes":{"type":"string"}}},"example":{"id":"c42e…","status":"meeting_booked","notes":"Booked for Tuesday 2pm by Calendly."}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"new, queued, contacted, replied, hot, meeting_booked, not_interested, bounced, unsubscribed or do_not_contact"},"notes":{"type":"string","description":"up to 5,000 characters, replacing the lead's notes. An empty string clears them."},"language":{"description":"a code like de or a name like German, for campaigns that write in each lead's language. An empty string goes back to their country and website."}}},"example":{"status":"meeting_booked","notes":"Booked for Tuesday 2pm by Calendly."}}}}}},"/leads/{lead_id}/mark-replied":{"post":{"operationId":"post_leads_lead_id_mark_replied","summary":"Mark a reply as answered when you answered it from your own mail client or it needs no answer, like Done in the inbox","description":"Mark a reply as answered when you answered it from your own mail client or it needs no answer, like Done in the inbox. The thread leaves Needs reply until the lead writes again, its reminder is cleared and the agent's reply still waiting for approval is cancelled. The lead's status doesn't change. 409 for a lead who hasn't replied.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string"},"answered_through":{"type":"string"}}},"example":{"lead_id":"c42e…","answered_through":"2026-11-04T10:12:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads/{lead_id}/thread":{"get":{"operationId":"get_leads_lead_id_thread","summary":"The lead's emails in both directions, oldest first, like the inbox's thread","description":"The lead's emails in both directions, oldest first, like the inbox's thread. reply_cc is who a reply copies in when you don't name anyone: everyone the lead copied on their last message, minus your own mailboxes and the do-not-contact list. Download a file with GET /attachments/{id}.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string"},"kind":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"from_email":{"type":"string"},"to_email":{"type":"string"},"cc_emails":{"type":"array","items":{}},"classification":{"type":"string"},"attachments":{"type":"array","items":{}},"sent_at":{},"created_at":{"type":"string"}}}},"reply_cc":{"type":"array","items":{}}}},"example":{"lead_id":"c42e…","messages":[{"id":"71aa…","direction":"inbound","kind":"inbound","channel":"email","status":"received","subject":"Re: Northwind Studio x Acme","body":"Sounds interesting, can you send times for next week?","from_email":"sarah@northwind.studio","to_email":"alex@acme.com","cc_emails":[],"classification":"hot","attachments":[],"sent_at":null,"created_at":"2026-11-04T10:12:00Z"}],"reply_cc":[]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads/{lead_id}/reply":{"post":{"operationId":"post_leads_lead_id_reply","summary":"Answer the lead's last message, like Send in the inbox","description":"Answer the lead's last message, like Send in the inbox. The reply goes out from the mailbox they wrote to on its next pass, in the same thread, and an agent reply still waiting for approval is cancelled. 400 for a lead who hasn't replied yet.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string"},"kind":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"to_email":{"type":"string"},"cc_emails":{"type":"array","items":{}},"attachments":{"type":"array","items":{}}}},"example":{"id":"e6f6…","direction":"outbound","kind":"manual_reply","channel":"email","status":"scheduled","subject":"Re: Northwind Studio x Acme","body":"Happy to. Does Tuesday at 10 or Wednesday at 2 work?","to_email":"sarah@northwind.studio","cc_emails":[],"attachments":[]}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body_text":{"type":"string","description":"the reply"},"cc_emails":{"description":"optional, the whole list to copy in. Without it, reply_all decides"},"reply_all":{"description":"optional, default true: copy in everyone the lead copied in last, as reply_cc shows"},"attachment_ids":{"description":"optional ids from POST /attachments, up to 10"},"send_at":{"description":"optional ISO time within 30 days to send it then instead of now"}}},"example":{"body_text":"Happy to. Does Tuesday at 10 or Wednesday at 2 work?"}}}}}},"/attachments":{"post":{"operationId":"post_attachments","summary":"Upload a file for a reply as a multipart form with the file in its file field, then pass its id in the reply's attachment_ids","description":"Upload a file for a reply as a multipart form with the file in its file field, then pass its id in the reply's attachment_ids. Up to 25 MB. A file no reply takes is deleted after a day, and 429 means 100 are already waiting.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"message_id":{},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"number"},"inline":{"type":"boolean"},"stored":{"type":"boolean"},"created_at":{"type":"string"}}},"example":{"id":"56b4…","message_id":null,"filename":"pricing.pdf","content_type":"application/pdf","size_bytes":48211,"inline":false,"stored":true,"created_at":"2026-11-04T10:20:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}}}},"/attachments/{attachment_id}":{"get":{"operationId":"get_attachments_attachment_id","summary":"Download a file from a thread or one you uploaded, as the file itself with its name in Content-Disposition","description":"Download a file from a thread or one you uploaded, as the file itself with its name in Content-Disposition.","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads/{lead_id}/assign":{"post":{"operationId":"post_leads_lead_id_assign","summary":"Give a lead to someone on your team, or take it back with null","description":"Give a lead to someone on your team, or take it back with null. Assignment rules never move it afterwards. Returns the lead like GET.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"owner_id":{"type":"string"},"owner_name":{"type":"string"},"owner_email":{"type":"string"}}},"example":{"id":"c42e…","owner_id":"44c7…","owner_name":"Maya Patel","owner_email":"maya@acme.com"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"string","description":"a team member's user id or email, or null for nobody"}}},"example":{"owner":"maya@acme.com"}}}}}},"/suppressions":{"get":{"operationId":"get_suppressions","summary":"Your organization's do-not-contact list, oldest first, to copy unsubscribes and bounces into your CRM or other sending tools","description":"Your organization's do-not-contact list, oldest first, to copy unsubscribes and bounces into your CRM or other sending tools. reason is manual, customer, unsubscribe or bounce. Read every page, then next time pass the last created_at you saw as since.","parameters":[{"name":"since","in":"query","description":"optional RFC 3339 timestamp, returns entries added after it","schema":{"type":"string"},"example":"2026-11-01T00:00:00Z"},{"name":"page","in":"query","description":"1-based page number","schema":{"type":"string"},"example":"1"},{"name":"per_page","in":"query","description":"1 to 200, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"org_id":{"type":"string"},"value":{"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"created_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"0b5f…","org_id":"9e41…","value":"sarah@northwind.studio","kind":"email","reason":"unsubscribe","created_at":"2026-11-03T15:42:00Z"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_suppressions","summary":"Add up to 1,000 emails or domains to your organization's do-not-contact list, for example from your CRM","description":"Add up to 1,000 emails or domains to your organization's do-not-contact list, for example from your CRM. Leads checks the list before every email, so queued emails to them are cancelled too. added counts the new ones. One value that isn't an email or a domain rejects the request.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"}}},"example":{"added":2}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}}}},"example":{"values":["sarah@northwind.studio","competitor.com"]}}}}}},"/suppression-lists/people":{"post":{"operationId":"post_suppression_lists_people","summary":"Add up to 10,000 people to a named list, like your CRM's customers, kept apart from unsubscribes and bounces","description":"Add up to 10,000 people to a named list, like your CRM's customers, kept apart from unsubscribes and bounces. The list is made when your organization has none by that name. Leads never contacts them in the projects it covers, and queued emails and texts to them are cancelled. project_ids sets those projects, null or left out on a new list means all of them. skipped counts invalid emails and ones already on the list. 422 for an empty project_ids or a project outside your organization.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"project_ids":{"type":"array","items":{"type":"string"}},"created_by":{},"created_at":{"type":"string"},"entries":{"type":"number"}}},"added":{"type":"number"},"skipped":{"type":"number"}}},"example":{"list":{"id":"3c7d…","name":"CRM customers","kind":"people","project_ids":["{project_id}"],"created_by":null,"created_at":"2026-11-21T09:00:00Z","entries":1},"added":1,"skipped":0}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string"},"people":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"}}}},"project_ids":{"type":"array","items":{"type":"string"}}}},"example":{"list":"CRM customers","people":[{"email":"sarah@northwind.studio"}],"project_ids":["{project_id}"]}}}}}},"/suppression-lists/companies":{"post":{"operationId":"post_suppression_lists_companies","summary":"The same for companies: everyone whose email domain or company domain is on the list is left alone in the projects it covers","description":"The same for companies: everyone whose email domain or company domain is on the list is left alone in the projects it covers.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"project_ids":{},"created_by":{},"created_at":{"type":"string"},"entries":{"type":"number"}}},"added":{"type":"number"},"skipped":{"type":"number"}}},"example":{"list":{"id":"8a21…","name":"Partner agencies","kind":"companies","project_ids":null,"created_by":null,"created_at":"2026-11-21T09:00:00Z","entries":1},"added":1,"skipped":0}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}}}},"example":{"list":"Partner agencies","domains":["northwind.studio"]}}}}}},"/suppression-lists":{"get":{"operationId":"get_suppression_lists","summary":"Your organization's lists, newest first, with how many entries each has","description":"Your organization's lists, newest first, with how many entries each has. project_ids is null for a list that covers every project.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"project_ids":{"type":"array","items":{"type":"string"}},"created_by":{},"created_at":{"type":"string"},"entries":{"type":"number"}}}},"example":[{"id":"3c7d…","name":"CRM customers","kind":"people","project_ids":["{project_id}"],"created_by":null,"created_at":"2026-11-21T09:00:00Z","entries":1}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/suppression-lists/{suppression_list_id}/entries":{"get":{"operationId":"get_suppression_lists_suppression_list_id_entries","summary":"A list's emails or domains in alphabetical order","description":"A list's emails or domains in alphabetical order.","parameters":[{"name":"suppression_list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"1 to 1,000, default 100","schema":{"type":"string"},"example":"100"},{"name":"offset","in":"query","description":"how many to skip, default 0","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"}},"total":{"type":"number"}}},"example":{"items":["sarah@northwind.studio"],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/suppression-lists/{suppression_list_id}":{"patch":{"operationId":"patch_suppression_lists_suppression_list_id","summary":"Change the projects a list covers","description":"Change the projects a list covers. Send null for all projects.","parameters":[{"name":"suppression_list_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"project_ids":{},"created_by":{},"created_at":{"type":"string"},"entries":{"type":"number"}}},"example":{"id":"3c7d…","name":"CRM customers","kind":"people","project_ids":null,"created_by":null,"created_at":"2026-11-21T09:00:00Z","entries":1}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_ids":{}}},"example":{"project_ids":null}}}}},"delete":{"operationId":"delete_suppression_lists_suppression_list_id","summary":"Delete a list and everything on it","description":"Delete a list and everything on it. Leads can contact those people again from the next send.","parameters":[{"name":"suppression_list_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/replies":{"get":{"operationId":"get_projects_project_id_replies","summary":"Replies your leads sent, with the agent's classification","description":"Replies your leads sent, with the agent's classification. Oldest first, up to 500 per request. Poll with since set to the last created_at you saw.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"optional RFC 3339 timestamp, returns replies created after it","schema":{"type":"string"},"example":"2026-11-01T00:00:00Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"direction":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"from_email":{"type":"string"},"classification":{"type":"string"},"classification_reason":{"type":"string"},"created_at":{"type":"string"}}}},"example":[{"id":"71aa…","lead_id":"c42e…","direction":"inbound","subject":"Re: Northwind Studio x Acme","body":"Sounds interesting, can you send times for next week?","from_email":"sarah@northwind.studio","classification":"hot","classification_reason":"Asks to schedule a call","created_at":"2026-11-04T10:12:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/inbox":{"get":{"operationId":"get_inbox","summary":"Reply threads like the Inbox page, the latest first, with the last message in either direction cut to 300 characters","description":"Reply threads like the Inbox page, the latest first, with the last message in either direction cut to 300 characters.","parameters":[{"name":"project_id","in":"query","description":"optional, all projects without it","schema":{"type":"string"},"example":"{project_id}"},{"name":"filter","in":"query","description":"all, needs_reply, hot, auto_replied or other, default all","schema":{"type":"string"},"example":"needs_reply"},{"name":"segment_id","in":"query","description":"optional, only the threads of this campaign's leads","schema":{"type":"string"}},{"name":"q","in":"query","description":"optional text in the lead's name, email or company","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"lead_id":{"type":"string"},"project_id":{"type":"string"},"campaign_id":{"type":"string"},"project_name":{"type":"string"},"lead_name":{"type":"string"},"lead_email":{"type":"string"},"company_name":{"type":"string"},"lead_status":{"type":"string"},"classification":{"type":"string"},"pending_auto_reply":{"type":"boolean"},"last_message":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string"},"subject":{"type":"string"},"snippet":{"type":"string"},"at":{"type":"string"}}}}}},"total":{"type":"number"}}},"example":{"items":[{"lead_id":"c42e…","project_id":"{project_id}","campaign_id":"5d0a…","project_name":"Acme","lead_name":"Sarah Chen","lead_email":"sarah@northwind.studio","company_name":"Northwind Studio","lead_status":"hot","classification":"hot","pending_auto_reply":false,"last_message":{"id":"71aa…","direction":"inbound","subject":"Re: Northwind Studio x Acme","snippet":"Sounds interesting, can you send times for next week?","at":"2026-11-04T10:12:00Z"}}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/hot-leads":{"get":{"operationId":"get_hot_leads","summary":"Every hot lead in your organization, newest first, with the reply that made them hot","description":"Every hot lead in your organization, newest first, with the reply that made them hot. Pass since as the newest became_hot_at you've seen to get only new ones.","parameters":[{"name":"since","in":"query","description":"optional, only leads that became hot after this","schema":{"type":"string"},"example":"2026-11-01T00:00:00Z"},{"name":"project_id","in":"query","description":"optional, all projects without it","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"lead_id":{"type":"string"},"project_id":{"type":"string"},"campaign_id":{"type":"string"},"campaign":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"title":{"type":"string"},"company_name":{"type":"string"},"company_domain":{"type":"string"},"linkedin_url":{"type":"string"},"status":{"type":"string"},"reply_id":{"type":"string"},"reply":{"type":"string"},"why_hot":{"type":"string"},"became_hot_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"lead_id":"c42e…","project_id":"{project_id}","campaign_id":"5d0a…","campaign":"Design studios","name":"Sarah Chen","email":"sarah@northwind.studio","title":"Founder","company_name":"Northwind Studio","company_domain":"northwind.studio","linkedin_url":"https://www.linkedin.com/in/sarah-chen","status":"hot","reply_id":"71aa…","reply":"Sounds interesting, can you send times for next week?","why_hot":"Asks to schedule a call","became_hot_at":"2026-11-04T10:12:00Z"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/inbox/changes":{"get":{"operationId":"get_projects_project_id_inbox_changes","summary":"Replies that came in since the cursor, oldest first, so you can poll without missing or repeating one","description":"Replies that came in since the cursor, oldest first, so you can poll without missing or repeating one. Pass next_cursor as cursor next time, and call again straight away while has_more is true. A reply shows up about 5 seconds after it arrives, and classification is null until Leads has read it.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"next_cursor from the last call","schema":{"type":"string"},"example":"1762251120000000_71aa…"},{"name":"since","in":"query","description":"on the first call instead, only replies after this. Without either, from the first reply","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1 to 500, default 100","schema":{"type":"string"}},{"name":"segment_id","in":"query","description":"optional, only this campaign's replies","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"campaign_id":{"type":"string"},"lead_name":{"type":"string"},"lead_email":{"type":"string"},"company_name":{"type":"string"},"channel":{"type":"string"},"from_email":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"classification":{"type":"string"},"received_at":{"type":"string"}}}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"}}},"example":{"items":[{"id":"71aa…","lead_id":"c42e…","campaign_id":"5d0a…","lead_name":"Sarah Chen","lead_email":"sarah@northwind.studio","company_name":"Northwind Studio","channel":"email","from_email":"sarah@northwind.studio","subject":"Re: Northwind Studio x Acme","body":"Sounds interesting, can you send times for next week?","classification":"hot","received_at":"2026-11-04T10:12:00Z"}],"next_cursor":"1762251120000000_71aa…","has_more":false}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/erased-leads":{"get":{"operationId":"get_erased_leads","summary":"Leads someone deleted or forgot in Leads, oldest first, so you can delete what you keep of each one in your CRM, sheets and automations","description":"Leads someone deleted or forgot in Leads, oldest first, so you can delete what you keep of each one in your CRM, sheets and automations. Only the ids you got the lead with are left, because the name and address are gone. forgotten means the address also went on your do-not-contact list. Poll it like inbox changes. A lead shows up about 5 seconds after it's erased.","parameters":[{"name":"cursor","in":"query","description":"next_cursor from the last call","schema":{"type":"string"},"example":"1762251120000000_c42e…"},{"name":"project_id","in":"query","description":"optional, only this project","schema":{"type":"string"}},{"name":"since","in":"query","description":"on the first call instead, only leads erased after this. Without either, from the first","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1 to 500, default 100","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"lead_id":{"type":"string"},"project_id":{"type":"string"},"campaign_id":{"type":"string"},"forgotten":{"type":"boolean"},"erased_at":{"type":"string"}}}},"next_cursor":{"type":"string"},"has_more":{"type":"boolean"}}},"example":{"items":[{"lead_id":"c42e…","project_id":"{project_id}","campaign_id":"5d0a…","forgotten":true,"erased_at":"2026-11-04T10:12:00Z"}],"next_cursor":"1762251120000000_c42e…","has_more":false}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/emails":{"get":{"operationId":"get_emails","summary":"Draft emails waiting for approval, oldest first, across all projects or one","description":"Draft emails waiting for approval, oldest first, across all projects or one. Pass status to see others, like approved or sent.","parameters":[{"name":"project_id","in":"query","description":"optional project or campaign","schema":{"type":"string"},"example":"{project_id}"},{"name":"segment_id","in":"query","description":"optional project or campaign","schema":{"type":"string"}},{"name":"status","in":"query","description":"optional, draft by default, comma-separated for several","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"segment_id":{"type":"string"},"campaign":{"type":"string"},"lead_id":{"type":"string"},"lead_name":{"type":"string"},"lead_email":{"type":"string"},"company_name":{"type":"string"},"kind":{"type":"string"},"step":{"type":"number"},"subject":{"type":"string"},"body":{"type":"string"},"status":{"type":"string"},"scheduled_for":{},"created_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"a19c…","project_id":"{project_id}","segment_id":"5d0a…","campaign":"Design studios","lead_id":"c42e…","lead_name":"Sarah Chen","lead_email":"sarah@northwind.studio","company_name":"Northwind Studio","kind":"initial","step":0,"subject":"Northwind Studio x Acme","body":"Hi Sarah, …","status":"draft","scheduled_for":null,"created_at":"2026-11-04T10:03:00Z"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/emails/{email_id}/approve":{"post":{"operationId":"post_emails_email_id_approve","summary":"Approve an email, like Approve in the app","description":"Approve an email, like Approve in the app. It goes out from your mailboxes on the project's schedule once its campaign is sending. Approving a failed or cancelled email sends it again. 400 once it was sent.","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}}},"example":{"id":"a19c…","status":"approved"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/emails/{email_id}/skip":{"post":{"operationId":"post_emails_email_id_skip","summary":"Cancel an email so it never goes out","description":"Cancel an email so it never goes out. Approve can still send it later.","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}}},"example":{"id":"a19c…","status":"cancelled"}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/calls":{"get":{"operationId":"get_projects_project_id_calls","summary":"Calls to make, overdue first, then the ones made in the last 14 days, newest first, like the Calls page, for a dialer or CRM to work from","description":"Calls to make, overdue first, then the ones made in the last 14 days, newest first, like the Calls page, for a dialer or CRM to work from. bucket is overdue, today or done. local_time is the time where the lead is, and outside_hours says why now is outside their calling hours, or null.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"optional open or done, both without it","schema":{"type":"string"},"example":"done"},{"name":"owner","in":"query","description":"optional, a teammate's id or email, unassigned or everyone","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"segment_id":{"type":"string"},"kind":{"type":"string"},"step":{"type":"number"},"status":{"type":"string"},"due_at":{"type":"string"},"called_at":{"type":"string"},"outcome":{"type":"string"},"notes":{"type":"string"},"lead_name":{"type":"string"},"lead_title":{"type":"string"},"lead_company":{"type":"string"},"lead_phone":{"type":"string"},"owner_name":{"type":"string"},"bucket":{"type":"string"},"time_zone":{"type":"string"},"local_time":{"type":"string"},"outside_hours":{"type":"string"}}}},"example":[{"id":"9497…","lead_id":"c42e…","segment_id":"5d0a…","kind":"manual","step":0,"status":"done","due_at":"2026-11-04T14:00:00Z","called_at":"2026-11-04T14:05:00Z","outcome":"connected","notes":"Wants pricing for two sites","lead_name":"Sarah Chen","lead_title":"Founder","lead_company":"Northwind Studio","lead_phone":"+15035550142","owner_name":"Maya Patel","bucket":"done","time_zone":"America/Los_Angeles","local_time":"07:05","outside_hours":"It's 07:05 where they are. Call between 8:00 and 20:00 their time."}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/leads/{lead_id}/calls":{"post":{"operationId":"post_leads_lead_id_calls","summary":"Log a call made with the lead, from a dialer or by hand","description":"Log a call made with the lead, from a dialer or by hand. It closes their open call step if they have one, which moves their sequence on, and the outcome updates the lead as it does in the app.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"status":{"type":"string"},"outcome":{"type":"string"},"notes":{"type":"string"}}},"example":{"id":"9497…","lead_id":"c42e…","status":"done","outcome":"connected","notes":"Wants pricing for two sites"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","description":"connected, voicemail, no_answer, wrong_number, not_interested or meeting_booked"},"notes":{"type":"string","description":"optional"}}},"example":{"outcome":"connected","notes":"Wants pricing for two sites"}}}}}},"/leads/{lead_id}/meetings":{"get":{"operationId":"get_leads_lead_id_meetings","summary":"The lead's sales meetings from Fireflies, Fathom, Gong, Zoom or tl;dv, oldest first, with the agent's summary, next steps and the stage it suggests for their deal","description":"The lead's sales meetings from Fireflies, Fathom, Gong, Zoom or tl;dv, oldest first, with the agent's summary, next steps and the stage it suggests for their deal. Transcripts stay in Leads, and transcript_chars is a transcript's length.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"provider":{"type":"string"},"title":{"type":"string"},"started_at":{"type":"string"},"duration_secs":{"type":"number"},"attendees":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}}}},"summary":{"type":"string"},"next_steps":{"type":"array","items":{"type":"string"}},"suggested_stage":{"type":"string"},"stage_reason":{"type":"string"},"stage_status":{"type":"string"},"follow_up_status":{"type":"string"},"transcript_chars":{"type":"number"}}}},"example":[{"id":"3e81…","lead_id":"c42e…","provider":"fireflies","title":"Northwind x Acme intro","started_at":"2026-11-05T16:00:00Z","duration_secs":1860,"attendees":[{"name":"Sarah Chen","email":"sarah@northwind.studio"}],"summary":"Sarah wants one tool for both studios and a pilot in December.","next_steps":["Send pricing for two sites","Book a demo with their ops lead"],"suggested_stage":"Proposal","stage_reason":"They asked for pricing.","stage_status":"pending","follow_up_status":"draft","transcript_chars":18422}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/sent-emails":{"get":{"operationId":"get_projects_project_id_sent_emails","summary":"Emails Leads sent your leads: first emails, follow-ups, auto-replies and replies from the inbox","description":"Emails Leads sent your leads: first emails, follow-ups, auto-replies and replies from the inbox. Oldest first, up to 500 per request. Poll with since set to the last sent_at you saw, or get each one as it goes out with the Email sent webhook.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"optional RFC 3339 timestamp, returns emails sent after it","schema":{"type":"string"},"example":"2026-11-01T00:00:00Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"direction":{"type":"string"},"kind":{"type":"string"},"step":{"type":"number"},"subject":{"type":"string"},"body":{"type":"string"},"from_email":{"type":"string"},"to_email":{"type":"string"},"message_id":{"type":"string"},"sent_at":{"type":"string"}}}},"example":[{"id":"5d03…","lead_id":"c42e…","direction":"outbound","kind":"initial","step":0,"subject":"Northwind Studio x Acme","body":"Hi Sarah, …","from_email":"alex@acme.com","to_email":"sarah@northwind.studio","message_id":"9e1c…@acme.com","sent_at":"2026-11-03T15:40:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/email-events":{"get":{"operationId":"get_projects_project_id_email_events","summary":"Every counted open and click, oldest first and up to 500 a call, the polling twin of the email.opened and email.clicked webhooks","description":"Every counted open and click, oldest first and up to 500 a call, the polling twin of the email.opened and email.clicked webhooks. Opens and clicks by scanners and link checkers are left out. url is the clicked link, null for an open. Next time pass the last at you saw as since.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"optional RFC 3339 timestamp, returns events after it","schema":{"type":"string"},"example":"2026-11-01T00:00:00Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string"},"email_id":{"type":"string"},"lead_id":{"type":"string"},"url":{},"at":{"type":"string"}}}},"example":[{"id":"0c9e…","event":"email.opened","email_id":"a19c…","lead_id":"c42e…","url":null,"at":"2026-11-04T09:20:00Z"},{"id":"41d7…","event":"email.clicked","email_id":"a19c…","lead_id":"c42e…","url":"https://acme.com/pricing","at":"2026-11-04T09:21:00Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/stats":{"get":{"operationId":"get_projects_project_id_stats","summary":"Lifetime results and cost of a project and each of its campaigns","description":"Lifetime results and cost of a project and each of its campaigns. Money is in micro-dollars (1,000,000 = $1). AI cost is what Claude Code reports for the agent's runs, and email cost uses each mailbox's cost per email. Runs that research the whole project count only in totals. contacted counts leads sent at least one email and replies counts leads who wrote back, not bounces, so replies over contacted is the reply rate. steps has one entry per email of the sequence that went out, step 0 being the first email: a lead's first reply counts for the last email they got before it.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"totals":{"type":"object","properties":{"leads":{"type":"number"},"drafts":{"type":"number"},"scheduled":{"type":"number"},"sent":{"type":"number"},"contacted":{"type":"number"},"replies":{"type":"number"},"hot":{"type":"number"},"meetings":{"type":"number"},"ai_cost_micros":{"type":"number"},"email_cost_micros":{"type":"number"},"spend_micros":{"type":"number"},"cost_per_hot_micros":{"type":"number"}}},"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"companies":{"type":"number"},"leads":{"type":"number"},"sent":{"type":"number"},"contacted":{"type":"number"},"replies":{"type":"number"},"bounced":{"type":"number"},"hot":{"type":"number"},"spend_micros":{"type":"number"},"cost_per_hot_micros":{"type":"number"}}}},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"number"},"sent":{"type":"number"},"replied":{"type":"number"}}}}}},"example":{"totals":{"leads":240,"drafts":12,"scheduled":30,"sent":410,"contacted":230,"replies":19,"hot":4,"meetings":1,"ai_cost_micros":8420000,"email_cost_micros":410000,"spend_micros":8830000,"cost_per_hot_micros":2207500},"campaigns":[{"id":"5d0a…","name":"Design studios","status":"scaling","companies":60,"leads":120,"sent":230,"contacted":118,"replies":12,"bounced":2,"hot":3,"spend_micros":3120000,"cost_per_hot_micros":1040000}],"steps":[{"step":0,"sent":230,"replied":13},{"step":1,"sent":140,"replied":5},{"step":2,"sent":40,"replied":1}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/exports":{"get":{"operationId":"get_exports","summary":"Your organization's last 30 data exports to its own storage, newest first, with the files each wrote","description":"Your organization's last 30 data exports to its own storage, newest first, with the files each wrote. trigger is daily or manual, and status is running, done or failed.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dt":{"type":"string"},"trigger":{"type":"string"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"key":{"type":"string"},"rows":{"type":"number"},"bytes":{"type":"number"}}}},"rows":{"type":"number"},"bytes":{"type":"number"},"error":{},"started_at":{"type":"string"},"finished_at":{"type":"string"}}}},"example":[{"id":"6b0d…","dt":"2026-11-04","trigger":"daily","status":"done","files":[{"table":"leads","key":"splee/leads/dt=2026-11-04/part-0000.jsonl.gz","rows":4210,"bytes":391022}],"rows":4210,"bytes":391022,"error":null,"started_at":"2026-11-04T03:00:00Z","finished_at":"2026-11-04T03:01:12Z"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/projects/{project_id}/analytics":{"get":{"operationId":"get_projects_project_id_analytics","summary":"What the Analytics page shows for a date range: totals with the same totals for the period before in previous, a series per day (per week past 90 days), and breakdowns by campaign, mailbox, step, send weekday and hour, and channel","description":"What the Analytics page shows for a date range: totals with the same totals for the period before in previous, a series per day (per week past 90 days), and breakdowns by campaign, mailbox, step, send weekday and hour, and channel. Days and hours are in the project's time zone. Each thing counts on the day it happened, and a reply, bounce, meeting or won deal counts for the campaign, mailbox and step of the last email the lead got before it. Rates are by lead, out of contacted, except steps and the heatmap, which are out of the emails sent. claude_cost_micros leaves out runs when you filter by mailbox. won_value has one entry per currency, in cents. revenue_cents is what leads paid through Stripe, Paddle or Lemon Squeezy, less refunds, in the organization's currency, and ignored_payments counts payments in other currencies. revenue_per_meeting_cents is revenue over meetings. return_on_spend is revenue over spend, and null unless the organization's currency is USD, since spend is in dollars.","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"optional first day, YYYY-MM-DD. 29 days before to by default","schema":{"type":"string"}},{"name":"to","in":"query","description":"optional last day, YYYY-MM-DD. Today by default. At most 365 days in all","schema":{"type":"string"}},{"name":"segment_id","in":"query","description":"optional campaign id","schema":{"type":"string"}},{"name":"mailbox_id","in":"query","description":"optional mailbox id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"previous_from":{"type":"string"},"previous_to":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"revenue_tracked":{"type":"boolean"},"ignored_payments":{"type":"number"},"ignored_currencies":{"type":"array","items":{}},"interval":{"type":"string"},"totals":{"type":"object","properties":{"sent":{"type":"number"},"contacted":{"type":"number"},"delivered":{"type":"number"},"replies":{"type":"number"},"reply_rate":{"type":"number"},"hot":{"type":"number"},"hot_rate":{"type":"number"},"meetings":{"type":"number"},"deals_won":{"type":"number"},"won_value":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"value_cents":{"type":"number"}}}},"unsubscribes":{"type":"number"},"bounced":{"type":"number"},"bounce_rate":{"type":"number"},"claude_cost_micros":{"type":"number"},"email_cost_micros":{"type":"number"},"spend_micros":{"type":"number"},"cost_per_hot_micros":{"type":"number"},"cost_per_meeting_micros":{"type":"number"},"revenue_cents":{"type":"number"},"refunded_cents":{"type":"number"},"payments":{"type":"number"},"paying_leads":{"type":"number"},"revenue_per_meeting_cents":{"type":"number"},"return_on_spend":{"type":"number"}}},"previous":{"type":"object","properties":{}},"series":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"sent":{"type":"number"},"replies":{"type":"number"},"hot":{"type":"number"},"meetings":{"type":"number"}}}},"campaigns":{"type":"array","items":{"type":"object","properties":{"segment_id":{"type":"string"},"name":{"type":"string"},"sent":{"type":"number"},"replies":{"type":"number"},"reply_rate":{"type":"number"}}}},"mailboxes":{"type":"array","items":{"type":"object","properties":{"mailbox_id":{"type":"string"},"email":{"type":"string"},"sent":{"type":"number"},"bounce_rate":{"type":"number"},"bouncing":{"type":"boolean"}}}},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"number"},"sent":{"type":"number"},"replies":{"type":"number"},"reply_rate":{"type":"number"}}}},"heatmap":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"number"},"hour":{"type":"number"},"sent":{"type":"number"},"replies":{"type":"number"}}}},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"sent":{"type":"number"},"leads":{"type":"number"},"replies":{"type":"number"},"reply_rate":{"type":"number"}}}}}},"example":{"from":"2026-10-13","to":"2026-11-11","previous_from":"2026-09-13","previous_to":"2026-10-12","timezone":"Europe/London","currency":"USD","revenue_tracked":true,"ignored_payments":0,"ignored_currencies":[],"interval":"day","totals":{"sent":410,"contacted":230,"delivered":404,"replies":19,"reply_rate":0.083,"hot":4,"hot_rate":0.017,"meetings":2,"deals_won":1,"won_value":[{"currency":"USD","value_cents":1200000}],"unsubscribes":3,"bounced":6,"bounce_rate":0.026,"claude_cost_micros":8420000,"email_cost_micros":410000,"spend_micros":8830000,"cost_per_hot_micros":2207500,"cost_per_meeting_micros":4415000,"revenue_cents":1440000,"refunded_cents":0,"payments":3,"paying_leads":1,"revenue_per_meeting_cents":720000,"return_on_spend":1630.8},"previous":{},"series":[{"date":"2026-10-13","sent":14,"replies":1,"hot":0,"meetings":0}],"campaigns":[{"segment_id":"5d0a…","name":"Design studios","sent":230,"replies":12,"reply_rate":0.1}],"mailboxes":[{"mailbox_id":"8b2e…","email":"alex@acme.com","sent":205,"bounce_rate":0.02,"bouncing":false}],"steps":[{"step":0,"sent":230,"replies":13,"reply_rate":0.057}],"heatmap":[{"weekday":2,"hour":9,"sent":40,"replies":4}],"channels":[{"channel":"email","sent":410,"leads":230,"replies":17,"reply_rate":0.074}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/deal-stages":{"get":{"operationId":"get_deal_stages","summary":"Your pipeline's stages in board order, with how many deals each holds","description":"Your pipeline's stages in board order, with how many deals each holds. kind is open, won or lost, and auto is hot or booked for the stages a hot reply and a booked meeting move a deal to.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"position":{"type":"number"},"probability":{"type":"number"},"auto":{},"deals":{"type":"number"}}}},"example":[{"id":"8115…","name":"Interested","kind":"open","position":0,"probability":10,"auto":"hot","deals":4},{"id":"e19a…","name":"Proposal","kind":"open","position":2,"probability":50,"auto":null,"deals":2},{"id":"acee…","name":"Won","kind":"won","position":4,"probability":100,"auto":null,"deals":1}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/deals":{"get":{"operationId":"get_deals","summary":"Your organization's deals, the latest first, like the Pipeline page","description":"Your organization's deals, the latest first, like the Pipeline page. status is open, won or lost. value is in the deal's currency.","parameters":[{"name":"project_id","in":"query","description":"optional, all projects without it","schema":{"type":"string"},"example":"{project_id}"},{"name":"status","in":"query","description":"optional open, won or lost","schema":{"type":"string"},"example":"open"},{"name":"stage_id","in":"query","description":"optional, one stage's, one teammate's or one lead's deals","schema":{"type":"string"}},{"name":"owner_id","in":"query","description":"optional, one stage's, one teammate's or one lead's deals","schema":{"type":"string"}},{"name":"lead_id","in":"query","description":"optional, one stage's, one teammate's or one lead's deals","schema":{"type":"string"}},{"name":"page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}},{"name":"per_page","in":"query","description":"1-based page number, and 1 to 200 per page, default 50","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"lead_id":{"type":"string"},"lead_name":{"type":"string"},"lead_email":{"type":"string"},"company_name":{"type":"string"},"stage_id":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"close_date":{"type":"string"},"owner_id":{},"notes":{"type":"string"},"source":{"type":"string"},"stage_changed_at":{"type":"string"},"closed_at":{},"created_at":{"type":"string"}}}},"total":{"type":"number"}}},"example":{"items":[{"id":"5405…","project_id":"{project_id}","lead_id":"c42e…","lead_name":"Sarah Chen","lead_email":"sarah@northwind.studio","company_name":"Northwind Studio","stage_id":"e19a…","stage":"Proposal","status":"open","value":4800,"currency":"USD","close_date":"2026-12-15","owner_id":null,"notes":"Two sites, wants a call","source":"api","stage_changed_at":"2026-11-05T09:00:00Z","closed_at":null,"created_at":"2026-11-04T10:30:00Z"}],"total":1}}}},"4XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_deals","summary":"Open a deal for a lead, in the stage hot replies open deals in (auto hot on GET /deal-stages) unless you name one","description":"Open a deal for a lead, in the stage hot replies open deals in (auto hot on GET /deal-stages) unless you name one. A lead has one open deal at a time, so a second is 409. Returns the deal like the list.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string"},"value":{"type":"number"}}},"example":{"id":"5405…","stage":"Interested","status":"open","value":4800}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string","description":"the lead"},"stage":{"type":"string","description":"optional, a stage's id or its name"},"value":{"type":"number","description":"optional amount and ISO currency code"},"currency":{"type":"string","description":"optional amount and ISO currency code"},"close_date":{"type":"string","description":"optional YYYY-MM-DD"},"stage_id":{"description":"optional, a stage's id or its name"},"owner_id":{"description":"optional"},"notes":{"description":"optional"}}},"example":{"lead_id":"c42e…","stage":"Interested","value":4800,"currency":"USD","close_date":"2026-12-15"}}}}}},"/deals/{deal_id}/move":{"post":{"operationId":"post_deals_deal_id_move","summary":"Move a deal to another stage, by id or by name","description":"Move a deal to another stage, by id or by name. Moving it to Won closes it as won with value as its final amount, and to Lost with lost_reason.","parameters":[{"name":"deal_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string"},"value":{"type":"number"},"closed_at":{"type":"string"}}},"example":{"id":"5405…","stage":"Won","status":"won","value":5200,"closed_at":"2026-11-20T15:00:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string","description":"the stage's id or its name"},"value":{"type":"number","description":"optional final amount, for a won stage"},"stage_id":{"description":"the stage's id or its name"},"lost_reason":{"description":"optional, for a lost stage"}}},"example":{"stage":"Won","value":5200}}}}}},"/me":{"get":{"operationId":"get_me","summary":"The organization, key and projects your API key belongs to, for a tool's connection test","description":"The organization, key and projects your API key belongs to, for a tool's connection test.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"api_key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"}}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"example":{"organization":{"id":"4e7c…","name":"Acme"},"api_key":{"id":"0b9d…","name":"Zapier","prefix":"splee_k3Rt9x"},"projects":[{"id":"{project_id}","name":"Acme"}]}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/hooks":{"post":{"operationId":"post_hooks","summary":"Subscribe a URL to one event","description":"Subscribe a URL to one event. Leave out project_id to hear about every project. 400 for an unknown event or a URL Leads can't reach, like one on a private network.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"event":{"type":"string"},"target_url":{"type":"string"},"disabled_at":{},"created_at":{"type":"string"}}},"example":{"id":"e81f…","project_id":"{project_id}","event":"hot_lead","target_url":"https://hooks.zapier.com/hooks/standard/…","disabled_at":null,"created_at":"2026-11-12T09:30:00Z"}}}},"4XX":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string"},"target_url":{"type":"string"},"project_id":{"type":"string"}}},"example":{"event":"hot_lead","target_url":"https://hooks.zapier.com/hooks/standard/…","project_id":"{project_id}"}}}}},"get":{"operationId":"get_hooks","summary":"Your organization's subscriptions, oldest first","description":"Your organization's subscriptions, oldest first. live is false for one that stopped getting events, because its receiver answered 410 Gone or its API key was revoked. GET /hooks/e81f… returns one.","parameters":[{"name":"project_id","in":"query","description":"optional, only the ones this project's events go to, including those for every project","schema":{"type":"string"},"example":"{project_id}"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":"string"},"event":{"type":"string"},"target_url":{"type":"string"},"error":{},"disabled_at":{},"live":{"type":"boolean"}}}},"example":[{"id":"e81f…","project_id":"{project_id}","event":"hot_lead","target_url":"https://hooks.zapier.com/hooks/standard/…","error":null,"disabled_at":null,"live":true}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/hooks/{hook_id}":{"delete":{"operationId":"delete_hooks_hook_id","summary":"Unsubscribe, when the zap, scenario or workflow is turned off","description":"Unsubscribe, when the zap, scenario or workflow is turned off.","parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}},"example":{"ok":true}}}},"4XX":{"$ref":"#/components/responses/Error"}}}},"/hooks/samples/{event}":{"get":{"operationId":"get_hooks_samples_event","summary":"Up to 3 recent payloads of an event, the newest first, for a trigger's setup screen","description":"Up to 3 recent payloads of an event, the newest first, for a trigger's setup screen. With none yet, lead_added gives your newest leads and the others give one example.","parameters":[{"name":"event","in":"path","required":true,"schema":{"type":"string"}},{"name":"project_id","in":"query","description":"optional, only this project's","schema":{"type":"string"},"example":"{project_id}"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"lead":{"type":"object","properties":{"id":{"type":"string"},"full_name":{"type":"string"},"email":{"type":"string"}}},"reply":{"type":"object","properties":{"id":{"type":"string"},"body":{"type":"string"},"classification":{"type":"string"}}},"url":{"type":"string"}}}},"example":[{"event":"hot_lead","project":{"id":"{project_id}","name":"Acme"},"lead":{"id":"c42e…","full_name":"Sarah Chen","email":"sarah@northwind.studio"},"reply":{"id":"71aa…","body":"Sounds interesting, can you send times for next week?","classification":"hot"},"url":"…"}]}}},"4XX":{"$ref":"#/components/responses/Error"}}}}}}