Campaigns
Create, manage, and send email campaigns.
GET
/api/v1/campaignsList all campaigns in your project. Returns campaigns sorted by creation date, newest first.
Example
curl https://app.clawdmail.ai/api/v1/campaigns \ -H "Authorization: Bearer cm_live_your_key"
POST
/api/v1/campaignsCreate a new campaign. Returns the created campaign object with a unique ID.
Parameters
| Name | Type | Description |
|---|---|---|
namerequired | string | Display name for the campaign |
subjectLine | string | Email subject line |
htmlContent | string | Full HTML content for the email body |
listId | string | Subscriber list to target |
fromName | string | Sender display name |
fromEmail | string | Sender email address |
Example
curl -X POST https://app.clawdmail.ai/api/v1/campaigns \
-H "Authorization: Bearer cm_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "March Product Update",
"subjectLine": "What we shipped this month",
"fromName": "Koby at ClawdMail",
"fromEmail": "koby@clawdmail.ai",
"listId": "list_abc123"
}'Response
{
"data": {
"id": "camp_9e7d6c5b4a3f",
"name": "March Product Update",
"subjectLine": "What we shipped this month",
"fromName": "Koby at ClawdMail",
"fromEmail": "koby@clawdmail.ai",
"listId": "list_abc123",
"status": "draft",
"createdAt": "2026-03-04T12:00:00Z"
}
}GET
/api/v1/campaigns/:idRetrieve a single campaign by its ID, including content, status, and metadata.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
Example
curl https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f \ -H "Authorization: Bearer cm_live_your_key"
Response
{
"data": {
"id": "camp_9e7d6c5b4a3f",
"name": "March Product Update",
"subjectLine": "What we shipped this month",
"previewText": "A look at everything new in March.",
"htmlContent": "<!DOCTYPE html><html>...",
"fromName": "Koby at ClawdMail",
"fromEmail": "koby@clawdmail.ai",
"listId": "list_abc123",
"status": "draft",
"createdAt": "2026-03-04T12:00:00Z",
"updatedAt": "2026-03-04T12:30:00Z"
}
}PATCH
/api/v1/campaigns/:idUpdate an existing campaign. Only include the fields you want to change.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
name | string | Display name for the campaign |
subjectLine | string | Email subject line |
previewText | string | Preview text shown in inbox |
htmlContent | string | Full HTML content for the email body |
fromName | string | Sender display name |
fromEmail | string | Sender email address |
listId | string | Subscriber list to target |
Example
curl -X PATCH https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f \
-H "Authorization: Bearer cm_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"subjectLine": "What we shipped in March — and what's next",
"previewText": "A look at everything new."
}'DELETE
/api/v1/campaigns/:idPermanently delete a campaign. This action cannot be undone.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
Example
curl -X DELETE https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f \ -H "Authorization: Bearer cm_live_your_key"
POST
/api/v1/campaigns/:id/sendSend a campaign to its subscriber list. The campaign must have a subject line, HTML content, and an associated list.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
Example
curl -X POST https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f/send \ -H "Authorization: Bearer cm_live_your_key"
GET
/api/v1/campaigns/:id/statsGet delivery and engagement analytics for a sent campaign, including opens, clicks, bounces, and unsubscribes.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
Example
curl https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f/stats \ -H "Authorization: Bearer cm_live_your_key"
Response
{
"data": {
"campaignId": "camp_9e7d6c5b4a3f",
"sent": 4820,
"delivered": 4793,
"opens": 2156,
"uniqueOpens": 1847,
"clicks": 612,
"uniqueClicks": 498,
"bounces": 27,
"unsubscribes": 12,
"openRate": 0.3854,
"clickRate": 0.1039
}
}POST
/api/v1/campaigns/:id/shareGenerate a shareable preview link for the campaign. Useful for getting approval before sending.
Parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Campaign ID |
Example
curl -X POST https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f/share \ -H "Authorization: Bearer cm_live_your_key"