Lumail
Product
Agents
PricingDocsChangelog
Log inSign up
IntroductionTutorialsAI IntegrationSDKAPI ReferenceIntegrationsFeaturesDeliverabilityWorkflows

Privacy & GDPR

GDPR in LumailData Processing Agreement (DPA) Status

Ship with Email

Choose an Email MCP for Claude Code, Then Ship the LaunchSend a Newsletter from Cursor, Then Ship the LaunchMove a Launch List from Kit Without Paying for Dormant Subscribers

Tutorials

Create an API TokenSend Transactional Email with SMTPSend React Email Templates with LumailBuild a V0 Capture PageDynamic Promo Codes with Webhooks

AI Integration

Claude Code (Plugin)Codex (Plugin)ChatGPT PluginHermesSkills (CLI)OpenClawCursor (MCP)TypeScript SDK IntegrationsTools API (v2)Examples & Recipes

SDK

SDK IntroductionSDK ConfigurationSDK ResourcesSDK ToolsErrors and Retries

API Reference

API TokensTypeScript SDKCLIMCP ServerTools API (v2)Admin Tools APIRate LimitsSMTP EndpointPOSTSend Transactional EmailPOSTSend Email in HTMLPOSTSend Email in MarkdownPOSTSend Email in TiptapPOSTEmail Verification APIPOSTCreate SubscriberGETGet SubscriberPATCHUpdate SubscriberPOSTUnsubscribe SubscriberPOSTAdd Tags to SubscriberDELETERemove Tags from SubscriberPOSTTrack EventGETGet Subscriber EventsGETGet All TagsPOSTCreate a TagGETList All CampaignsPOSTCreate CampaignGETGet CampaignPATCHUpdate CampaignDELETEDelete CampaignPOSTSend CampaignGETList SubscribersGETGet Tag by ID or Name

Integrations

ClickFunnels IntegrationSystemIO Integration

Features

Affiliate ProgramAccount VerificationLanguageVariablesTag Action LinksSurveysContent Deliverability CheckerSender HealthCampaign Delivery ScoreEmail Engagement ScoreSubscriber EventsRevenue TrackingEmail Sending Queue

Deliverability

How to strengthen DMARCHow to add DMARCHow to fix DKIMHow to verify a sending domainHow to fix MAIL FROMHow to fix BIMIHow to lower bounce rateHow to lower complaint rateHow to fix delivery delaysHow to fix blocklist bouncesHow to fix sending infrastructureHow to fix a dedicated IPHow to fix a failed sendHow to fix a fallback-domain sendHow to fix an invalid email parameterHow to fix sending rate or daily quotaHow to fix a monthly email limitHow to fix a past-due payment pauseHow to fix an admin sending pauseHow to complete additional verificationHow to fix a failed campaignHow to fix a campaign render error

Workflows

WorkflowWorkflow Getting StartedWorkflow TriggersWorkflow Manual EnrollmentWorkflow BranchingWorkflow A/B TestingWorkflow GoalsWorkflow Exit RulesWorkflow Publishing and VersionsWorkflow Test Runs and ResultsWait StepEmail StepAction StepWebhook StepWorkflow Groups

domains

Email DomainsWeb Domains

Update Campaign

Update an existing campaign by ID

https://lumail.io/api/v1/campaigns/{campaignId}

Update an existing campaign's metadata and content. Only campaigns with DRAFT status can be updated. For scheduled campaigns, cancel the schedule first.

Response

  • Success (200 OK) - Returns the updated campaign object.
  • Error (400 Bad Request) - Campaign is not in DRAFT status or invalid sender ID.
  • Error (404 Not Found) - Campaign not found or doesn't belong to your organization.
  • Error (401 Unauthorized) - Invalid or missing API token.

Path Parameters

ParameterTypeDescription
campaignIdstringRequired. The unique campaign ID

Request Schema

FieldTypeDescription
namestringInternal name for the campaign
subjectstringEmail subject line
previewstringPreview text shown in email clients
contentobjectEmail content in TipTap JSON format
contentTypestringContent type: MAILY, PLATE, or MARKDOWN
senderIdstringEmail sender ID
replyTostringReply-to email address

All fields are optional. Only provided fields will be updated.

Response Fields

FieldTypeDescription
successbooleanIndicates if the operation was successful
campaignobjectThe updated campaign object
campaign.idstringUnique identifier for the campaign
campaign.campaignId
PreviousGet CampaignNextDelete Campaign
MethodPATCH
Endpoint/api/v1/campaigns/{campaignId}
Request Examples
import { Lumail } from "lumail";
const lumail = new Lumail({ apiKey: "YOUR_API_TOKEN" });

await lumail.campaigns.update("cmp_abc123xyz", {
  subject: "Updated Subject Line",
  preview: "New preview text",
});
Response Examples
{
  "success": true,
  "campaign": {
    "id": "cmp_abc123xyz",
    "campaignId": "cmp_abc123xyz",
    "name": "Welcome Newsletter",
    "subject": "Updated Subject Line",
    "preview": "New preview text",
    "status": "DRAFT",
    "contentType": "MAILY",
    "content": {
      "type": "doc",
      "content": [...]
    },
    "replyTo": null,
    "senderId": "snd_xyz789abc",
    "recipientCount": 0,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T16:45:00.000Z"
  },
  "campaignId": "cmp_abc123xyz"
}
string
Same as id (for consistency)
campaign.namestringName of the campaign
campaign.subjectstringEmail subject line
campaign.previewstring or nullPreview text for the email
campaign.statusstringCampaign status (DRAFT)
campaign.contentTypestringContent type: MAILY, PLATE, or MARKDOWN
campaign.contentobjectEmail content in TipTap JSON format
campaign.replyTostring or nullReply-to email address
campaign.senderIdstringEmail sender ID
campaign.recipientCountnumberNumber of recipients
campaign.createdAtstringISO timestamp when the campaign was created
campaign.updatedAtstringISO timestamp when the campaign was last updated
campaignIdstringCampaign ID at the root level for convenience

Important Notes

  • Only DRAFT campaigns can be updated. Scheduled, sending, or sent campaigns cannot be modified.
  • To update a scheduled campaign, you must first cancel the schedule using the Lumail UI.
  • When updating the senderId, the sender must exist and belong to your organization.

Usage Example

Use this API endpoint to:

  • Update campaign subject lines and preview text
  • Modify email content programmatically
  • Change the sender for a campaign
  • Build campaign editing interfaces
  • Sync campaign updates from external systems

Related Documentation

  • List Campaigns - List all campaigns
  • Create Campaign - Create a new campaign
  • Get Campaign - Get details for a specific campaign
  • Delete Campaign - Delete a campaign

On This Page

ResponsePath ParametersRequest SchemaResponse FieldsImportant NotesUsage ExampleRelated Documentation