ClawdMaildocs

Campaigns

Create, manage, and send email campaigns.

GET/api/v1/campaigns

List 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/campaigns

Create a new campaign. Returns the created campaign object with a unique ID.

Parameters

NameTypeDescription
namerequiredstringDisplay name for the campaign
subjectLinestringEmail subject line
htmlContentstringFull HTML content for the email body
listIdstringSubscriber list to target
fromNamestringSender display name
fromEmailstringSender 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/:id

Retrieve a single campaign by its ID, including content, status, and metadata.

Parameters

NameTypeDescription
idrequiredstringCampaign 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/:id

Update an existing campaign. Only include the fields you want to change.

Parameters

NameTypeDescription
idrequiredstringCampaign ID
namestringDisplay name for the campaign
subjectLinestringEmail subject line
previewTextstringPreview text shown in inbox
htmlContentstringFull HTML content for the email body
fromNamestringSender display name
fromEmailstringSender email address
listIdstringSubscriber 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/:id

Permanently delete a campaign. This action cannot be undone.

Parameters

NameTypeDescription
idrequiredstringCampaign 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/send

Send a campaign to its subscriber list. The campaign must have a subject line, HTML content, and an associated list.

Parameters

NameTypeDescription
idrequiredstringCampaign 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/stats

Get delivery and engagement analytics for a sent campaign, including opens, clicks, bounces, and unsubscribes.

Parameters

NameTypeDescription
idrequiredstringCampaign 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/share

Generate a shareable preview link for the campaign. Useful for getting approval before sending.

Parameters

NameTypeDescription
idrequiredstringCampaign ID

Example

curl -X POST https://app.clawdmail.ai/api/v1/campaigns/camp_9e7d6c5b4a3f/share \
  -H "Authorization: Bearer cm_live_your_key"