Developers
Coolie API
Getting started
Create a key in the app, under Settings → API keys. It is shown once: keep it secret, as it acts as you, with your plan, your credits and your agents. Send it in the Authorization header of every request, or in an x-api-key header.
curl https://trycoolie.ai/api/v1/agents \
-H "Authorization: Bearer $COOLIE_API_KEY"Base URL https://trycoolie.ai/api/v1. Bodies and answers are JSON.
Limits and costs
- 60 requests a minute per account. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refused one carries Retry-After.
- 10 agents created through the API a day per account.
- Everything else is the app's: your plan's agents and daily leads, and the same credits for the same actions. The API costs nothing more, on the trial too.
Errors
An error answers with an HTTP status and a body { "error": code, "message": sentence }: branch on the code, show or log the message.
| 400 | invalid_json, invalid_body, invalid_query, invalid_icp_value | The request is malformed; message says what to fix. |
| 400 | insight_empty, insight_too_long, too_many_insights | The insight cannot be added as it stands; message says why. |
| 400 | invalid_template_field | A step's template, or a lead's own message, holds a merge field that would not be filled; message says which step and what to write instead. |
| 401 | missing_api_key, invalid_api_key | No key; or a value that is no Coolie key, or a key that is unknown or revoked. |
| 402 | trial_required, plan_required, payment_failed, payment_pending, no_credits | Start the trial in the app first; the trial or plan has ended: start the plan again in the app; pay with another card; wait for the first payment after the trial to go through; or buy credits. |
| 403 | work_email_required, agent_quota, agent_limit_running | Not allowed for this account or plan: every agent it may have, or run at once, is in use. |
| 403 | user_not_allowed | The key does not read the credits of a user with this id. |
| 404 | agent_not_found, lead_not_found, webhook_not_found, item_not_found, step_not_found, insight_not_found | Nothing with this id in your account. |
| 409 | agent_running | Stop the agent before editing its targeting. |
| 409 | campaign_running | Pause the campaign before editing it, then launch it again. |
| 409 | not_researched, researching | The lead has no research yet, or its research or writing is under way. |
| 409 | no_steps, no_email_account, no_linkedin_account, no_whatsapp_account, unknown_account, duplicate_step | The campaign cannot do this as it stands: a step or an account is missing, or not yours; message says which. |
| 409 | whatsapp_not_live | WhatsApp steps run in production only: anywhere else a campaign holding one is neither saved nor launched. |
| 503 | whatsapp_unavailable | WhatsApp is not switched on yet: nothing was saved. |
| 429 | rate_limited, agent_create_limit, daily_cap_reached, write_limit | A limit was reached; Retry-After says when to come back. |
Account and lists
/api/v1/accountYour plan, credits, subscription, agents in use and the leads one agent may deliver a day and a month, and the API's limits.
{
"account": {
"email": "you@company.com",
"plan": "starter",
"planName": "Coolie Starter",
"credits": 30,
"subscription": { "status": "active", "trialEnd": null, "currentPeriodEnd": "2026-12-08T00:00:00.000Z", "cancelAtPeriodEnd": false },
"agents": { "count": 1, "quota": 2 },
"leads": { "dailyCap": 30, "monthlyCap": 930 }
},
"limits": { "requestsPerMinute": 60, "agentCreationsPerDay": 10 }
}/api/v1/credits/historyWhat your credits were spent on over a period, newest first, and what each user spent.
A team owner's key reads the owner and the members, a member's key its own lines. A refund is a line of its own, its credits below zero and refund true; credits, lines and share count refunds. Days are UTC, the first and the last included.
Query
- days number
- 7, 30, 90: the last days, today's included. 30 by default.
- from, to string
- The first and the last day (YYYY-MM-DD) instead of days, 366 days at most; without to, up to today.
- user string
- One user's lines: an id from users.
- feature string
- One feature's lines: find_email, find_phone, research, people_search, linkedin_post, custom_signals, marketing, inbox, leads, other.
- limit number
- Lines per page, 1 to 100. 25 by default.
- cursor string
- The nextCursor of the page before.
Errors: invalid_query, user_not_allowed
{
"period": { "from": "2026-10-25", "to": "2026-11-23" },
"credits": 1.1,
"lines": 4,
"users": [
{ "id": "5b0e…", "name": "Dana Reyes", "email": "you@company.com", "credits": 1, "lines": 1, "share": 0.9091 },
{ "id": "a91c…", "name": "Sam Ortiz", "email": "sam@company.com", "credits": 0.1, "lines": 3, "share": 0.0909 }
],
"history": [
{ "id": "ce-41b7…", "at": "2026-11-23T10:24:08.114Z", "userId": "a91c…", "userName": "Sam Ortiz", "feature": "find_email", "featureName": "Find email", "credits": -0.1, "refund": true },
{ "id": "ce-8c1d…", "at": "2026-11-23T10:24:02.530Z", "userId": "a91c…", "userName": "Sam Ortiz", "feature": "find_email", "featureName": "Find email", "credits": 0.1, "refund": false }
],
"nextCursor": "WyIyMDI2LTExLTIzVDEwOjI0OjAyLjUzMFoiLCJjZS04YzFkLi4uIl0"
}/api/v1/signalsThe buying signals an agent can watch, with an available flag.
{ "signals": [ { "id": "hiring", "name": "Hiring", "description": "…", "available": true } ] }/api/v1/icp-optionsThe values an ICP's locations, industries and company sizes are taken from, the regions a location may name instead of its countries (Europe, North America, Latin America, Asia-Pacific, Middle East, Africa, DACH, Nordics), and job title suggestions. A value outside these lists is refused (400 invalid_icp_value).
/api/v1/catalog/technologiesSearches the technologies of the tech-used signal.
Query
- q string
- Words to look for.
/api/v1/catalog/topicsSearches the topics of the buying-intent-topic signal.
Query
- q string
- Words to look for.
/api/v1/catalog/competitorsThe products the competitor-churn and competitor-renewal signals know.
Agents
An agent watches buying signals at the companies of its ICP and delivers the right contact there, every day, up to your plan's daily leads. An active agent runs on its own schedule; creating one launches its first search at once.
/api/v1/agentsYour agents, newest first, each with its activity: its last search, when it searches next, and a summary.
{ "agents": [ … ] }/api/v1/agentsCreates an agent and launches its first search.
Uses one of your plan's agents. At most 10 agents created through the API a day (429 agent_create_limit).
Body (JSON)
- name string · required
- The agent's name.
- icp object · required
- Who to contact and at which companies: jobTitles (at least one, free text), industries, locations, companySizes (values from GET /icp-options; a location may also be a region it lists, such as "Europe" or "DACH", which stands for its countries), keywordsInclude, keywordsExclude, mode ("broad" or "specific").
- signalEventIds string[] · required
- 3 to 5 signal ids from GET /signals whose available is true.
- signalConfigs object
- Settings per signal, keyed by its id: hiring { jobTitles, jobDescriptionKeywords }, tech-used { technologies, slugs }, buying-intent-topic { topics, slugs }, competitor-churn { competitors }… At most 5 values a list.
- findEmail boolean · required
- Look up each lead's email.
- findPhone boolean · required
- Look up each lead's phone.
- sequenceConfig object
- How the outreach messages are written. A default otherwise.
Errors: trial_required, plan_required, agent_quota, invalid_body, invalid_icp_value, signal_coming_soon, signal_withdrawn, signal_not_live, signal_input_missing, too_few_searches, agent_create_limit
curl https://trycoolie.ai/api/v1/agents \
-H "Authorization: Bearer $COOLIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Hospitals in France",
"icp": {
"jobTitles": ["COO"], "industries": ["Hospitals and Health Care"],
"locations": ["France"], "companySizes": ["201-500 employees"],
"keywordsInclude": [], "keywordsExclude": [], "mode": "broad"
},
"signalEventIds": ["hiring", "funding", "tech-used"],
"findEmail": true,
"findPhone": false
}'{ "agentId": "agent-3f2a91c0", "runId": "run-8c1d…" }/api/v1/agents/{agentId}One agent, with its activity: leads so far and today, its last three searches and what each signal found, when it searches next (null while paused), and a summary to show as it is.
{
"agent": {
"id": "agent-3f2a91c0",
"name": "Hospitals in France",
"status": "active",
"createdAt": "2026-10-01T09:12:44.120Z",
"icp": {
"jobTitles": ["COO", "Head of Operations"],
"industries": ["Hospitals and Health Care"],
"locations": ["France"],
"companySizes": ["201-500 employees", "501-1000 employees"],
"keywordsInclude": [],
"keywordsExclude": [],
"mode": "broad"
},
"signalEventIds": ["hiring", "funding", "tech-used"],
"signalConfigs": { "hiring": { "jobTitles": ["Operations Manager"] } },
"findEmail": true,
"findPhone": false,
"sequenceConfig": null,
"autoWritePerDay": 0,
"activity": {
"leads": { "total": 12, "today": 3 },
"lastSearches": [
{
"at": "2026-10-01T12:00:03.000Z",
"running": false,
"newLeads": 3,
"title": "3 new leads",
"signals": [{ "signal": "hiring", "name": "Hiring", "text": "8 results, 4 new companies: 3 leads." }],
"note": null
}
],
"nextSearchAt": "2026-10-01T15:00:00.000Z",
"summary": "Its last search (5 minutes ago) brought 3 new leads. 12 leads so far, 3 today. Next search in 2 h 55 min."
}
}
}/api/v1/agents/{agentId}Changes the fields given, and status ("active" or "paused").
A running agent's targeting is locked (409 agent_running): stop it first.
Body (JSON)
- name string
- The agent's name.
- icp object
- Who to contact and at which companies: jobTitles (at least one, free text), industries, locations, companySizes (values from GET /icp-options; a location may also be a region it lists, such as "Europe" or "DACH", which stands for its countries), keywordsInclude, keywordsExclude, mode ("broad" or "specific").
- signalEventIds string[]
- 3 to 5 signal ids from GET /signals whose available is true.
- signalConfigs object
- Settings per signal, keyed by its id: hiring { jobTitles, jobDescriptionKeywords }, tech-used { technologies, slugs }, buying-intent-topic { topics, slugs }, competitor-churn { competitors }… At most 5 values a list.
- findEmail boolean
- Look up each lead's email.
- findPhone boolean
- Look up each lead's phone.
- sequenceConfig object
- How the outreach messages are written. A default otherwise.
- status string
- "active" or "paused".
Errors: agent_not_found, agent_running, agent_limit_running, invalid_body, invalid_icp_value, signal_withdrawn, signal_input_missing, too_few_signals, too_few_searches
/api/v1/agents/{agentId}/startSwitches the agent on: it runs again on its schedule.
Errors: agent_limit_running, too_few_signals, too_few_searches
/api/v1/agents/{agentId}/pausePauses the agent: no new search until it is started.
/api/v1/agents/{agentId}/stopStops the search in flight (what it found stays) and pauses the agent, so it can be edited.
{ "stopped": 1, "abandoned": 4, "status": "paused" }/api/v1/agents/{agentId}Deletes the agent with its runs and leads. This cannot be undone.
{ "deleted": "agent-3f2a91c0" }Leads
A lead is named by its runId and prospectId. Lists are newest first, a page at a time: pass nextCursor back as cursor for the next page, or since to get only what came in after a moment.
/api/v1/leadsYour leads, every agent's.
Query
- agentId string
- One agent's leads only.
- since ISO 8601
- Leads found after this instant only.
- limit 1–100
- Leads per page, 25 by default.
- cursor string
- The nextCursor of the page before.
- includeNoContact true or false
- Also list the companies where nobody matched the agent's job titles (status no_contact, contact null). False by default: they are not leads.
{
"leads": [
{
"runId": "run-8c1d…",
"prospectId": "p-41b7…",
"agentId": "agent-3f2a91c0",
"status": "enriched",
"processedAt": "2026-10-01T10:02:13.511Z",
"icpMatch": true,
"aiScore": 8.4,
"feedback": null,
"signal": {
"type": "hiring",
"name": "Hiring",
"headline": "Operations Manager",
"detail": null,
"competitor": null,
"influencer": null,
"url": "https://jobs.example.com/12345",
"postedAt": "2026-09-29"
},
"company": {
"name": "Example Health",
"domain": "examplehealth.fr",
"website": "https://examplehealth.fr",
"linkedinUrl": "https://www.linkedin.com/company/example-health",
"industry": "Hospitals and Health Care",
"employees": 320,
"country": "France",
"locations": ["Lyon, France"]
},
"contact": {
"name": "Camille Martin",
"title": "COO",
"seniority": null,
"linkedinUrl": "https://www.linkedin.com/in/camille-martin",
"country": "France",
"email": "camille.martin@examplehealth.fr",
"emailConfidence": 0.92,
"emailUnverified": false,
"phone": null
},
"research": null,
"sequence": null
}
],
"nextCursor": "WyIyMDI2LTEwLTAxVDEwOjAyOjEzLjUxMVoiLCJwLTQxYjcuLi4iXQ"
}/api/v1/agents/{agentId}/leadsOne agent's leads; the same query as /leads.
/api/v1/agents/{agentId}/exportThe agent's leads as the CSV file the app downloads.
Query
- leads string
- runId:prospectId,… to export only those.
- includeNoContact true or false
- Also export the companies where nobody matched the job titles, after the leads. False by default.
/api/v1/agents/{agentId}/leads/contactFinds one lead's email or phone, as the app's Find email and Find phone.
An email is looked up through a waterfall of email sources, asked one after another until one finds it, which can take up to three minutes. Charged only when something is found (0.1 credit an email, 1 a phone); free when it is already known.
Body (JSON)
- runId string · required
- The lead's runId, from the leads list.
- prospectId string · required
- The lead's prospectId, from the leads list.
- field string · required
- "email" or "phone".
Errors: lead_not_found, no_contact, no_credits, sources_unavailable
{ "found": true, "value": "camille.martin@examplehealth.fr", "charged": 0.1 }/api/v1/agents/{agentId}/leads/actionsResearches leads (the Research Agent), and writes their sequences when asked, or deletes them from the list.
Research runs in the background, a minute or two a lead: the answer is 202 with how many were queued, and the lead's research appears in /leads when done. Its sequence is written too only with writeSequence true; otherwise POST /leads/sequence writes it from the insights you choose. 1 credit a lead researched, charged when its research is saved; the balance must cover the batch (402 no_credits). Asking again for leads still queued resumes them, at no extra charge.
Body (JSON)
- action string · required
- "research" or "delete".
- leads object[] · required
- Up to 50 { runId, prospectId }.
- writeSequence boolean
- With research: also write each lead's sequence, for the agent's campaign steps. Default false.
Errors: no_credits, agent_not_found
{ "queued": 3, "skipped": 0 }/api/v1/agents/{agentId}/leads/feedbackA lead's thumbs: the AI score learns from them.
Body (JSON)
- runId string · required
- The lead's runId, from the leads list.
- prospectId string · required
- The lead's prospectId, from the leads list.
- feedback string | null · required
- "up", "down", or null to take it back.
/api/v1/agents/{agentId}/leads/insightsAdds your own insight to a researched lead, as the research panel's Add custom insight.
Kept with the lead's research, after the agent's insights, with custom true: 5,000 characters at most, five a lead. It changes none of the lead's messages until POST /leads/sequence writes them from it. Free. The answer is 201, with its id and the lead's research.
Body (JSON)
- runId string · required
- The lead's runId, from the leads list.
- prospectId string · required
- The lead's prospectId, from the leads list.
- text string · required
- The insight, in your words.
Errors: lead_not_found, not_researched, researching, insight_empty, insight_too_long, too_many_insights
{
"insightId": "c1",
"research": {
"companyContext": "…",
"roleTension": "…",
"confidence": "high",
"insights": [
{
"id": "s1",
"custom": false,
"type": "Hiring Activity",
"insight": "Example Health is hiring: Operations Manager",
"date": "2026-09-29",
"relevancy": "The buying signal that brought this lead in.",
"score": null,
"sources": ["https://jobs.example.com/12345"],
"hiddenProblem": null
},
{
"id": "c1",
"custom": true,
"type": "Custom Insight",
"insight": "Met Camille at a trade show in September: their two sites still plan shifts by hand.",
"date": "2026-10-13",
"relevancy": "Written by you.",
"score": null,
"sources": [],
"hiddenProblem": null
}
],
"persona": null
}
}/api/v1/agents/{agentId}/leads/insightsRemoves one of your own insights from a lead. The agent's insights cannot be removed.
Body (JSON)
- runId string · required
- The lead's runId, from the leads list.
- prospectId string · required
- The lead's prospectId, from the leads list.
- insightId string · required
- Its id, from POST /leads/insights or the lead's research (custom true).
Errors: lead_not_found, insight_not_found, researching
{ "research": { … } }/api/v1/agents/{agentId}/leads/sequenceWrites a researched lead's messages again from the insights you choose, as the research panel's button.
insightIds are ids from the lead's research, your own included; without any (or none the lead holds), the agent's five best. The new messages replace the lead's, and the steps of its campaign that personalize and have not gone out yet use them. Free; up to a minute, the request waits for it.
Body (JSON)
- runId string · required
- The lead's runId, from the leads list.
- prospectId string · required
- The lead's prospectId, from the leads list.
- insightIds string[]
- Up to 50 insight ids.
Errors: lead_not_found, not_researched, researching, write_failed
{ "sequence": [ { "channel": "email", "step": 1, "subject": "…", "body": "…" } ] }Campaigns
Each agent has one outreach campaign: its steps in order (an email, a LinkedIn invitation or message, a WhatsApp message, each with its delay, its AI writing settings and its template), its sending rules (working hours and days) and the accounts it sends from. Its queue holds the leads it writes to, each with its own messages. Launching it sends real emails, LinkedIn and WhatsApp messages from your own accounts, within its working hours. Templates speak to the lead through merge fields: {{first_name}}, {{last_name}}, {{company}}, {{title}}, {{sender_name}}, {{sender_company}}.
/api/v1/agents/{agentId}/campaignThe campaign: its steps, sending rules, accounts, status (draft, active or paused) and each step's numbers.
Made, a draft, the first time it is asked for. Its emailAccountId and linkedinAccountId are ids from its accounts. A campaign built to branch in the app has its tree in campaign.flow (null while it is linear), its steps listed a branch's Yes before its No.
Errors: agent_not_found
/api/v1/agents/{agentId}/campaignSaves the campaign's language, steps, autopilot, sending rules and accounts.
steps is the whole sequence, in order: send back what GET gave, changed. A step left out is deleted, and a new step needs its own id (st- then 6 to 16 hex digits). A running campaign (status active) is locked, so that each lead gets the sequence it started: pause it (POST /agents/{agentId}/campaign/pause), save your changes, then launch it again. Until then this answers 409 campaign_running and changes nothing. A campaign that branches (its flow set in the app) keeps its shape: send its same steps, by id, each changed as you want; adding, removing or moving one answers 409 campaign_branches, and its branches are edited in the app for now. A template's merge fields are written with two braces on each side, {{first_name}}, {{last_name}}, {{full_name}}, {{company}}, {{title}}, {{sender_name}}, {{sender_company}} or {{sender_offer}}, spaces inside and any case allowed: a template you add or change, or a variant you switch on, holding any other ({first_name}}, {{firstname}}, {{}}) answers 400 invalid_template_field and saves nothing, with the step (stepId, its number step), the variant (A for the step's own message), the field (subject or body) and each problem (what was found, where, and what to write instead); templates lists every such text, fields the names a field may have. A message you empty or add with no words (an email's body, a note that goes, a message, a comment; a subject may be empty) answers 400 empty_message and saves nothing, with the step, the variant and the field, and empty listing each one. A template already saved and left as it is goes through, whatever it holds, so the rest of the campaign can still be changed; an empty one stops its launch. Send version, the campaign's updatedAt as GET gave it, and a save made after someone else changed the campaign (the app, another program) answers 409 campaign_changed with the campaign as it is now, instead of undoing their change; without version, your save goes over whatever is there.
Body (JSON)
- language string
- english, french, spanish, german, italian, portuguese or dutch.
- steps object[]
- The sequence, each step as GET gives it: channel, role, delayDays, tone, framework, cta, length, personalize, template { subject, body }, ownPrompt (your own instructions for the AI, in place of the role; null for none)… channel is email, li_invite, li_message or li_inmail, or a LinkedIn step without a message: li_visit (a profile visit they see), li_like (a like on their latest post), li_comment (a comment on their latest post, written from it when personalize is on, else the template), li_withdraw (takes back the campaign's invitation if it still waits), wa_message (a WhatsApp message to the lead's phone number, from one of the agent's WhatsApp accounts, once WhatsApp is open on your account; a lead without a number WhatsApp can read skips it), or call: a call you make yourself, with a script written for each lead from its research; once due it waits in the app's Queue until you say how it went; nothing is dialled. 12 steps at most, 8 of them emails, invitations, messages and calls.
- autopilot boolean
- The agent's new leads join the queue on their own.
- rules object
- workingHoursStart and workingHoursEnd (HH:MM), timezone, workingDays (1 to 7), pauseOnReply, pauseOnOoo, randomDelay, and with randomDelay minDelayMinutes and maxDelayMinutes (1 to 600, both or neither: the gap between two sends of an account; null, the day's sends spread over the working hours), and autoReply: true, the campaign's autopilot answers its leads' replies on its own, from the account the conversation is on, 20 to 60 minutes after them, in the working hours, 20 a day at most, never a Not interested, an Unsubscribe or an Out of office, and not in a conversation you wrote in yourself; false, the default, the app's Inbox writes a draft of each reply for you to send. GET gives back autoReplySince too, when it was switched on: it answers the replies received from then on. Added on October 21, 2026. GET gives back autopilotSince too, when autopilot was switched on in a campaign launched before: it adds the leads found from then on, and a lead found before is added by you. Added on November 25, 2026. newLeadsFirst: true, of the leads waiting for their first step, the ones added to the queue last go out first, the best AI score first among those added together; false, the default, the best AI score goes first, whenever a lead was added, at the same score the lead added first. The leads already in their sequence go before either, keeping their pace, and the daily caps and working hours are the same. Added on November 1, 2026.
- accountIds string[]
- The accounts it sends from, ids from its accounts, in any mix of mailboxes, LinkedIn accounts and WhatsApp numbers. Each lead is given one account of a kind for its whole sequence, in turn among those with room left under their daily caps; a lead keeps it while it stays connected. emailAccountId and linkedinAccountId are the first of each kind among them. Added on November 2, 2026.
- emailAccountId string | null
- The mailbox it sends from: an id from its accounts. Set alone, it takes the place of the first mailbox among accountIds; the first already, accountIds stay as they are.
- linkedinAccountId string | null
- The LinkedIn account it sends from: an id from its accounts. Set alone, it takes the place of the first LinkedIn account among accountIds; the first already, accountIds stay as they are.
- version string
- The campaign's updatedAt as you last read it (optional). Sent, a save made after the campaign changed elsewhere answers 409 campaign_changed with the campaign as it is now, and saves nothing; read it again and send your change over it. Added on November 8, 2026.
Errors: campaign_running, unknown_account, duplicate_step, invalid_template_field, empty_message, campaign_changed, whatsapp_not_live, whatsapp_unavailable, agent_not_found
/api/v1/agents/{agentId}/campaign/launchStarts sending, from your own accounts, within its working hours.
With autopilot on, the agent's leads (those found since rules.autopilotSince, when it is set) join the queue at once, then as they come. A step whose message has no words (an email's body, a note that goes, a message) is refused with empty_message, its message naming the step.
Errors: no_steps, no_email_account, no_linkedin_account, no_whatsapp_account, whatsapp_not_live, empty_message
/api/v1/agents/{agentId}/campaign/pauseStops sending until it is launched again; the queue keeps its places.
/api/v1/agents/{agentId}/campaign/writeWrites one step's template with AI, from the step's settings and your sender identity. Nothing is saved.
Body (JSON)
- step object · required
- The step, as in the campaign's steps.
- language string · required
- The campaign's language.
Errors: step_has_no_message, write_limit, write_unavailable, write_failed
{ "template": { "subject": "…", "body": "Hi {{first_name}}, …" } }/api/v1/agents/{agentId}/queueThe leads in the campaign, 50 a page, the next send first.
Each row: the lead, its next step and when, its status, whether its messages are personalized (from its research) or the step templates, and flags, what keeps a step from going out. notQueued counts the agent's leads not in the queue yet. A lead whose next message holds a merge field that would not be filled is not sent: it is paused, its pausedReason starting with "Not sent: " and saying where the field is and how to fix it; once the step's template (PATCH the campaign) or the lead's own message (PATCH the lead) is fixed, it goes out on its own. A lead waiting for its first step (status scheduled) carries its AI score, and its next step says when its turn comes: the leads are listed in the order they go, the best score first, or, with the campaign's rules.newLeadsFirst on (campaign.newLeadsFirst here), the ones added last first.
Query
- status string
- One status only; all by default.
- q string
- Searches the leads' names and companies.
- offset number
- Rows to skip.
/api/v1/agents/{agentId}/queueAdds the agent's leads to the queue; those already in it are left alone.
One person, one campaign of your account at a time: a lead that another campaign of your account (or of your team) has queued or contacted in the last 90 days is not added. It comes back in skipped, with reason in_other_campaign and the agent whose campaign has them.
Body (JSON)
- all true
- Every lead of the agent.
- prospectIds string[]
- Or these leads only, up to 500.
{ "added": 12, "skipped": [{ "prospectId": "p-…", "reason": "in_other_campaign", "campaignId": "cmp-…", "agentName": "EU fleet managers" }] }/api/v1/agents/{agentId}/queue/actionsPauses, resumes or removes queued leads, or switches their messages to personalized or to the templates.
personalize orders the leads' research: 1 credit a lead not researched yet, which the balance must cover (402 no_credits). The answer is 202 while research runs. resume leaves paused a lead another campaign of your account has, and lists it in held, as skipped above.
Body (JSON)
- action string · required
- pause, resume, remove, personalize or template.
- ids string[] · required
- Up to 200 ids of queue rows.
Errors: no_credits
{ "updated": 2, "researching": 0 }/api/v1/agents/{agentId}/queue/{itemId}One lead's messages, step by step, as they would go out, and what happened so far.
Each step's source says where its message comes from: edited (yours), personalized (its research) or template. Its day is the day of the sequence it goes out on, on the path where it goes: path says what the lead must have done for that, connected (once they accept), not_connected (if they still have not), replied or not_replied, absent when it does not depend on them; sooner, an earlier day a step that always goes moves to when they accept or reply first. A step behind the lead that did not go out has skipped: true.
Errors: item_not_found
/api/v1/agents/{agentId}/queue/{itemId}Your own message for the lead's steps not sent yet; null takes an edit back.
Merge fields are written as in a template, {{first_name}}, {{company}} and the others, two braces on each side: a message added or changed holding any other ({first_name}}, {{firstname}}, {{}}) answers 400 invalid_template_field and saves nothing, with the step (stepId, its number step), the field (subject or body) and each problem (what was found, where, and what to write instead); templates lists every such text, fields the names a field may have. A lead held for a broken field goes out once its message is fixed.
Body (JSON)
- edits object · required
- { [stepId]: { subject, body } | null }
Errors: invalid_template_field, item_not_found
{ "ok": true }/api/v1/agents/{agentId}/queue/{itemId}/regenerateWrites one step's message for this lead again with AI. Nothing is saved: PATCH the lead to keep it.
Body (JSON)
- stepId string · required
- The step, from the lead's messages.
Errors: item_not_found, step_not_found, step_has_no_message, write_limit
{ "subject": "…", "body": "…" }Settings
/api/v1/settingsYour profile and the sender identity every message is signed with.
/api/v1/settingsSaves the profile and/or the sender identity (sender null clears it).
Body (JSON)
- profile object
- { fullName, linkedinUrl, companyLinkedinUrl }
- sender object | null
- { company, website, pitch, sender_name, sender_role, calendly_url, proof_points }
Webhooks
Coolie POSTs an event to your https address as it happens: lead.created (an agent found a new lead), lead.enriched (Find email or Find phone found one), lead.researched (the Research Agent finished a lead), message.sent (a campaign sent a lead an email, an invitation, a LinkedIn message or a comment on their post), lead.replied (a lead answered a campaign, or asked it to stop). Settings → Webhooks in the app does the same as these routes. How to read the events: Receiving webhooks, below. Changed on October 20, 2026: lead.created is no longer sent for a company where nobody matches the agent's job titles (status no_contact); when someone there engaged on LinkedIn and Make it a lead on the Leads page makes them a lead, lead.created is sent then, with them as its contact and icpMatch false.
/api/v1/webhooksYour webhooks, with their secrets, and the latest deliveries.
/api/v1/webhooksAdds a webhook: the events chosen go to its address from now on. The answer carries its secret.
Body (JSON)
- url string · required
- An https address on the public internet.
- events string[] · required
- Any of "lead.created", "lead.enriched", "lead.researched", "message.sent", "lead.replied".
Errors: invalid_url, no_events, too_many_webhooks
{ "url": "https://hooks.zapier.com/hooks/catch/123/abc/", "events": ["lead.created"] }{ "webhook": { "id": "whk_…", "url": "https://hooks.zapier.com/hooks/catch/123/abc/", "events": ["lead.created"], "enabled": true, "secret": "whsec_…", "last": null } }/api/v1/webhooks/{webhookId}Turns a webhook off, or on again.
Body (JSON)
- enabled boolean · required
- false stops the events; true sends them again.
Errors: webhook_not_found
/api/v1/webhooks/{webhookId}Removes a webhook and its events.
Errors: webhook_not_found
/api/v1/webhooks/{webhookId}/testSends a test event now, a made-up lead in the real shape, and says what your address answered.
Errors: webhook_not_found
{ "delivered": true, "httpStatus": 200, "error": null }MCP server
Connect Coolie to Claude, Cursor or any client of the Model Context Protocol, and ask in plain words: set up an agent for a market, show today's leads, find this person's email, pause an agent. The server takes the same key and has the same limits as the API; each message counts as one request.
- URL
- https://trycoolie.ai/api/mcp
- Transport
- Streamable HTTP
- Header
- Authorization: Bearer YOUR_API_KEYorx-api-key: YOUR_API_KEY
Claude (web, desktop and mobile)
In Claude, open Customize → Connectors, click + Add, then Add custom connector (on a Team or Enterprise plan, an Owner adds it in Organization settings → Connectors). Enter the URL above and keep Sign in now, then click Add: each person logs in to Coolie and allows the connection, which signs in with OAuth 2.1 (PKCE; Claude's published client identity, or dynamic registration) and appears in Settings → API keys, where it can be revoked. With an API key instead, choose No sign-in and add a request header x-api-key with the key as its value.
Claude Code
claude mcp add --transport http coolie https://trycoolie.ai/api/mcp \
--header "Authorization: Bearer YOUR_API_KEY"Claude Desktop, Cursor and others
Settings → MCP in the app gives the configuration to paste for each, with this address.
Tools
get_account, list_credit_usage, list_signals, get_icp_options, search_catalog, list_agents, get_agent, create_agent, update_agent, start_agent, pause_agent, stop_agent, delete_agent, list_leads, find_contact, research_leads, delete_leads, rate_lead, add_lead_insight, remove_lead_insight, write_lead_sequence, get_campaign, update_campaign, launch_campaign, pause_campaign, write_step, list_queue, add_to_queue, update_queue, get_queue_item, edit_queue_messages, regenerate_message, get_settings, update_settings.
Receiving webhooks
Each event is a POST of JSON to your address: its id (the same on every try, to dedupe on), its type, when it happened, and the lead, in the shape GET /leads gives. A Zapier or Make "catch hook", an n8n webhook node or your own server will do: add its address in Settings → Webhooks, or with POST /webhooks.
POST https://your-server.example/coolie
Content-Type: application/json
Coolie-Event: lead.created
Coolie-Event-Id: evt_7Hq2…
Coolie-Signature: t=1790935200,v1=5f0c…
{
"id": "evt_7Hq2…",
"type": "lead.created",
"createdAt": "2026-10-02T09:00:00.000Z",
"data": {
"lead": {
"runId": "…", "prospectId": "…", "agentId": "…",
"status": "enriched", "aiScore": 8,
"signal": { "type": "hiring", "name": "Hiring", "headline": "Head of Sales Operations", … },
"company": { "name": "Example Robotics", "domain": "example.com", … },
"contact": { "name": "Jordan Lee", "title": "VP of Sales", "email": null, … },
"research": null, "sequence": null
}
}
}A campaign's events carry the lead and what happened: message.sent its message (campaignId, queueItemId, stepId, step, channel, subject, body, sentAt; an invitation without a note has neither, a comment on their post its text as body; a profile visit, a like and a withdrawal send none), lead.replied their reply (campaignId, queueItemId, kind "reply" or "stop", channel "email" or "linkedin", subject, text, receivedAt). An out-of-office or a bounce is not a reply.
- Coolie-Event
- lead.created, lead.enriched, lead.researched, message.sent, lead.replied, or test
- Coolie-Event-Id
- The event's id
- Coolie-Signature
- t=<unix seconds>,v1=<HMAC-SHA256 of "t.body" with your secret, in hex>
Checking the signature (Node.js)
import crypto from "node:crypto";
// rawBody: the request's body as received, before any JSON parsing.
function fromCoolie(rawBody, signatureHeader, secret) {
const parts = Object.fromEntries(signatureHeader.split(",").map((p) => p.split("=")));
const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(parts.v1 ?? "");
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
return fresh && a.length === b.length && crypto.timingSafeEqual(a, b);
}Answer with a 2xx within ten seconds. Anything else is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then left as failed; Settings → Webhooks shows each delivery. A 410 Gone turns the webhook off. Events may arrive out of order: sort on createdAt when it matters.
