Prospek API
Run your outbound from your own code, CRM or AI agent: read projects and campaigns, adjust budgets, pause or resume campaigns, pull hot leads with their replies and answer them in the same thread. Every endpoint speaks JSON over HTTPS.
https://prospek.baptisthecht.fr/api/v1Quick start: create a key, then list your projects.
- Open API keys and click Create API Key. Copy the secret — it's shown once.
- Store it as an environment variable:
export API_KEY=sk_live_… - Call any endpoint with the key in the Authorization header.
curl "https://prospek.baptisthecht.fr/api/v1/projects" \
-H "Authorization: Bearer $API_KEY"Authentication
Send your secret key as a bearer token on every request: Authorization: Bearer sk_live_…. Keys belong to a workspace and can be limited to specific projects; requests for other projects return 403. Only owners and admins can create keys.
{
"error": {
"code": "invalid_api_key",
"message": "Invalid or revoked API key.",
"status": 401
}
}Rate limits
Each key can make 60 requests per minute (sliding window). Every response carries the current budget:
X-RateLimit-LimitRequests allowed per minute (60).X-RateLimit-RemainingRequests left in the current window.X-RateLimit-ResetUnix time (seconds) when the oldest request leaves the window.Retry-AfterOn 429 only: seconds to wait before retrying.When you hit the limit you get 429 rate_limited. Back off for Retry-After seconds; polling /leads/hot once a minute is plenty.
Errors
Errors use standard HTTP status codes and a consistent JSON body. details appears on validation errors.
{
"error": {
"code": "invalid_request",
"message": "daily_budget_usd: Too small: expected number to be >=0",
"status": 400,
"details": [
{
"path": "daily_budget_usd",
"message": "Too small: expected number to be >=0"
}
]
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter or the JSON body is invalid. `details` lists each problem. |
| 401 | missing_api_key | No Authorization header. |
| 401 | invalid_api_key | The key is wrong or was revoked. |
| 403 | forbidden | The key is limited to other projects. |
| 404 | not_found | No such object in your workspace (or no such endpoint). |
| 409 | invalid_state | The action doesn't fit the object's state, e.g. resuming a draft. |
| 409 | lead_unreachable | The lead has no email, bounced or unsubscribed. |
| 409 | no_thread | The lead hasn't been emailed yet, so there's nothing to reply to. |
| 429 | rate_limited | More than 60 requests in a minute with this key. Wait Retry-After seconds. |
| 500 | internal_error | Something broke on our side. Retry with backoff. |
Pagination
GET /leads returns up to limit items (default 50, max 200) ordered by last update, plus has_more and next_cursor. Pass the cursor back as ?cursor= to get the next page; keep the other filters the same. To poll for changes, store the time of your last sync and send it as since.
let cursor = null;
const leads = [];
do {
const url = new URL("https://prospek.baptisthecht.fr/api/v1/leads");
url.searchParams.set("intent", "hot_lead");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.API_KEY}` } });
const page = await res.json();
leads.push(...page.data);
cursor = page.has_more ? page.next_cursor : null;
} while (cursor);Projects
List projects
/api/v1/projectsEvery project (one per website you sell) the key can access, with its budget and lifetime stats.
include_archivedbooleanInclude archived projects. Default false.
curl "https://prospek.baptisthecht.fr/api/v1/projects" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"id": 12,
"object": "project",
"domain": "acme-events.com",
"company_name": "Acme Events",
"status": "active",
"daily_budget_usd": 20,
"monthly_cap_usd": null,
"autopilot_enabled": true,
"channels": {
"email": true,
"linkedin": false
},
"target_countries": [
"FR",
"BE"
],
"goal": {
"type": "call",
"link": "https://cal.example.com/acme/intro",
"note": ""
},
"created_at": "2026-10-02T09:14:00.000Z",
"updated_at": "2026-11-25T18:40:12.000Z",
"stats": {
"campaigns": 6,
"running_campaigns": 4,
"leads": 3395,
"emails_sent": 751,
"replies": 31,
"hot_leads": 4,
"spend_usd": 30.04,
"spent_today_usd": 12.36
}
}
]
}Get a project
/api/v1/projects/{id}One project with its stats: emails sent, replies, hot leads, spend and today's spend.
idintegerrequiredProject id (from GET /projects).
curl "https://prospek.baptisthecht.fr/api/v1/projects/12" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"id": 12,
"object": "project",
"domain": "acme-events.com",
"company_name": "Acme Events",
"status": "active",
"daily_budget_usd": 20,
"monthly_cap_usd": null,
"autopilot_enabled": true,
"channels": {
"email": true,
"linkedin": false
},
"target_countries": [
"FR",
"BE"
],
"goal": {
"type": "call",
"link": "https://cal.example.com/acme/intro",
"note": ""
},
"created_at": "2026-10-02T09:14:00.000Z",
"updated_at": "2026-11-25T18:40:12.000Z",
"stats": {
"campaigns": 6,
"running_campaigns": 4,
"leads": 3395,
"emails_sent": 751,
"replies": 31,
"hot_leads": 4,
"spend_usd": 30.04,
"spent_today_usd": 12.36
}
}
}Set the daily budget
/api/v1/projects/{id}/budgetSets how much the project may spend per day ($0.04 per email on Starter and Growth). $0 stops all sending. Optionally resumes campaigns that were paused because the budget was set to $0.
idintegerrequiredProject id (from GET /projects).
daily_budget_usdnumberrequired0–10,000. 20 ≈ 500 emails a day.
monthly_cap_usdnumber | nullOptional monthly spend cap. null removes it.
resume_campaignsbooleanResume campaigns paused by a $0 budget (reason budget_pause).
warnings tells you when sending still can't happen (no card on file, empty balance, $0 budget).
curl -X PATCH "https://prospek.baptisthecht.fr/api/v1/projects/12/budget" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"daily_budget_usd":20,"resume_campaigns":true}'{
"data": {
"id": 12,
"object": "project",
"domain": "acme-events.com",
"company_name": "Acme Events",
"status": "active",
"daily_budget_usd": 20,
"monthly_cap_usd": null,
"autopilot_enabled": true,
"channels": {
"email": true,
"linkedin": false
},
"target_countries": [
"FR",
"BE"
],
"goal": {
"type": "call",
"link": "https://cal.example.com/acme/intro",
"note": ""
},
"created_at": "2026-10-02T09:14:00.000Z",
"updated_at": "2026-11-25T18:40:12.000Z",
"stats": {
"campaigns": 6,
"running_campaigns": 4,
"leads": 3395,
"emails_sent": 751,
"replies": 31,
"hot_leads": 4,
"spend_usd": 30.04,
"spent_today_usd": 12.36
}
},
"resumed_campaigns": 3,
"warnings": []
}Campaigns
List campaigns
/api/v1/projects/{id}/campaignsA project's campaigns (ICP segments) with status, targeting and stats.
idintegerrequiredProject id (from GET /projects).
statusstringdraft · researching · searching · review · running · paused · archived
include_archivedbooleanInclude archived campaigns. Default false.
curl "https://prospek.baptisthecht.fr/api/v1/projects/12/campaigns" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"id": 48,
"object": "campaign",
"project_id": 12,
"name": "Wedding planners in Lyon",
"status": "running",
"status_reason": null,
"status_label": "Running",
"status_hint": "Sending within your daily budget.",
"stage": "outreach",
"autopilot_state": "working",
"use_case": "Venue sourcing and vendor coordination for destination weddings",
"pain": "Planners lose days chasing venues and suppliers for each event",
"keywords": [
"wedding planner",
"destination wedding",
"event coordination"
],
"positive_criteria": [
"Plans 20+ weddings a year",
"Has a public portfolio"
],
"negative_criteria": [
"Venue owners"
],
"example_clients": [
"Maison Lumière",
"Les Jolis Mariages"
],
"target_roles": [
"Founder",
"Lead planner"
],
"decision_maker": "Agency founder",
"language": "auto",
"instructions": null,
"daily_limit_usd": null,
"channels": {
"email": true,
"linkedin": false
},
"created_by": "onboarding",
"created_at": "2026-10-02T09:20:00.000Z",
"updated_at": "2026-11-25T08:02:41.000Z",
"launched_at": "2026-10-02T10:05:00.000Z",
"stats": {
"leads": 812,
"contacted": 403,
"emails_sent": 521,
"replies": 14,
"reply_rate_pct": 3.5,
"hot_leads": 3,
"spend_usd": 20.84
}
}
]
}Create a campaign
/api/v1/projects/{id}/campaignsCreates a draft campaign from an ICP description. Drafts don't send: open the campaign in the app so the research agent finds leads, then launch it.
idintegerrequiredProject id (from GET /projects).
namestringrequiredWho you target, e.g. “Mid-market SaaS founders”.
use_casestringWhat you offer them.
painstringThe customer problem you solve.
keywordsstring[]Search keywords (max 30).
positive_criteriastring[]Traits a good lead has.
negative_criteriastring[]Traits that disqualify a lead.
example_clientsstring[]Companies that look like your best customers.
target_rolesstring[]Job titles to reach.
decision_makerstringWho signs off.
business_typesstring[]Business types to search for, e.g. “wedding planner”.
languagestringISO 639-1 code or auto (the lead's language).
instructionsstringExtra instructions for the email writer (max 3,000 characters).
daily_limit_usdnumber | nullPer-campaign daily cap.
curl -X POST "https://prospek.baptisthecht.fr/api/v1/projects/12/campaigns" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Hotel F&B managers in Lisbon","use_case":"Specialty coffee subscriptions for hotel breakfasts","keywords":["boutique hotel","breakfast"],"target_roles":["F&B Manager","General Manager"]}'{
"data": {
"id": 57,
"object": "campaign",
"project_id": 12,
"name": "Hotel F&B managers in Lisbon",
"status": "draft",
"status_reason": null,
"status_label": "Draft",
"status_hint": "Not launched yet.",
"stage": "plan",
"autopilot_state": null,
"use_case": "Venue sourcing and vendor coordination for destination weddings",
"pain": "Planners lose days chasing venues and suppliers for each event",
"keywords": [
"wedding planner",
"destination wedding",
"event coordination"
],
"positive_criteria": [
"Plans 20+ weddings a year",
"Has a public portfolio"
],
"negative_criteria": [
"Venue owners"
],
"example_clients": [
"Maison Lumière",
"Les Jolis Mariages"
],
"target_roles": [
"Founder",
"Lead planner"
],
"decision_maker": "Agency founder",
"language": "auto",
"instructions": null,
"daily_limit_usd": null,
"channels": {
"email": true,
"linkedin": false
},
"created_by": "api",
"created_at": "2026-10-02T09:20:00.000Z",
"updated_at": "2026-11-25T08:02:41.000Z",
"launched_at": null,
"stats": {
"leads": 0,
"contacted": 0,
"emails_sent": 0,
"replies": 0,
"reply_rate_pct": 0,
"hot_leads": 0,
"spend_usd": 0
}
},
"next_step": "Drafts don't send. Open the campaign in the app to let the agent find leads, then launch it."
}Get a campaign
/api/v1/campaigns/{id}One campaign with targeting, status and stats.
idintegerrequiredCampaign id.
curl "https://prospek.baptisthecht.fr/api/v1/campaigns/48" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"id": 48,
"object": "campaign",
"project_id": 12,
"name": "Wedding planners in Lyon",
"status": "running",
"status_reason": null,
"status_label": "Running",
"status_hint": "Sending within your daily budget.",
"stage": "outreach",
"autopilot_state": "working",
"use_case": "Venue sourcing and vendor coordination for destination weddings",
"pain": "Planners lose days chasing venues and suppliers for each event",
"keywords": [
"wedding planner",
"destination wedding",
"event coordination"
],
"positive_criteria": [
"Plans 20+ weddings a year",
"Has a public portfolio"
],
"negative_criteria": [
"Venue owners"
],
"example_clients": [
"Maison Lumière",
"Les Jolis Mariages"
],
"target_roles": [
"Founder",
"Lead planner"
],
"decision_maker": "Agency founder",
"language": "auto",
"instructions": null,
"daily_limit_usd": null,
"channels": {
"email": true,
"linkedin": false
},
"created_by": "onboarding",
"created_at": "2026-10-02T09:20:00.000Z",
"updated_at": "2026-11-25T08:02:41.000Z",
"launched_at": "2026-10-02T10:05:00.000Z",
"stats": {
"leads": 812,
"contacted": 403,
"emails_sent": 521,
"replies": 14,
"reply_rate_pct": 3.5,
"hot_leads": 3,
"spend_usd": 20.84
}
}
}Pause a campaign
/api/v1/campaigns/{id}/pauseStops new emails for a running campaign. Replies keep arriving. Pausing a paused campaign is a no-op (changed: false).
idintegerrequiredCampaign id.
curl -X POST "https://prospek.baptisthecht.fr/api/v1/campaigns/48/pause" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"id": 48,
"object": "campaign",
"project_id": 12,
"name": "Wedding planners in Lyon",
"status": "paused",
"status_reason": "manual",
"status_label": "Paused",
"status_hint": "Sending within your daily budget.",
"stage": "outreach",
"autopilot_state": "working",
"use_case": "Venue sourcing and vendor coordination for destination weddings",
"pain": "Planners lose days chasing venues and suppliers for each event",
"keywords": [
"wedding planner",
"destination wedding",
"event coordination"
],
"positive_criteria": [
"Plans 20+ weddings a year",
"Has a public portfolio"
],
"negative_criteria": [
"Venue owners"
],
"example_clients": [
"Maison Lumière",
"Les Jolis Mariages"
],
"target_roles": [
"Founder",
"Lead planner"
],
"decision_maker": "Agency founder",
"language": "auto",
"instructions": null,
"daily_limit_usd": null,
"channels": {
"email": true,
"linkedin": false
},
"created_by": "onboarding",
"created_at": "2026-10-02T09:20:00.000Z",
"updated_at": "2026-11-25T08:02:41.000Z",
"launched_at": "2026-10-02T10:05:00.000Z",
"stats": {
"leads": 812,
"contacted": 403,
"emails_sent": 521,
"replies": 14,
"reply_rate_pct": 3.5,
"hot_leads": 3,
"spend_usd": 20.84
}
},
"changed": true
}Resume a campaign
/api/v1/campaigns/{id}/resumeResumes a paused campaign. Campaigns that were never launched return 409 — review and launch them in the app.
idintegerrequiredCampaign id.
curl -X POST "https://prospek.baptisthecht.fr/api/v1/campaigns/48/resume" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"id": 48,
"object": "campaign",
"project_id": 12,
"name": "Wedding planners in Lyon",
"status": "running",
"status_reason": null,
"status_label": "Running",
"status_hint": "Sending within your daily budget.",
"stage": "outreach",
"autopilot_state": "working",
"use_case": "Venue sourcing and vendor coordination for destination weddings",
"pain": "Planners lose days chasing venues and suppliers for each event",
"keywords": [
"wedding planner",
"destination wedding",
"event coordination"
],
"positive_criteria": [
"Plans 20+ weddings a year",
"Has a public portfolio"
],
"negative_criteria": [
"Venue owners"
],
"example_clients": [
"Maison Lumière",
"Les Jolis Mariages"
],
"target_roles": [
"Founder",
"Lead planner"
],
"decision_maker": "Agency founder",
"language": "auto",
"instructions": null,
"daily_limit_usd": null,
"channels": {
"email": true,
"linkedin": false
},
"created_by": "onboarding",
"created_at": "2026-10-02T09:20:00.000Z",
"updated_at": "2026-11-25T08:02:41.000Z",
"launched_at": "2026-10-02T10:05:00.000Z",
"stats": {
"leads": 812,
"contacted": 403,
"emails_sent": 521,
"replies": 14,
"reply_rate_pct": 3.5,
"hot_leads": 3,
"spend_usd": 20.84
}
},
"changed": true,
"warnings": []
}Leads
List leads
/api/v1/leadsLeads across your projects, most recently updated first, with cursor pagination.
project_idintegerOnly this project.
campaign_idintegerOnly this campaign.
intentstringLatest reply intent: hot_lead (or hot), out_of_office, not_interested, email_changed, recipient_gone, auto_acknowledgement, unsubscribe, self_reply.
statusstringPipeline status (new, contacted, replied, bounced…) or your manual status (Hot, Demo, Won…).
sinceISO 8601Only leads updated at or after this time — handy for polling.
limitinteger1–200, default 50.
cursorstringnext_cursor from the previous page.
curl "https://prospek.baptisthecht.fr/api/v1/leads?intent=hot_lead&since=2026-11-01&limit=50" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"id": "lead_7c5b5895b66e42f1a575",
"object": "lead",
"project_id": 12,
"campaign_id": 48,
"campaign_name": "Wedding planners in Lyon",
"first_name": "Camille",
"last_name": "Morel",
"full_name": "Camille Morel",
"email": "camille@maison-lumiere.example",
"email_status": "verified",
"job_title": "Founder",
"company_name": "Maison Lumière",
"company_domain": "maison-lumiere.example",
"country": "FR",
"linkedin_url": null,
"status": "replied",
"intent": "hot_lead",
"temperature": "hot",
"manual_status": null,
"needs_reply": true,
"touches": 1,
"last_touch_at": "2026-11-24T08:31:00.000Z",
"replied_at": "2026-11-25T13:02:44.000Z",
"why_fits": "Runs 30+ destination weddings a year around Lyon and lists venue sourcing as a pain on their site.",
"created_at": "2026-11-20T10:00:00.000Z",
"updated_at": "2026-11-25T13:02:44.000Z"
}
],
"has_more": true,
"next_cursor": "WyIyMDI2LTExLTI1VDEzOjAyOjQ0LjAwMFoiLCJsZWFkXzdjNWIiXQ"
}Hot leads
/api/v1/leads/hotLeads whose latest reply shows interest (or that you marked Hot), newest reply first, with that reply.
project_idintegerOnly this project.
campaign_idintegerOnly this campaign.
sinceISO 8601Only leads that replied at or after this time.
limitinteger1–200, default 50.
curl "https://prospek.baptisthecht.fr/api/v1/leads/hot" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"id": "lead_7c5b5895b66e42f1a575",
"object": "lead",
"project_id": 12,
"campaign_id": 48,
"campaign_name": "Wedding planners in Lyon",
"first_name": "Camille",
"last_name": "Morel",
"full_name": "Camille Morel",
"email": "camille@maison-lumiere.example",
"email_status": "verified",
"job_title": "Founder",
"company_name": "Maison Lumière",
"company_domain": "maison-lumiere.example",
"country": "FR",
"linkedin_url": null,
"status": "replied",
"intent": "hot_lead",
"temperature": "hot",
"manual_status": null,
"needs_reply": true,
"touches": 1,
"last_touch_at": "2026-11-24T08:31:00.000Z",
"replied_at": "2026-11-25T13:02:44.000Z",
"why_fits": "Runs 30+ destination weddings a year around Lyon and lists venue sourcing as a pain on their site.",
"created_at": "2026-11-20T10:00:00.000Z",
"updated_at": "2026-11-25T13:02:44.000Z",
"last_reply": {
"subject": "Re: Venues for your 2027 weddings",
"body": "Hi Léa, timing is good — could you send pricing for a 3-wedding season?",
"received_at": "2026-11-25T13:02:44.000Z"
}
}
]
}Lead conversation
/api/v1/leads/{id}/messagesEvery email (and LinkedIn message) with the lead, oldest first.
idstringrequiredLead id, e.g. lead_7c5b…
curl "https://prospek.baptisthecht.fr/api/v1/leads/lead_7c5b5895b66e42f1a575/messages" \
-H "Authorization: Bearer $API_KEY"{
"data": [
{
"id": "msg_1f0e4bd2a8c64f0e93aa",
"object": "message",
"lead_id": "lead_7c5b5895b66e42f1a575",
"campaign_id": 48,
"channel": "email",
"direction": "out",
"kind": "first",
"from_email": "lea@mail-acme-events.example",
"from_name": "Léa from Acme Events",
"to_email": "camille@maison-lumiere.example",
"cc": [],
"subject": "Venues for your 2027 weddings",
"body": "Hi Camille,\n\nSaw that Maison Lumière runs most of its weddings around Lyon…",
"status": "delivered",
"intent": null,
"sent_at": "2026-11-24T08:31:00.000Z",
"received_at": null,
"created_at": "2026-11-24T08:31:00.000Z"
},
{
"id": "msg_93be0c1d77e24d1b8f02",
"object": "message",
"lead_id": "lead_7c5b5895b66e42f1a575",
"campaign_id": 48,
"channel": "email",
"direction": "in",
"kind": "inbound",
"from_email": "camille@maison-lumiere.example",
"from_name": "Camille Morel",
"to_email": "lea@mail-acme-events.example",
"cc": [],
"subject": "Re: Venues for your 2027 weddings",
"body": "Hi Léa, timing is good — could you send pricing for a 3-wedding season?",
"status": "received",
"intent": "hot_lead",
"sent_at": null,
"received_at": "2026-11-25T13:02:44.000Z",
"created_at": "2026-11-25T13:02:44.000Z"
}
],
"lead": {
"id": "lead_7c5b5895b66e42f1a575",
"object": "lead",
"project_id": 12,
"campaign_id": 48,
"campaign_name": "Wedding planners in Lyon",
"first_name": "Camille",
"last_name": "Morel",
"full_name": "Camille Morel",
"email": "camille@maison-lumiere.example",
"email_status": "verified",
"job_title": "Founder",
"company_name": "Maison Lumière",
"company_domain": "maison-lumiere.example",
"country": "FR",
"linkedin_url": null,
"status": "replied",
"intent": "hot_lead",
"temperature": "hot",
"manual_status": null,
"needs_reply": true,
"touches": 1,
"last_touch_at": "2026-11-24T08:31:00.000Z",
"replied_at": "2026-11-25T13:02:44.000Z",
"why_fits": "Runs 30+ destination weddings a year around Lyon and lists venue sourcing as a pain on their site.",
"created_at": "2026-11-20T10:00:00.000Z",
"updated_at": "2026-11-25T13:02:44.000Z"
}
}Reply to a lead
/api/v1/leads/{id}/replySends your reply in the same email thread, from the mailbox that contacted the lead. Pending auto-replies are canceled and the lead no longer needs a reply. Manual replies are free.
idstringrequiredLead id, e.g. lead_7c5b…
bodystringrequiredPlain-text reply (max 10,000 characters).
subjectstringDefaults to “Re: <thread subject>”.
ccstring[]Up to 10 addresses to copy.
curl -X POST "https://prospek.baptisthecht.fr/api/v1/leads/lead_7c5b5895b66e42f1a575/reply" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"Hi Camille — a 3-wedding season is €2,400. Does Tuesday 14:00 work for a 15-minute call?"}'{
"data": {
"id": "msg_8f8d84fb7bcc46839147",
"object": "message",
"lead_id": "lead_7c5b5895b66e42f1a575",
"campaign_id": 48,
"channel": "email",
"direction": "out",
"kind": "manual",
"from_email": "lea@mail-acme-events.example",
"from_name": "Léa from Acme Events",
"to_email": "camille@maison-lumiere.example",
"cc": [],
"subject": "Re: Venues for your 2027 weddings",
"body": "Hi Camille — a 3-wedding season is €2,400. Does Tuesday 14:00 work for a 15-minute call?",
"status": "sent",
"intent": null,
"sent_at": "2026-11-25T14:10:03.000Z",
"received_at": null,
"created_at": "2026-11-25T14:10:03.000Z"
},
"canceled_auto_replies": 1
}Billing
Balance
/api/v1/balanceYour prepaid balance, billing mode and whether campaigns can send right now.
sending_blocked_reason is no_card (add a card) or no_balance (top up or switch to Postpaid).
curl "https://prospek.baptisthecht.fr/api/v1/balance" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"object": "balance",
"balance_usd": 47.6,
"currency": "USD",
"billing_mode": "prepaid",
"has_payment_method": true,
"sending_allowed": true,
"sending_blocked_reason": null,
"plan": {
"id": "starter",
"name": "Starter"
},
"email_price_usd": 0.04,
"spent_today_usd": 12.36
}
}Usage
/api/v1/usageEmails, LinkedIn actions and spend per day (UTC) and per project.
daysinteger1–90, default 30.
project_idintegerOnly this project.
curl "https://prospek.baptisthecht.fr/api/v1/usage?days=7" \
-H "Authorization: Bearer $API_KEY"{
"data": {
"object": "usage",
"days": 7,
"from": "2026-11-19T00:00:00.000Z",
"to": "2026-11-25T18:00:00.000Z",
"email_price_usd": 0.04,
"totals": {
"emails": 312,
"linkedin": 0,
"spend_usd": 12.48,
"free_credits_usd": 12.48
},
"daily": [
{
"date": "2026-11-24",
"emails": 52,
"linkedin": 0,
"spend_usd": 2.08
},
{
"date": "2026-11-25",
"emails": 49,
"linkedin": 0,
"spend_usd": 1.96
}
],
"projects": [
{
"project_id": 12,
"domain": "acme-events.com",
"emails": 312,
"linkedin": 0,
"spend_usd": 12.48
}
]
}
}Webhooks
Instead of polling, get a signed POST the moment something happens. Add a webhook in a project's Integrations page (For developers → Add webhook): choose the events and copy the signing secret, which is shown once.
| Event | Sent when |
|---|---|
| lead.hot | A reply shows interest — a question, a request for pricing, a meeting. |
| lead.replied | Any reply arrives (including out-of-office and not interested). |
The body is a JSON envelope; data holds the project, campaign, lead, the message that triggered the event and a link to the conversation in the app.
{
"id": "evt_5c1f0a2b9d7e4c3a8b61",
"event": "lead.hot",
"created_at": "2026-11-25T13:02:47.000Z",
"project_id": 12,
"data": {
"project": {
"id": 12,
"domain": "acme-events.com"
},
"campaign": {
"id": 48,
"name": "Wedding planners in Lyon"
},
"lead": {
"id": "lead_7c5b5895b66e42f1a575",
"first_name": "Camille",
"last_name": "Morel",
"email": "camille@maison-lumiere.example",
"job_title": "Founder",
"company": "Maison Lumière",
"company_domain": "maison-lumiere.example",
"country": "FR",
"linkedin_url": null,
"temperature": "hot",
"intent": "hot_lead",
"status": "replied",
"manual_status": null
},
"message": {
"id": "msg_93be0c1d77e24d1b8f02",
"channel": "email",
"subject": "Re: Venues for your 2027 weddings",
"body": "Hi Léa, timing is good — could you send pricing for a 3-wedding season?",
"intent": "hot_lead",
"received_at": "2026-11-25T13:02:44.000Z"
},
"app_url": "https://app.example.com/app/p/12/inbox?tab=replied&person=lead_7c5b5895b66e42f1a575"
}
}X-Signaturesha256=<hex> — HMAC-SHA256 of the raw request body, keyed with your signing secret.X-Eventlead.hot, lead.replied or test (the Send test button).X-Delivery-IdThe envelope id (evt_…). Use it to ignore duplicates.X-TimestampUnix time (seconds) of the attempt.User-AgentProspek-Webhooks/1.0Verify every request: compute the HMAC over the raw bytes (before parsing JSON) and compare it to X-Signature in constant time.
import crypto from "node:crypto";
import express from "express";
const app = express();
// Keep the RAW body: the signature is computed over the exact bytes we sent.
app.post("/webhooks/prospek", express.raw({ type: "application/json" }), (req, res) => {
const signature = req.get("X-Signature") ?? "";
const expected =
"sha256=" + crypto.createHmac("sha256", process.env.WEBHOOK_SECRET).update(req.body).digest("hex");
const valid =
signature.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
if (!valid) return res.status(401).send("Invalid signature");
const event = JSON.parse(req.body.toString("utf8"));
if (event.event === "lead.hot") {
const { lead, message, app_url } = event.data;
console.log(`Hot lead: ${lead.first_name} from ${lead.company}: ${message?.body}`, app_url);
}
res.sendStatus(200); // answer fast (within 5 s); do slow work in the background
});
app.listen(3000);Answer with any 2xx within 5 seconds. Failed deliveries (timeouts, non-2xx) are retried after 1 minute, 5 minutes and 30 minutes — up to 4 attempts — and every attempt is listed in the integration's delivery log.
Use with AI agents
The API is designed to be driven by an assistant. On the API keys page, click Copy Prompt for Agent: you get a ready-made prompt for Claude, ChatGPT or Cursor with the base URL, every endpoint and your key filled in. Machine-readable index: GET https://prospek.baptisthecht.fr/api/v1.
Every morning at 9:00, call GET /leads/hot?since=<yesterday>, read each thread with
GET /leads/{id}/messages and draft a short reply that answers the question and proposes
a call. Show me the drafts before sending them with POST /leads/{id}/reply.