MachFive - AI Cold Email Generator
Generate personalized cold email sequences from lead data. MachFive uses AI to research prospects and craft unique, relevant outreach - not templates.
Setup
- 1. Get your API key at https://app.machfive.io/settings (Integrations → API Keys)
- Set
MACHFIVE_API_KEY in your environment
Campaign ID
Every generate request needs a campaign ID in the URL: /api/v1/campaigns/{campaign_id}/generate (or /generate-batch).
- - If the user has not provided a campaign name or ID: Call GET /api/v1/campaigns (see below) to list campaigns in their workspace, then ask them to pick one by name or ID before running generate.
- Where to get it manually: https://app.machfive.io/campaigns → open a campaign → copy the ID from the URL or settings.
- No default: The skill does not assume a campaign. The user (or agent config) must provide one. Agents can store a default campaign ID for the workspace if the user provides it (e.g. "use campaign X for my requests").
Endpoints
List Campaigns (discover before generate)
List campaigns in the workspace so the agent can ask the user which campaign to use when they haven't provided a name or ID.
GET https://app.machfive.io/api/v1/campaigns
Authorization: Bearer {MACHFIVE_API_KEY}
Or use
X-API-Key: {MACHFIVE_API_KEY} header.
Optional query: ?q=search or ?name=search to filter by campaign name.
Response (200):
{
"campaigns": [
{ "id": "cb1bbb14-e576-4d8f-a8f3-6fa929076fd8", "name": "SaaS Q1 Outreach", "created_at": "2025-01-15T12:00:00Z" },
{ "id": "a1b2c3d4-...", "name": "Enterprise Leads", "created_at": "2025-01-10T08:00:00Z" }
]
}
If no campaign name or ID was given, call this first, then ask the user: "Which campaign should I use? [list names/IDs]."
Single Lead (Sync)
Generate an email sequence for one lead (3–5 emails per lead). Waits for completion, returns the sequence directly. The request can take 3–5 minutes (AI research + generation); use a client timeout of at least 300 seconds (5 min) or 600 seconds (10 min). Do not use a 120s timeout or the response will be cut off.
CODEBLOCK2
Or use X-API-Key: {MACHFIVE_API_KEY} header.
CODEBLOCK3
Response (200):
CODEBLOCK4
Recovery: The response includes list_id. If the request times out or the response is truncated, you can still get the result: call GET /api/v1/lists/{listid} to confirm status, then GET /api/v1/lists/{listid}/export?format=json to retrieve the sequence.
Batch (Async)
Generate email sequences for multiple leads (one list; each lead gets a sequence). Returns immediately (202) with list_id; processing runs in the background. To get results: poll list status, then call export.
CODEBLOCK5
Or use X-API-Key: {MACHFIVE_API_KEY} header.
CODEBLOCK6
Response (202):
CODEBLOCK7
List lead lists
List lead lists in the workspace. Optional query: campaign_id, status (pending | processing | completed | failed), limit (default 50, max 100), offset.
CODEBLOCK8
Response (200): { "lists": [ { "id", "campaign_id", "custom_name", "processing_status", "created_at", "completed_at" }, ... ] }. Order is created_at desc.
List status (poll)
Poll until the list is done. Use the list_id from generate or generate-batch.
CODEBLOCK9
Response (200): id, campaign_id, custom_name, processing_status (pending | processing | completed | failed), created_at, updated_at. When processing_status === 'completed': leads_count, emails_created, completed_at. When failed: failed_at. 404 if list not found or not in workspace.
Poll every 10–30 seconds until processing_status === 'completed' or failed. If failed, the list cannot be exported; retry by submitting a new batch.
List export (get results)
After status is completed, fetch the processed output. CSV (default) or JSON.
CODEBLOCK10
- - format=csv (default): Returns the processed CSV (same as UI download), with
Content-Disposition: attachment; filename="MachFive-{list_id}.csv". - format=json: Returns
{ "leads": [ { "email": "...", "sequence": [ { "step": 1, "subject": "...", "body": "..." }, ... ] }, ... ] }. Each lead may include optional name, company, title when present, e.g. { "email": "john@acme.com", "name": "John Smith", "company": "Acme Corp", "title": "VP Marketing", "sequence": [ ... ] }. - 409 if list is not yet completed (poll GET /lists/:id first). 404 if list not found or not in workspace.
Batch flow: POST generate-batch → 202 + list_id → poll GET /lists/:id until processing_status === 'completed' → GET /lists/:id/export?format=csv or json → return result to user.
Lead Fields
Each lead must include a valid email; it is used to map the lead through processing and to match generated sequences back to the lead in exports (same as the app UI). All other fields are optional but improve personalization.
| Field | Required | Description |
|---|
| INLINECODE49 | Yes | Lead's email address; used to map the lead through processing and in exports |
| INLINECODE50 |
No | Full name or first name (improves personalization) |
|
company | No | Company name (improves personalization) |
|
title | No | Job title (improves personalization) |
|
company_website | No | Company URL for research |
|
linkedin_url | No | LinkedIn profile for deeper personalization |
Options
| Option | Type | Default | Description |
|---|
| INLINECODE55 | string | Auto | Display name for this list in MachFive UI |
| INLINECODE56 |
number | 3 | Emails per lead (1-5) |
|
email_signature | string | None | Signature appended to emails |
|
campaign_angle | string | None | Context for personalization |
|
approved_ctas | array | From campaign | CTAs to use (omit to use campaign defaults) |
Limits
- - Single lead (sync): Request can take 5–10 minutes; use a client timeout of at least 300s (5 min) or 600s (10 min).
- Batch (async): Returns 202 immediately; poll GET /api/v1/lists/{list_id} every 10–30s until
processing_status is completed or failed. Workspaces have a concurrent batch limit; if you get 429, retry later. - List lists: Query param
limit default 50, max 100; offset for pagination.
Errors
| Code | Error | Description |
|---|
| 400 | BAD_REQUEST | Invalid JSON, missing lead/leads, or missing/invalid lead email; or campaign has no vector store |
| 401 |
UNAUTHORIZED | Invalid or missing API key |
| 402 | INSUFFICIENT_CREDITS | Out of credits |
| 403 | FORBIDDEN | Campaign not in your workspace |
| 404 | NOT_FOUND | Campaign or list doesn't exist |
| 409 | NOT_READY | Export called before list completed (poll GET /lists/:id first) |
| 429 | WORKSPACE_LIMIT | Too many concurrent batch jobs; try again later |
Usage Examples
"Generate a cold email for the VP of Sales at Stripe"
"Create outreach sequences for these 10 leads"
"Write a 3-email sequence targeting marketing directors at SaaS companies"
Pricing
- - Free: 100 credits/month
- Starter: 2,000 credits/month
- Growth: 5,000 credits/month
- Enterprise: Custom credits/month
- 1 credit = 1 lead processed
Get started: https://machfive.io
MachFive - AI冷邮件生成器
根据潜在客户数据生成个性化的冷邮件序列。MachFive使用AI研究潜在客户并打造独特、相关的触达内容——而非模板。
设置
- 1. 在 https://app.machfive.io/settings(集成 → API密钥)获取您的API密钥
- 在您的环境中设置 MACHFIVEAPIKEY
活动ID
每个生成请求都需要在URL中包含一个活动ID:/api/v1/campaigns/{campaign_id}/generate(或 /generate-batch)。
- - 如果用户未提供活动名称或ID: 调用 GET /api/v1/campaigns(见下文)列出其工作区中的活动,然后要求用户按名称或ID选择一个后再运行生成。
- 手动获取位置: https://app.machfive.io/campaigns → 打开一个活动 → 从URL或设置中复制ID。
- 无默认值: 该技能不假定任何活动。用户(或代理配置)必须提供一个。如果用户提供了默认活动ID(例如使用活动X处理我的请求),代理可以为该工作区存储默认活动ID。
端点
列出活动(生成前发现)
列出工作区中的活动,以便代理在用户未提供名称或ID时询问用户使用哪个活动。
GET https://app.machfive.io/api/v1/campaigns
Authorization: Bearer {MACHFIVEAPIKEY}
或使用 X-API-Key: {MACHFIVEAPIKEY} 标头。
可选查询:?q=search 或 ?name=search 按活动名称筛选。
响应(200):
json
{
campaigns: [
{ id: cb1bbb14-e576-4d8f-a8f3-6fa929076fd8, name: SaaS第一季度外联, created_at: 2025-01-15T12:00:00Z },
{ id: a1b2c3d4-..., name: 企业级潜在客户, created_at: 2025-01-10T08:00:00Z }
]
}
如果未提供活动名称或ID,请先调用此端点,然后询问用户:我应该使用哪个活动?[列出名称/ID]。
单个潜在客户(同步)
为一个潜在客户生成邮件序列(每个潜在客户3-5封邮件)。等待完成,直接返回序列。请求可能需要3-5分钟(AI研究+生成);使用至少300秒(5分钟)或600秒(10分钟)的客户端超时。不要使用120秒超时,否则响应将被截断。
POST https://app.machfive.io/api/v1/campaigns/{campaign_id}/generate
Authorization: Bearer {MACHFIVEAPIKEY}
Content-Type: application/json
或使用 X-API-Key: {MACHFIVEAPIKEY} 标头。
json
{
lead: {
name: 张三,
title: 市场副总裁,
company: Acme公司,
email: zhangsan@acme.com,
company_website: https://acme.com,
linkedin_url: https://linkedin.com/in/zhangsan
},
options: {
list_name: 第一季度外联,
email_count: 3,
email_signature: 此致敬礼,\n您的姓名,
approved_ctas: [直接会议CTA, 引流磁石CTA]
}
}
响应(200):
json
{
leadid: leadxyz789,
list_id: uuid,
sequence: [
{ step: 1, subject: ..., body: ... },
{ step: 2, subject: ..., body: ... },
{ step: 3, subject: ..., body: ... }
],
credits_remaining: 94
}
恢复: 响应包含 listid。如果请求超时或响应被截断,您仍然可以获取结果:调用 GET /api/v1/lists/{listid} 确认状态,然后调用 GET /api/v1/lists/{list_id}/export?format=json 检索序列。
批量(异步)
为多个潜在客户生成邮件序列(一个列表;每个潜在客户获得一个序列)。立即返回(202)并附带 list_id;处理在后台运行。要获取结果:轮询列表状态,然后调用导出。
POST https://app.machfive.io/api/v1/campaigns/{campaign_id}/generate-batch
Authorization: Bearer {MACHFIVEAPIKEY}
Content-Type: application/json
或使用 X-API-Key: {MACHFIVEAPIKEY} 标头。
json
{
leads: [
{ name: 张三, email: zhangsan@acme.com, company: Acme公司, title: 市场副总裁 },
{ name: 李四, email: lisi@beta.com, company: Beta公司, title: 销售总监 }
],
options: {
list_name: 第一季度外联批量,
email_count: 3
}
}
响应(202):
json
{
list_id: uuid,
status: processing,
leads_count: 2,
message: 批量请求已接受。轮询列表状态或在UI中打开。
}
列出潜在客户列表
列出工作区中的潜在客户列表。可选查询:campaign_id、status(pending | processing | completed | failed)、limit(默认50,最大100)、offset。
GET https://app.machfive.io/api/v1/lists
GET https://app.machfive.io/api/v1/lists?campaignid={campaignid}&status=completed&limit=20
Authorization: Bearer {MACHFIVEAPIKEY}
响应(200): { lists: [ { id, campaignid, customname, processingstatus, createdat, completedat }, ... ] }。按 createdat 降序排列。
列表状态(轮询)
轮询直到列表完成。使用来自generate或generate-batch的 list_id。
GET https://app.machfive.io/api/v1/lists/{list_id}
Authorization: Bearer {MACHFIVEAPIKEY}
响应(200): id、campaignid、customname、processingstatus(pending | processing | completed | failed)、createdat、updatedat。当 processingstatus === completed 时:leadscount、emailscreated、completedat。当 failed 时:failedat。404 如果列表未找到或不在工作区中。
每10-30秒轮询一次,直到 processing_status === completed 或 failed。如果 failed,列表无法导出;通过提交新批次重试。
列表导出(获取结果)
状态为 completed 后,获取处理后的输出。CSV(默认)或 JSON。
GET https://app.machfive.io/api/v1/lists/{list_id}/export?format=csv
GET https://app.machfive.io/api/v1/lists/{list_id}/export?format=json
Authorization: Bearer {MACHFIVEAPIKEY}
- - format=csv(默认):返回处理后的CSV(与UI下载相同),附带 Content-Disposition: attachment; filename=MachFive-{list_id}.csv。
- format=json:返回 { leads: [ { email: ..., sequence: [ { step: 1, subject: ..., body: ... }, ... ] }, ... ] }。每个潜在客户可能包含可选的 name、company、title(如存在),例如 { email: zhangsan@acme.com, name: 张三, company: Acme公司, title: 市场副总裁, sequence: [ ... ] }。
- 409 如果列表尚未完成(先轮询 GET /lists/:id)。404 如果列表未找到或不在工作区中。
批量流程: POST generate-batch → 202 + listid → 轮询 GET /lists/:id 直到 processingstatus === completed → GET /lists/:id/export?format=csv 或 json → 将结果返回给用户。
潜在客户字段
每个潜在客户必须包含一个有效的 email;它用于