API reference
3 endpoints. All paths are relative to your installation, for example https://app.example.com.
/api/v1/w/{workspaceId}/writing/generateGenerate an evidence-backed email draft + fact-check/api/v1/w/{workspaceId}/writing/subjectsSubject line suggestions/api/v1/w/{workspaceId}/writing/fact-checkFact-check any draft against the lead’s supported claims/api/v1/w/{workspaceId}/writing/generateGenerate an evidence-backed email draft + fact-check
Path parameters
workspaceIdrequired | string |
Request body (JSON)
leadIdrequired | string (uuid) |
mode | enumOne of: first_line, full, followup · Default "full" |
templateSubject | stringLength 0–300 · Default "" |
templateBody | stringLength 0–8000 · Default "" |
previousEmails | stringLength 0–8000 · Default "" |
instructions | stringLength 0–2000 · Default "" |
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/writing/generate" \
-H "Authorization: Bearer $EMN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leadId": "00000000-0000-4000-8000-000000000000",
"mode": "full",
"templateSubject": "",
"templateBody": "",
"previousEmails": "",
"instructions": ""
}'/api/v1/w/{workspaceId}/writing/subjectsSubject line suggestions
Path parameters
workspaceIdrequired | string |
Request body (JSON)
leadIdrequired | string (uuid) |
bodyrequired | stringLength 1–8000 |
count | integerRange 1–10 · Default 5 |
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/writing/subjects" \
-H "Authorization: Bearer $EMN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leadId": "00000000-0000-4000-8000-000000000000",
"body": "string",
"count": 5
}'/api/v1/w/{workspaceId}/writing/fact-checkFact-check any draft against the lead’s supported claims
Path parameters
workspaceIdrequired | string |
Request body (JSON)
leadIdrequired | string (uuid) |
textrequired | stringLength 1–10000 |
curl -X POST "https://app.example.com/api/v1/w/$WORKSPACE_ID/writing/fact-check" \
-H "Authorization: Bearer $EMN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leadId": "00000000-0000-4000-8000-000000000000",
"text": "string"
}'